-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat(ripple): support animation duration overwrites #9253
feat(ripple): support animation duration overwrites #9253
Conversation
a9c8487
to
a72537b
Compare
a72537b
to
094265c
Compare
* There are two animation phases with different durations for the ripples. | ||
*/ | ||
export interface RippleAnimationConfig { | ||
/** Duration in milliseconds for the enter animation. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you expand the comment a bit more to describe what constitutes "enter animation" and "exit animation"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@devversion passes Google presubmit, just needs rebase |
0cd5635
to
1230e5e
Compare
@jelbourn Done. |
@devversion can you rebase again? Conflicted with your other PR for radio buttons that got merged first |
* Adds a new option to the ripples that allows developers to have a better control of the animation (all ripples, or even individual ripples). * Deprecates the `matRippleSpeedFactor` in favor of the `matRippleAnimation` binding that accepts a `RippleAnimationConfig`. The configuration is more explicit, clean and not confusing as the `speedFactor`. * To provide a more user-friendly `launch()` method API, the passed ripple config will extend the default ripple config from the `MatRipple` instance (removes unnecessary bloat; requested in angular#4179 (comment)) * Disables ripples for most of the demo buttons in the ripple demo (allows better debugging; when pressing the buttons)
1230e5e
to
ea98b5d
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds a new option to the ripples that allows developers to have a better control of the animation (all ripples, or even individual ripples).
Deprecates the
matRippleSpeedFactor
in favor of thematRippleAnimation
binding that accepts aRippleAnimationConfig
. The configuration is more explicit, clean and not confusing as thespeedFactor
.To provide a more user-friendly
launch()
method API, the passed ripple config will extend the default ripple config from theMatRipple
instance (removes unnecessary bloat; requested in Proposal: Provide public access to a button's ripple #4179 (comment))Disables ripples for most of the demo buttons in the ripple demo (allows better debugging; when pressing the buttons)
Text from the ripple overview (Disabling animation)
The animation of ripples can be disabled by using the
animation
global option. If theenterDuration
andexitDuration
is being set to0
, ripples will just appear without anyanimation.
This is specifically useful in combination with the
disabled
global option, because globallydisabling ripples won't affect the focus indicator ripples. If someone still wants to disable
those ripples for performance reasons, the duration can be set to
0
, to remove the ripple feel.