Mocca101/obsidian-plugin-groups

Feature Request: A command to Toggle (not just turn on or off) plugin groups.

Opened this issue · 5 comments

Right now its only possible for commands to enable and disable groups.

Unfortunately this is not as easy a it sounds, as it's possible to have the same plugins in multiple groups, as well as other groups within a group that could be turned on/of individually or through the parent group. Thus it's not clear what the expected behaviour is for this command.
A group isn't really active or inactive. It can simply be used for enabling/disabling all the plugins that belong to it.

If you could clarify what the expected behaviour would be in those different scenarios, I'll give it another look.

So you're saying its simple to just enable or disable plugin groups but not to toggle them, like turn disable it if its enabled and vice versa? Can u elaborate on how it works?

As it is now, when you turn use the enable/disable group commands/buttons, it will enable/disable all the plugins inside of it and all its child groups.

Therefore its unclear what the expected behaviour would be if some plugins or child groups were en/disabled in between, should they simply be en/disabled like their parent group? Or should the be turned on if they were off and the other way around.
If they should simply be en/disabled I think it would be confusing to have a toggle command as it doesn't toggle the plugins/groups within.

I was thinking of a toggle that could turn plugins on and off but that would be too complex.

Here's an idea: An option to have a toggle for a group. The toggle reverses the status of each plugin in the group, regardless of if its on or off. If a user wants to turn all plugins on or off with a toggle, they could run the command to turn all plugins on first, or the command to turn them all off, and then toggle.

What do you think of that?

Hmmm I think that might be possible, I'll consider it for the next release once I've got enough time to work on it again!