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

toasts: make default duration 5s #31109

Merged
merged 5 commits into from
Jul 12, 2020
Merged

Conversation

rohit2sharma95
Copy link
Collaborator

Closes #28185

Make it 2000ms instead of 500ms
@rohit2sharma95 rohit2sharma95 requested a review from a team as a code owner June 19, 2020 05:03
@XhmikosR
Copy link
Member

Unfortunately, this can't land in v4, but only in v5 because it's a BC. Other than that, we should definitely change the default duration. 2s might be a lot, we should discuss it.

/CC @Johann-S @mdo

@XhmikosR
Copy link
Member

After thinking about it, I think 1s might be a better default.

@Johann-S
Copy link
Member

I chose to set the default duration at 500ms because I wanted our users to think about what's a good duration for them and change it accordingly

@rohit2sharma95
Copy link
Collaborator Author

I wanted our users to think about what's a good duration for them and change it accordingly

@Johann-S Yes, users can change the default duration. But the default duration should be enough for the general toast so that the users don't need to change the default whenever they use the toast.

@mdo
Copy link
Member

mdo commented Jun 22, 2020

Agreed on this being longer. Will play with the timing and would appreciate others doing the same before we decide and merge.

@XhmikosR
Copy link
Member

So, do we all agree to 2s? Should it be something else?

@XhmikosR XhmikosR changed the title Change the default toast duration toasts: make default duration 2s Jun 23, 2020
@XhmikosR XhmikosR added this to Inbox in v5.0.0-alpha2 via automation Jun 23, 2020
@patrickhlauke
Copy link
Member

i'd tend more towards 5s to be honest (would give sufficient time by default for assistive tech to announce a short toast notification without it disappearing mid-reading)

@ysds
Copy link
Member

ysds commented Jun 23, 2020

Personally I prefer 4-5 seconds.

Also, although a little old, this discussion may be helpful jackbsteinberg/std-toast#37

@mdo
Copy link
Member

mdo commented Jul 11, 2020

Let's go with 5s. @rohit2sharma95 Can you make the update, please?

@rohit2sharma95 rohit2sharma95 changed the title toasts: make default duration 2s toasts: make default duration 5s Jul 12, 2020
@rohit2sharma95
Copy link
Collaborator Author

Updated @mdo

@XhmikosR
Copy link
Member

We should add this in Migration too.

v5.0.0-alpha2 automation moved this from Inbox to Approved Jul 12, 2020
@XhmikosR XhmikosR merged commit 91c11d6 into twbs:main Jul 12, 2020
v5.0.0-alpha2 automation moved this from Approved to Shipped Jul 12, 2020
@vanillajonathan
Copy link
Contributor

Android have constants for a long and a short duration, they are 4 seconds for the short toast and 7 seconds for the long toast.

These might be well thought out (or not?) durations backed by UX research.

https://github.com/aosp-mirror/platform_frameworks_base/blob/android10-release/core/java/android/widget/Toast.java#L384

static final long SHORT_DURATION_TIMEOUT = 4000;
static final long LONG_DURATION_TIMEOUT = 7000;

olsza pushed a commit to olsza/bootstrap that referenced this pull request Oct 3, 2020
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v5.0.0-alpha2
  
Shipped
Development

Successfully merging this pull request may close these issues.

Change the default toast duration
8 participants