Site editor: Make sure only one Site updated notice displays at a time#53087
Merged
glendaviesnz merged 1 commit intotrunkfrom Jul 30, 2023
Merged
Site editor: Make sure only one Site updated notice displays at a time#53087glendaviesnz merged 1 commit intotrunkfrom
glendaviesnz merged 1 commit intotrunkfrom
Conversation
glendaviesnz
commented
Jul 28, 2023
| @@ -107,6 +108,7 @@ export default function SaveHub() { | |||
| const saveCurrentEntity = async () => { | |||
| if ( ! dirtyCurrentEntity ) return; | |||
|
|
|||
Contributor
Author
There was a problem hiding this comment.
In other places where we are using the unique id we are not dismissing, but in those cases the notice message is usually unique so obvious it has changed. In this instance, unless we dismiss the notice first it can appear like the subsequent saves may not have been completed as the snackbar appears not to change.
|
Size Change: +21 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 9f610eb. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5687809084
|
Mamaduka
approved these changes
Jul 28, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Die snackbars die!
Why?
Because @jordesign is not the only one that finds ever multiplying stacks of snacks that tell you the same thing annoying 😄
Fixes: #53016
How?
Adds an id to the snackbar, so it can be dismissed before consecutive saves so that only one appears at a time.
Testing Instructions
Screenshots or screencast
Before:
site-save-snacks-before.mp4
After:
site-edit-snack-after.mp4