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

Only show color and typography variation control if alternate variations exist #61216

Closed
richtabor opened this issue Apr 29, 2024 · 3 comments · Fixed by #62074
Closed

Only show color and typography variation control if alternate variations exist #61216

richtabor opened this issue Apr 29, 2024 · 3 comments · Fixed by #62074
Labels
[Feature] Theme Style Variations Related to style variations provided by block themes [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

#59717 added a default color/typography variation. It works well, but one follow-up would be to only show the related UI if there are additional color/typography variations available.

Visual

In the visual below, there is a "Default" color variation, even though there are no other color variations provided by the theme. This entire "Presets" UI should only render if there are alternate variations available, for both colors and typography variations independently.

CleanShot 2024-04-29 at 15 23 24

@richtabor richtabor added [Type] Enhancement A suggestion for improvement. [Feature] Theme Style Variations Related to style variations provided by block themes labels Apr 29, 2024
@richtabor richtabor changed the title Only show default variation if alternate variations exist Only show color and typography variation control if alternate variations exist Apr 29, 2024
@hbhalodia
Copy link
Contributor

Hi @richtabor, I can work on this one and would raise the PR soon.

Thank You.

@hbhalodia
Copy link
Contributor

Hi @richtabor, I am unable to reproduce the issue again. If you remove the variations and reload the whole site, then you would not be able to see the presets.

Can you please check at your end as well, if we are able to reproduce then I am happy to contribute to the PR.

Thank You.

@richtabor
Copy link
Member Author

@hbhalodia

Here's the Twenty Twenty Four theme, without any style variations (I removed them from the files). You'll see there's the default typography variation, and default color variation rendering.

CleanShot 2024-05-27 at 20 00 08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Theme Style Variations Related to style variations provided by block themes [Type] Enhancement A suggestion for improvement.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants