Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 New View Loading Causes Settings to Not Register/Show In Searches #48

Open
2 of 7 tasks
Graywaren opened this issue Oct 28, 2024 · 0 comments
Open
2 of 7 tasks

Comments

@Graywaren
Copy link

Graywaren commented Oct 28, 2024

Check for existing bug reports before submitting.

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

Note:

So I'm not sure if this is something that can be remedied with your plug-in, or if it is entirely on other plug-ins to fix, but wanted to mention it here in case there is something that could be done with this plug-in. No worries if it can't be fixed by this one though.

Expected Behavior

Search returns results from all settings from all plug-ins.

Current behaviour

For plug-ins that have their view loading (or whatever it's called) deferred because they are not visible on load, their settings are not registered with Settings Search and do not return results in any search. I have hit this with Calendar and File Color plug-ins so far. Here's a console error from load when Calendar was not visible on load:

plugin:calendar:814 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'dow')
    at CalendarSettingsTab.addWeekStartSetting (plugin:calendar:814:66)
    at CalendarSettingsTab.display (plugin:calendar:775:14)
    at SettingsSearch.getTabResources (plugin:settings-search:229:15)
    at SettingsSearch.buildPluginResources (plugin:settings-search:129:12)
    at eval (plugin:settings-search:131:29)
addWeekStartSetting @ plugin:calendar:814
display @ plugin:calendar:775
getTabResources @ plugin:settings-search:229
buildPluginResources @ plugin:settings-search:129
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:131
setTimeout (async)
buildPluginResources @ plugin:settings-search:131
eval @ plugin:settings-search:112
(anonymous) @ app.js:1
(anonymous) @ app.js:1
(anonymous) @ app.js:1
a @ app.js:1

Reproduction

Launch or reload obsidian with the Calendar module not visible, open settings and search for "words per dot" setting. It will return no results.

Which Operating Systems are you using?

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

Obsidian Version Check

1.7.4

Plugin Version

1.3.10

Confirmation

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

Possible solution

I've no idea if it's remotely possible, but perhaps the settings search could index all the settings the first time the settings menu is opened rather than on load? Or check for missing settings then? Again, since I don't how it's actually doing anything, that idea might be entirely unviable, apologies if so!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant