-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global styles: disable revisions menu item when panel is open #55620
Conversation
Size Change: +18 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
Thanks for the quick PR. I don't know that disabling is the right direction here. It's a bit strange to see the "Revision history" button when you're already browsing revisions, but disabling it might lead to more confusion. Part of the problem right now is that clicking the button does nothing when the revisions panel is open which makes it feel a bit broken. As a middle-ground, perhaps we could try: clicking the button closes the popover. What do you think? |
Thanks for the PR! Another approach I can imagine is to eliminate the revision button popover. This means that when you press the revision button, this button changes to the "pressed" style and immediately displays the revision panel. Additionally, display a button at the bottom of the panel to quickly return to defaults. In the future, pagination might also appear above this reset button. |
I was mistaken about this 😅 The button at the bottom has already been implemented, and when the oldest revision is selected, the "Reset to defaults" button is displayed, otherwise it switches to the "Apply" button. 3db48734b4290aeb0eb00b31b9b6a7c0.mp4My one opinion is to display the buttons side by side. However, some languages will definitely overflow the text, so automatic wrapping may be necessary, as was done in #52249. That said, perhaps we should explore a little more first in #55486 as to where it would be ideal to place the reset button 🤔 |
Thanks for the ideas. I agree it could be addressed more holistically. I might pause this PR pending review of the general Styles panel view. |
What?
A small PR to disable global styles revisions menu item when the global styles revisions is open
Why?
Remarked upon in #55486 (comment), to provide a visual cue to users that the menu item is active.
How?
Via the
disabled
prop on<MenuItem />
Testing Instructions
/wp-admin/site-editor.php
Testing Instructions for Keyboard
Screenshots or screencast