-
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
Template editing: improve revert notices #50302
Conversation
actions: [ | ||
{ | ||
label: __( 'Undo' ), | ||
onClick: undoRevert, | ||
}, | ||
], | ||
} ); | ||
} else { |
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 may be needed for some other usage of revert template, but I couldn't see where.
Size Change: +81 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
type: 'snackbar', | ||
id: noticeId, |
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.
If you use the static ID, removing it above is unnecessary.
I've used a similar method in #45348.
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.
Yeh, my thinking in this case was that because the unique id prevents the stacking of snackbars, if you revert multiple templates one after the other the user doesn't get a clear indication of the success of each revert, ie. they revert one and the snackbar appears and stays, they revert another and the same snackbar is still just sitting there. But with the remove added a new snackbar appears for each revert to give confirmation, but still only one at a time.
Do you think this makes sense?
Fixes #49165. |
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.
Thanks @ramonjd, I will add a separate issue for this. |
New issue added for the snackbars appearing again when moving between modes #50624 |
What?
Improves wording on template revert notices, and prevents these notices from stacking.
Why?
Current use of word 'Entity' is confusing, and the stacking of the notices is annoying.
Fixes: #44841
How?
Specifies in notice if it is a template or template part that is being reverted and adds a notice id so only one snackbar appears at a time.
Testing Instructions
Clear customizations
option from the Actions menuTemplate part reverted
orTemplate reverted
and that only one snackbar with this message appears at a timeScreenshots or screencast
template-revert.mp4