code-syntax-block icon indicating copy to clipboard operation
code-syntax-block copied to clipboard

Hide global color scheme option if using `mkaz_prism_css_path` filter

Open BenRutlandWeb opened this issue 3 years ago • 3 comments

When using the mkaz_prism_css_path filter to supply a custom theme, the global color scheme options no longer apply.

Can this control be removed automatically when using the filter, or have another filter to remove this control as it's redundant in this instance.

BenRutlandWeb avatar Jun 16 '22 16:06 BenRutlandWeb

@BenRutlandWeb This prompted me to rethink how the global color scheme works and I moved it to a settings page instead of being within the editor itself. A global setting like that shouldn't been included on a per block basis, since it could effect the whole site.

Take a look at v3.1.0 that I just published now and let me know what you think.

I probably could still add a check on that page if the path is set, though I think the intent is to allow the user to be able to override the theme if they want.

mkaz avatar Jun 23 '22 14:06 mkaz

Thanks, I agree that it should be a global setting, v3.1.0 is better for UX as there are no longer redundant controls within the block.

I think the "Global Color Scheme" panel should be removed as it only has a message now that clutters up the sidebar. This message could be moved into the "Settings" panel if it's even necessary, or perhaps a dismissible admin notice on upgrade.

BenRutlandWeb avatar Jun 23 '22 15:06 BenRutlandWeb

Yes, I plan to remove the panel from the editor, I'll do it in the next version. I left it there to point any existing users to the new location, since it is a change to how it previously worked. I'm not sure how to do a dismissible admin notice on upgrade, that would've been the best solution for sure.

mkaz avatar Jun 23 '22 19:06 mkaz