-
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
Global styles revisions: add a reset to default revision #52965
Conversation
Love the idea! I can take this for a proper spin tomorrow 🙂
Being able to access from two places sounds good to me, especially since it's nice to be able to reset things quickly if you need to without having to go digging? |
Size Change: +116 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
There's a bug here somewhere:
For some reason the reset revision is lost. Edit: fixed in f3e39e2 |
Flaky tests detected in f3e39e2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5710403931
|
Thanks for opening the PR, this is a good idea imo. I appreciate it's not technically a 'revision' but I suspect users will interpret it as one, so we can keep special treatment to a minimum. For example the button label can remain "Apply" instead of "Reset to defaults". The timeline item label can just be "Default styles" – I think this would harmonise with the "Reset to defaults" action in the Styles panel header. |
- Ensure that any undefined properties, e.g., styles, settings, are set as empty objects so that any theme defaults are correctly displayed by default
3059f40
to
f3e39e2
Compare
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.
Nice work, this is testing well for me:
✅ Displays correctly when there's at least 1 revision
✅ For themes with heaps and heaps of revisions, it displays at the very bottom of the list
✅ Selecting revisions works as usual
✅ Resetting to the default styles works as expected
2023-08-03.12.05.43.mp4
This LGTM and feels like a nice addition to the UI! ✨
Thanks for testing @andrewserong! |
…e are more than 0 revisions since there is the default with which we can compare the single revision
Resolves #52951
What?
Inserting a reset object as the first "revision" to reset to theme defaults.
Originally spoken about in #50089 (comment)
Why?
Testing out reducing any perceived confusion explained in #52951
Basically we are trying to find a way to show the revisions panel after a the first change, instead of two changes.
Reason behind the two change rule here: #50089 (comment)
How?
Adding a 'fake' revision to the end of the revisions UI list.
TODO
Testing Instructions
Screenshots or screencast
2023-07-31.13.54.33.mp4