-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add a Snackbar notice to inform users that settings have been saved successfully. #838
base: develop
Are you sure you want to change the base?
Conversation
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.
Overall this works nice and code looks good here. Couple things worth discussing:
- Is it possible to reduce the time the notice shows? Right now the snackbar sticks around for quite a while and I think it would be nice if we could hide it quicker
- This solves success messages but doesn't solve error messages. If you save settings for a Feature and an error occurs, the error shows up top but it is often out of view. Would be great if we scroll to the top when that happens so the error can be seen
Note that there's discussion in WP/GB via WordPress/gutenberg#16391 on overall accessibility of the snackbar, so we might perhaps review the consensus from a11y folks there and ensure we utilize the snackbar for error & success states in a solid a11y manner. |
Looks like WordPress/gutenberg#67662 is an updated proposal in WP/GB that we might consider here as well. |
@dkotter I have added a scroll-to-top to make error notices more visible. Regarding the Snackbar notice, as @jeffpaul pointed out, it has open accessibility issues. Since we have already added the scroll-to-top, I think we can replace it with a standard success notice combined with the scroll-to-top. However, I am not too concerned about this since the message we are displaying is not high priority. Additionally, the core itself uses Snackbar notices, and I have seen some plugins, such as ElasticPress, doing the same. what do you think? |
I'm fine with using the Snackbar here. We can always change this once there's a better option in Core.
Thanks, this works great. One last thing is how long the snackbar shows. If we can't reduce the time that shows (not sure if that's a setting that is supported by Core) I think we should at least remove the snackbar (if this is easy enough) anytime the screen changes. As an example, if I enable a Feature, the snackbar shows. If I then click in to configure the settings for that Feature, ideally we remove the snackbar at that point. Then when settings are saved, we show the snackbar again. If I go back to the main screen, that snackbar should be removed again. |
Description of the Change
This PR adds a Snackbar notice to inform users that settings have been saved successfully.
Closes #837
How to test the Change
Changelog Entry
Credits
Props @iamdharmesh @dkotter @jeffpaul
Checklist: