-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Hide the presets panel for when there are less or exactly one presets available #62074
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +10 B (0%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
cd8c039
to
830a5ea
Compare
@draganescu Just tested this, and it appears to remove everything except the Default variation. I would expect this to do the exact opposite, which is remove the Default variation, showing just the Color and Typography presets. |
A leftover I didn't pay attention to but which tested fine because:
... oops! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@richtabor @draganescu Quick note to mention that the Default style variation still is shown, though the Color preset seems to be highlighted (which I love). Additionally, the Typography preset is no longer being shown. (There is only one.) |
We want the default variation (not the typography/colors, but the global one) to show as an easy way for the user to reset their own changes too |
This does not affect the default variation, only does not render the "Presets" UI if there are no alternate variations to switch to. Defaults were added in #61901. |
Confirming this is now true with my experience with Powder:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
@richtabor @draganescu @MaggieCabrera @ajlende Are we waiting for anything else at this point to GTM? (Besides final reviews?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM!
This failing test that says
... |
Try rebasing, #62111 should have fixed that |
72354fe
to
811eadd
Compare
…rdPress#62074) * hide the presets panel for when there are less or exactly one presets available * tweak logic to return null if there is only one variation (the default). --------- Co-authored-by: draganescu <andraganescu@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org> Co-authored-by: bgardner <bgardner@git.wordpress.org> Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
…rdPress#62074) * hide the presets panel for when there are less or exactly one presets available * tweak logic to return null if there is only one variation (the default). --------- Co-authored-by: draganescu <andraganescu@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org> Co-authored-by: bgardner <bgardner@git.wordpress.org> Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
What?
Closes #61216
Why?
A palette should have more than one item, particularly when that item is also used as a default.
How?
Update the components that show the type sets and color sets to now show if there is only one or zero presets.
Testing Instructions
wp-content
and remove thestyles
folderTesting Instructions for Keyboard
N/A
Screenshots or screencast
CleanShot.2024-05-29.at.13.22.01.mp4