mirnovov / obsidian-homepage

An Obsidian plugin that opens a specified note, canvas, or workspace on startup, instead of the most recent one.
MIT License
406 stars 19 forks source link

Opening workspaces doesn't work #53

Closed sarantsatsral-qy closed 1 year ago

sarantsatsral-qy commented 1 year ago

Details

I never used your plugin before, but when I clicked workspace, the drop-down menu showed me files instead of workspace.

Steps to reproduce

I have around 30-40 workspaces, so maybe that will hinder how the drop-down menu works?

Debug information

{"version":3,"homepages":{"Main Homepage":{"value":"Cornell Left","kind":"File","openOnStartup":true,"hasRibbonIcon":true,"openMode":"Replace all open notes","manualOpenMode":"Keep open notes","view":"Default view","revertView":true,"openWhenEmpty":false,"refreshDataview":false,"autoCreate":true,"autoScroll":false,"pin":false,"commands":[],"alwaysApply":false}},"separateMobile":false,"_defaultViewMode":"source","_livePreview":true,"_focusNewTab":"default","_plugins":["obsidian-admonition","table-editor-obsidian","obsidian-advanced-uri","auto-note-mover","obsidian-banners","blockquote-levels","buttons","calendar","cmenu-plugin","obsidian-editor-shortcuts","obsidian-codeview","cmdr","convert-url-to-iframe","obsidian-custom-frames","customizable-menu","dataview","obsidian-dialogue-plugin","obsidian-dictionary-plugin","editor-commands-remap","emoji-shortcodes","obsidian-epub-plugin","obsidian-excel-to-markdown-table","file-explorer-note-count","obsidian-file-info-plugin","file-tree-alternative","obsidian-fountain","obsidian-fullscreen-plugin","garble-text","highlightr-plugin","hotkey-helper","hotkeysplus-obsidian","obsidian-hover-editor","obsidian-icon-folder","mrj-jump-to-link","obsidian-languagetool-plugin","obsidian-list-callouts","luhman","markdown-table-editor","meld-encrypt","metaedit","obsidian-minimal-settings","nldates-obsidian","note-refactor-obsidian","youhavebeenstaring-plugin","obsidian-text-format","templater-obsidian","tag-wrangler","obsidian-smarter-md-hotkeys","obsidian-show-file-path","reveal-active-file-button","remember-cursor-position","recent-files-obsidian","quickadd","darlal-switcher-plus","quick-explorer","obsidian-qrcode-plugin","obsidian-projects","privacy-glasses-cn","periodic-notes","pane-relief","obsidian42-text-transporter","obsidian42-brat","obsidian-moon-reader","number-headings-obsidian","obsidian-style-settings","obsidian-hider","keyboard-analyzer","obsidian-export-image","OA-file-hider","obsidian-another-quick-switcher","obsidian-tasks-plugin","obsidian-view-mode-by-frontmatter","obsidian-auto-link-title","obsidian-footnotes","obsidian42-strange-new-worlds","obsidian-pandoc-reference-list","customjs","various-complements","obsidian-bulk-rename-plugin","supercharged-links-obsidian","longform","obsidian-colorful-tag","obsidian-spaced-repetition","digitalgarden","obsidian-imgur-plugin","obsidian-kanban","card-board","cycle-through-panes","obsidian-calibre-plugin","obsidian-zotero-desktop-connector","obsidian-citation-plugin","obsidian-zotero-plugin","obsidian-enhancing-export","better-word-count","oz-calendar","weekly-review","obsidian-link-converter","daily-activity","obsidian-mkdocs-publisher","homepage"],"_internalPlugins":["file-explorer","global-search","switcher","backlink","canvas","outgoing-link","tag-pane","page-preview","daily-notes","templates","note-composer","command-palette","editor-status","bookmarks","outline","word-count","workspaces","file-recovery"],"_obsidianVersion":"1.3.5"}

Checklist

mirnovov commented 1 year ago

I have around 30-40 workspaces, so maybe that will hinder how the drop-down menu works?

That shouldn't be the case.

I haven't been able to reproduce it consistently, but I am aware of the UI very rarely failing to update when a setting is changed. If you re-open the settings page (switch to another section of Obsidian's settings and then select Homepage settings again, and try selecting "Workspace" from the dropdown) and try it again, are you able to get it to work?

And if it doesn't, does it show anything in the developer tools?

sarantsatsral-qy commented 1 year ago

Hello, sorry for coming back late.

I tried to set the workspace for homepage, and it only shows files. I clicked the file, and choose another plugin's setting, and comeback to the homepage setting. The drop-down changed automatically to file. The developper tools show no error pertaining to this,

Homepage: Cornell Left (method: Replace all open notes, view: Default view, kind: File)

But you see, the kind is File, not a workspace. Well, I don't know what went wrong. But here's the other error shown in the developper tools, unrelated to my problem.

Thanks so much for replying my message, and in a god speed at that!

caught (in promise) TypeError: e.communityPlugins.periodic-notes.getActiveSet is not a function
    at No (plugin:homepage:1:13576)
    at ft.hasRequiredPlugin (plugin:homepage:3:8948)
    at eval (plugin:homepage:1:43236)
    at e.addDropdown (app.js:1:819033)
    at mt.display (plugin:homepage:1:43166)
    at t.openTab (app.js:1:2650584)
    at t.openTabById (app.js:1:2651166)
    at W.eval (PluginCommands.ts:160:30)
    at Generator.next (<anonymous>)
    at eval (main.js:3:8)

and

caught (in promise) TypeError: e.communityPlugins.periodic-notes.getActiveSet is not a function
    at No (plugin:homepage:1:13576)
    at ft.hasRequiredPlugin (plugin:homepage:3:8948)
    at eval (plugin:homepage:1:43236)
    at e.addDropdown (app.js:1:819033)
    at mt.display (plugin:homepage:1:43166)
    at t.openTab (app.js:1:2650584)
    at t.openTabById (app.js:1:2651166)
    at app.js:1:2619376
    at HTMLDivElement.<anonymous> (app.js:1:821035)
plug

and

caught (in promise) TypeError: e.communityPlugins.periodic-notes.getActiveSet is not a function
    at No (plugin:homepage:1:13576)
    at ft.hasRequiredPlugin (plugin:homepage:3:8948)
    at eval (plugin:homepage:1:43236)
    at e.addDropdown (app.js:1:819033)
    at mt.display (plugin:homepage:1:43166)
    at t.openTab (app.js:1:2650584)
    at HTMLDivElement.<anonymous> (app.js:1:2649023)

and

caught (in promise) TypeError: e.communityPlugins.periodic-notes.getActiveSet is not a function
    at No (plugin:homepage:1:13576)
    at ft.hasRequiredPlugin (plugin:homepage:3:8948)
    at eval (plugin:homepage:1:43236)
    at e.addDropdown (app.js:1:819033)
    at mt.display (plugin:homepage:1:43166)
    at t.openTab (app.js:1:2650584)
    at t.openTabById (app.js:1:2651166)
    at t.onOpen (app.js:1:2651269)
    at e.open (app.js:1:832052)
    at HTMLDivElement.<anonymous> (app.js:1:1893128)
N

and

caught (in promise) TypeError: e.communityPlugins.periodic-notes.getActiveSet is not a function
    at No (plugin:homepage:1:13576)
    at ft.hasRequiredPlugin (plugin:homepage:3:8948)
    at eval (plugin:homepage:1:43236)
    at e.addDropdown (app.js:1:819033)
    at mt.display (plugin:homepage:1:43166)
    at t.openTab (app.js:1:2650584)
    at t.openTabById (app.js:1:2651166)
    at app.js:1:2619376
    at HTMLDivElement.<anonymous> (app.js:1:821035)
N
mirnovov commented 1 year ago

It appears you have the 1.0 beta version of Periodic Notes and my experimental support for it was badly designed, causing the settings panel to crash (even though you've not using it as your homepage, it still needs to check to see what should be displayed in the dropdown). Sorry about this, it should be fixed in an upcoming version.

sarantsatsral-qy commented 1 year ago

You shouldn't be sorry. What you do is amazing! Thank you so much for doing this for us. Sending you much love.