Skip to content

Introduce Plugin Groups For Loading Organization#19

Open
hGriff0n wants to merge 5 commits intoalangrainger:mainfrom
hGriff0n:plugin-groups
Open

Introduce Plugin Groups For Loading Organization#19
hGriff0n wants to merge 5 commits intoalangrainger:mainfrom
hGriff0n:plugin-groups

Conversation

@hGriff0n
Copy link

@hGriff0n hGriff0n commented Apr 6, 2025

Integrates the concept of plugin "groups" from the old Plugin Groups, rebasing the prior loading options into auto-generated groups. Reimplements the existing loading mechanism to use plugin groups for the purpose of enabling future extensibility via custom groups.

This does not include the addition of any settings/ui elements for creating and editing groups as creating a "usable UI" is not really my forte (let alone, one matching the existing design language). I'm also new to Obsidian plugin development and so these changes are not explicitly tested as my system is not setup for it at the moment (can do, just don't know yet if this is a one off).

Summary:

  • Introduce new settings object PluginGroupSettings which defines a customization point for plugin loading options
    • Groups can customize whether they are enabled by default on startup as well as the delay before loading
    • Also provides options supporting future directions, such as "generating enable/disable commands"
  • Implements the existing loading methods ("Disabled", "Instant", "Short Delay", "Long Delay") as default plugin groups
  • Maintains backwards compatibility by assigning plugins to groups based on their saved "loading method" setting (if not indicated from the save data)

hGriff0n added 5 commits April 4, 2025 09:09
Adds a quick sketch out of the interface and code changes needed to integrate "Plugin Groups" into the lazy loader plugin, as the former plugin is now unmaintained.

This is specifically done in a backwards-compatible approach, where the default groups are automatically created with the current loading options. This also does not include any UI work around how to integrate into the options.
Also removes some code that supports the unimplemented "custom groups" option since the settings for that are not present.
Tries to minimize the diffs with the original repo by undoing some of the auto-formatting applied by my editor.

Also tries to improve certain comments remarking on future work directions.
Undoes a change in the plugin startup logic that, on second review, was slightly different than the previous logic. Restoring the previous logic as any changes in this aspect are not the goal of the PR and it is not certain the new logic is correct
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

Successfully merging this pull request may close these issues.

1 participant