mugiwara85 / CodeblockCustomizer

Codeblock Customizer plugin for Obsidian
MIT License
168 stars 7 forks source link

Use style settings plugin for theming #23

Closed mayurankv closed 1 year ago

mayurankv commented 1 year ago

Currently, the settings for this plugin is a bit confusing with what is retained in a theme and what is generally retained in terms of the toggles. It would be good to separate the theming from the plugin by delegating the theming to the style settings plugin. You can export and import themes into this plugin as well. This way, the settings for this plugin would be purely functional (automatic line numbering or not, automatic title or not etc.) and the styling would still be extensible and manageable but in a more common and understandable format.

mugiwara85 commented 1 year ago

What is confusing? I disagree. Why would it be a good idea to delegate some options to another plugin? That would mean that you require two plugins instead of one. You can set everything in the settings tab.

mayurankv commented 1 year ago

No worries! That makes sense. Thank you for considering it.

Personally I was confused about what information in the toggles is retained in a theme. For example, does the automatic icon showing toggle change if you change themes?

mugiwara85 commented 1 year ago

No worries! That makes sense. Thank you for considering it.

Personally I was confused about what information in the toggles is retained in a theme. For example, does the automatic icon showing toggle change if you change themes?

I'm always open for improvements, but for me it would not make sense to depend on an additional plugin. Basically the color settings are just saved. Every other setting e.g. displaying line numbers or not, or the showing icon, are not saved. This has the reason that if you switch between the dark and light themes often, and one has the line numbers enabled and the other doesn't then it would be confusing. Alternative highlight colors are also not saved, from the same reasoning. It would mean that every alternative highlight color should be saved into the settings multiple times(for every theme you save). The toggle options are valid for every theme, that's why they are not saved.