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(snack-bar): add content fade in animation #7504

Merged
merged 3 commits into from
Oct 6, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Oct 3, 2017

Adds a subtle fade in animation to the snack bar content.

Fixes #7502.

Adds a subtle fade in animation to the snack bar content.

Fixes angular#7502.
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 3, 2017
@@ -23,7 +24,15 @@ import {MAT_SNACK_BAR_DATA} from './snack-bar-config';
encapsulation: ViewEncapsulation.None,
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [
trigger('contentFade', [
state('void', style({opacity: '0'})),
Copy link
Member

Choose a reason for hiding this comment

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

I think you can just use :enter instead of having to manage states.

trigger('contentFade', [
state('void', style({opacity: '0'})),
state('visible', style({opacity: '1'})),
transition('void => visible', animate('350ms linear'))
Copy link
Member

Choose a reason for hiding this comment

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

Should we use the animations from core?

`${AnimationCurves.STANDARD_CURVE} ${AnimationDurations.ENTERING}`

Copy link
Contributor

Choose a reason for hiding this comment

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

Does that work now with AOT? I thought string interpolation in animation broke it.

Copy link
Member Author

Choose a reason for hiding this comment

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

That comment is pretty old. It seems to work with AoT now.

@crisbeto
Copy link
Member Author

crisbeto commented Oct 4, 2017

Addressed the feedback @josephperrott, PTAL. One note: I'm not too sure about using the COMPLEX animation duration, but all of the others were too short.

@josephperrott
Copy link
Member

Yeah, what we likely would like to do is delay the start of the animation by ~100ms so that it times better, but I think that increasing the overall length will work just as well.

@josephperrott josephperrott added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed in progress labels Oct 6, 2017
@kara
Copy link
Contributor

kara commented Oct 6, 2017

@crisbeto Linter?

@kara kara removed the action: merge The PR is ready for merge by the caretaker label Oct 6, 2017
@kara kara assigned crisbeto and unassigned josephperrott Oct 6, 2017
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Oct 6, 2017
@crisbeto
Copy link
Member Author

crisbeto commented Oct 6, 2017

Fixed.

@kara kara merged commit 2b9c470 into angular:master Oct 6, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(Snackbar): Content of snackbar has no fade in animation
5 participants