Skip to content

🐞 Calendarium spawns multiple view instances #194

@Cube707

Description

@Cube707

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

only one calendar window should exist in the sidebar at any time.

Current behaviour

repeatedly running "open calendar" reopens new windows in the sidebar.

Reproduction

On Desktop:

  1. Have Obsidian open with Calendarium installed and a calendar created
  2. click Open Calendarium
    The sidebar opens with the calendar view
  3. click Open Calendarium again
    You will notice a second Icon in the sidebar (you may have to increase the sidebar width so that all icons are visible)
    Image

On Mobile:

Here is where I first encountered this. When using the android app, The available sidebar views are displayed in a dropdown. Afte using Open Calendarium multiple times, this menu is extremely cluttered:

Image

Image

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

v1.8.7 and 1.7.7

Plugin Version

1.5.0

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

workaround

manually editing workspace.json and removing the "type": "CALENDARIUM" leaf objects, removes the redundant views
This JQ command does that (it deletes all in the sidebar, you have to reopen one):

jq 'del(.right.children[].children[] | select(.state.type | . == "CALENDARIUM" or . == "CALENDARIUM_AGENDA"))'

ideas on how to approach

One Idea would be to make the view a singleton, only ever having a single view.

But it should be discussed if having a calendar in the sidebar as well as as a tab in the workspace is a required feature. Than I believe the number of views should only be limited in the sidebar and not everywhere

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions