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

Consider removing use of snackbar component #64622

Closed
johnstonphilip opened this issue Aug 19, 2024 · 3 comments
Closed

Consider removing use of snackbar component #64622

johnstonphilip opened this issue Aug 19, 2024 · 3 comments
Labels
[Type] Enhancement A suggestion for improvement.

Comments

@johnstonphilip
Copy link
Contributor

What problem does this address?

The snackbar that pops up upon save can cause playwright tests to be flaky, as it can be sometimes covering an element that playwright wants to click on. So instead of playwright finding the element it wants to click, it instead clicks on the snackbar, causing the test to fail.

This results in playwright tests sometimes passing and sometimes failing.

Additionally, snackbars and toasts are generally not good for accessibility. See: https://www.erikkroes.nl/blog/burn-your-toast/

Furthermore, the placement of it is on the opposite side of the screen from the Save/Publish/Update button, meaning if you want to click it, it requires great mouse dexterity in the hands of the user.

What is your proposed solution?

Remove the use of the snackbar component entirely. If the messages are important, they should be persistent.

If the snackbar cannot be removed entirely, all messages should be manually dismissed.

Screenshot 2024-08-19 at 3 32 13 PM
@johnstonphilip johnstonphilip added the [Type] Enhancement A suggestion for improvement. label Aug 19, 2024
@Mamaduka
Copy link
Member

E2E test should match actual user behavior. You'll have to close the snackbar before clicking the elements behind it. This is what we do in project e2e tests.

@johnstonphilip
Copy link
Contributor Author

User experience is that the snack bar goes away on its own after save. Making playwright wait for 4 seconds is not ideal though.

Regardless of playwright, it's still not a good pattern for accessibility.

@johnstonphilip johnstonphilip closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
@Marc-pi
Copy link

Marc-pi commented Aug 21, 2024

Furthermore, the placement of it is on the opposite side of the screen from the Save/Publish/Update button, meaning if you want to click it, it requires great mouse dexterity in the hands of the user.

i agree see #47446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants