Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Skatepark: theme variations #5415

Closed
wants to merge 1 commit into from
Closed

Conversation

MaggieCabrera
Copy link
Contributor

@MaggieCabrera MaggieCabrera commented Jan 31, 2022

Changes proposed in this Pull Request:

I've opened this PR to consider the possibility of leveraging WordPress/gutenberg#35619 instead of the customizer (since Skatepark has not been yet launched) for the color customizations + duotone. In this PR:

  • I added a filter so that the child themes can disable color customization. This could be something we can extend to other Blockbase functions to ake some child themes "less universal" while still benefiting from the parent's CSS, patterns and templates.
  • I added variations for all the colors, those seem to be working mostly fine, but the duotone filter is not showing on the editor. This is a known issue reported in Duotone filter not rendering in some places WordPress/gutenberg#35331
  • I added a variation that disables duotone for the blocks and that works as intended but since style variations don't have labels, it's not recognizable as to what the variation does (the icon is the same as the default theme). Variations will have labels in the future, but they don't have one now.

Related issue(s):

@MaggieCabrera MaggieCabrera self-assigned this Jan 31, 2022
@MaggieCabrera
Copy link
Contributor Author

I wonder if we could have a way to generate dotcom variations using this instead of having to build the whole theme from scratch. that means users won't lose their changes if they decide they want to try another color customization directly from the FSE

@scruffian
Copy link
Member

I wonder if we could have a way to generate dotcom variations using this instead of having to build the whole theme from scratch. that means users won't lose their changes if they decide they want to try another color customization directly from the FSE

Yeah this is my biggest concern. We want the action of changing the colors to be non-destructive, but with this approach you would lose all your customizations.

@pbking
Copy link
Contributor

pbking commented Feb 2, 2022

I'm not seeing a downside to this method. Variations really seems like the way to go for Skatepark.

I think we could refactor the color palette selection in Blockbase to leverage the variation JSON (instead of custom variables in theme.json), duplicating what's going on in Global Styles even more closely. That would eliminate the need to remove the color customizer for Skatepark (since the behavior would be the same).

@scruffian
Copy link
Member

I'm not seeing a downside to this method.

The downside I can see is that when you switch variations you lose all your other customisations.

@MaggieCabrera
Copy link
Contributor Author

Closing in favor of #5789

@scruffian scruffian deleted the try/skatepark-variations branch April 20, 2022 11:23
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.

3 participants