Skip to content
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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

iamdharmesh
Copy link
Member

@iamdharmesh iamdharmesh commented Dec 23, 2024

Description of the Change

This PR adds a Snackbar notice to inform users that settings have been saved successfully.

Dec-23-2024 22-31-06

Closes #837

How to test the Change

  1. Navigate to the ClassifAI settings page (Tools > ClassifAI).
  2. Enable or disable any feature and confirm that the notice is displayed properly.
  3. Navigate to the settings page of any feature and save the settings.
  4. Validate that the Snackbar notice confirming the settings have been saved is displayed.

Changelog Entry

Added - Snackbar notice to inform users that settings have been saved successfully.

Credits

Props @iamdharmesh @dkotter @jeffpaul

Checklist:

@iamdharmesh iamdharmesh requested review from dkotter, jeffpaul and a team as code owners December 23, 2024 17:09
@github-actions github-actions bot added this to the 3.3.0 milestone Dec 23, 2024
@github-actions github-actions bot added the needs:code-review This requires code review. label Dec 23, 2024
Copy link
Collaborator

@dkotter dkotter left a 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:

  1. 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
  2. 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

@jeffpaul
Copy link
Member

jeffpaul commented Jan 3, 2025

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.

@jeffpaul
Copy link
Member

jeffpaul commented Jan 3, 2025

Looks like WordPress/gutenberg#67662 is an updated proposal in WP/GB that we might consider here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scroll to notification messages when settings are saved
3 participants