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 logic to adapt snackbar timeout based on actions #53200

Open
richtabor opened this issue Jul 31, 2023 · 2 comments
Open

Add logic to adapt snackbar timeout based on actions #53200

richtabor opened this issue Jul 31, 2023 · 2 comments
Labels
Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@richtabor
Copy link
Member

Currently snackbars have a hard-set 10000 timeout. While this is appropriate perhaps for some notices (those that have actions), snackbars without actions should be much quicker.

For example, a notices that fires after you run a command (like "Hide block breadcrumbs" or when you copy a block to your clipboard "Copied "button" to clipboard" are informative, not action-seeking. You shouldn't have to interact with them (other to dismiss if they're hanging around and stacking up.

One idea is to have the NOTICE_TIMEOUT adapt based on if the notice has an action. If it does, then perhaps a longer value like 10000 is fine; otherwise something much smaller (even 5000) may work much better. We'd need to test around the specifics, but it could be much shorter.

const NOTICE_TIMEOUT = 10000;

@richtabor richtabor added the [Type] Enhancement A suggestion for improvement. label Jul 31, 2023
@richtabor richtabor added the Needs Design Feedback Needs general design feedback. label Aug 1, 2023
@jasmussen
Copy link
Contributor

Agree very much.

@jasmussen jasmussen added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Aug 2, 2023
@apeatling
Copy link
Contributor

Some previous discussion and a PR on this one for historical context #47199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants