bigbite / themer

GNU General Public License v2.0
2 stars 0 forks source link

Discussion - Should clearing theme.json customisations also clear Editor Style customisations #115

Open thatisrich opened 1 week ago

thatisrich commented 1 week ago

Behavior in question

After changing the theme Styles via the Editor, should clearing the customisations via Themer be restricted to only changes made in Themer or also cover changes made to the theme via the Editor panel?

For example, it's not currently possible to edit styles such as the colours in the palette via Themer, so clearing customisations of that type via Themer could be confusing.

This may be somewhat related to issue #99.

Some possible outcomes

  1. The current approach is correct, no changes to be made
  2. The current approach is correct, however some more information could be presented to the user prior to clearing changes
  3. Clearing customisations via Themer only removes changes made within the Themer interface
  4. Another solution

Step-by-step reproduction instructions

  1. Go to 'Appearance > Editor'
  2. Edit a page and then click on the Styles icon at the top right of the screen
  3. Make some changes e.g. Colours or Typography
  4. Save the changes
  5. Go to Appearance > Styles Editor
  6. Without making any changes, clear all customisations using the Tools dropdown at the top right of the screen
  7. Save the change
  8. Return to the Editor and notice the Styles changes are reset

Screenshots, screen recordings, code snippets

Demo showing customisations being made via the Styles panel in the Editor, then cleared via Themer

g-elwell commented 1 week ago

Great point, thanks for raising this. I hadn't considered this scenario up until now.

I agree, it's confusing to clear styles that aren't currently part of what is editable within themer. Hopefully this will become less of an issue as we move forward and introduce more capabilities. But in the mean time, perhaps we should be limiting what is cleared when you hit that button.

In simple terms, this would be everything under the top-level styles attribute in theme.json. settings is where the colour palette, etc, is stored, which we don't yet support.