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

fix fade animation for toast #27792

Merged
merged 2 commits into from
Dec 10, 2018
Merged

fix fade animation for toast #27792

merged 2 commits into from
Dec 10, 2018

Conversation

Johann-S
Copy link
Member

@Johann-S Johann-S commented Dec 6, 2018

Fixes: #27779

@ysds
Copy link
Member

ysds commented Dec 6, 2018

I think it is nice to have animation when showing too.

@Johann-S
Copy link
Member Author

Johann-S commented Dec 6, 2018

I'm a bit mix matched about that 🤔 IMO a toast should be visible ASAP so the animation will slower the display

@ysds
Copy link
Member

ysds commented Dec 6, 2018

Yes, let's allow the same approach as modal. https://getbootstrap.com/docs/4.1/components/modal/#remove-animation

@Johann-S
Copy link
Member Author

Johann-S commented Dec 6, 2018

it work as the same of our Modal plugin, if you remove the fade class or set animation to false you won't have any animation.

@MartijnCuppens
Copy link
Member

IMO a toast should be visible ASAP so the animation will slower the display

I'm following Johann here. Toasts & modals both have a different purpose.

@MartijnCuppens
Copy link
Member

@Johann-S, can you also remove the toasts from the DOM like we do with the alerts (https://deploy-preview-27792--twbs-bootstrap4.netlify.com/docs/4.1/components/alerts/#dismissing)?

The problem with not removing them is that there's a margin above the second toast if we dismiss the first: https://deploy-preview-27792--twbs-bootstrap4.netlify.com/docs/4.1/components/toasts/#stacking

@ysds
Copy link
Member

ysds commented Dec 7, 2018

The major OS's notification UI components have animation when display.

  • iOS / macOS: Notification
  • Android: Snackbar
  • Windows: Balloon

It is OK that there is no animation at default, but it should be allowed customization IMO.

@MartijnCuppens
Copy link
Member

Ow, I like that customizable idea!

@XhmikosR
Copy link
Member

XhmikosR commented Dec 7, 2018

Maybe we should merge this and make it customizable in a another PR?

@MartijnCuppens
Copy link
Member

@XhmikosR, this is still an issue: #27792 (comment)

Copy link
Member

@MartijnCuppens MartijnCuppens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XhmikosR
Copy link
Member

XhmikosR commented Dec 8, 2018

@MartijnCuppens Not a blocker to me, at least.

@MartijnCuppens MartijnCuppens dismissed their stale review December 10, 2018 08:20

Removing from DOM will be handled in other ticket (#27807)

@Johann-S
Copy link
Member Author

The customization of the show animation can be tackled in an other PR, so we should merge this one, except if you have any other concerns ?

Copy link
Member

@MartijnCuppens MartijnCuppens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rafalp
Copy link

rafalp commented Dec 10, 2018

If every UI item has fade-in animation, but toast doesn't, you'll get the clunky feeling.

On the other side, 300ms animation is hardly a delay that would break the world, especially in the web app that already deals with latency because it may be waiting for API response, pooling the backend for events, using features like refetchInterval={} that separate user seconds away from learning something.

@Johann-S
Copy link
Member Author

Alert don't have fade-in animation too.

I don't understand your second point 😟 The animation delay can be changed but I don't think it's what you mean 🤔

@Johann-S Johann-S merged commit 1f4d790 into v4-dev Dec 10, 2018
@Johann-S Johann-S deleted the v4-dev-jo-toast-animation branch December 10, 2018 09:38
@mdo mdo mentioned this pull request Dec 10, 2018
@rafalp
Copy link

rafalp commented Dec 10, 2018

@Johann-S

I don't understand your second point 😟 The animation delay can be changed but I don't think it's what you mean 🤔

My point is: web applications are not always realtime, most events are signalized to user with delay, so thinking that component animation is a problem is misguided. ;)

@Johann-S
Copy link
Member Author

Oh ok now I understand 👍
That's true, but folks can enable/disable that animation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants