Skip to content

feat(ripple): support ripple fade-out on pointer up #9694

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

Merged

Conversation

devversion
Copy link
Member

By default, ripples in Angular Material will only fade out if the pointer is released and the enter animation completed. This behavior is similar in the MDC implementation of the Material Design guidelines.

In some scenarios, developers prefer fading out the ripples immediately on pointer release. Similarly the Material Design guidelines also have some videos that show ripples that seem to follow that behavior as well. To be able to provide the necessary flexibility (as we already did with the animation durations), the terminateOnPointerUp global option has been added.

@jelbourn @willshowell I wasn't that sure about the naming of the option, because technically just having terminateonMouseUp is incorrect, because touch events are also supported.

Closes #9577

By default, ripples in Angular Material will only fade out if the pointer is released and the enter animation completed. This behavior is similar in the MDC implementation of the Material Design guidelines.

In some scenarios, developers prefer fading out the ripples immediately on pointer release. Similarly the Material Design guidelines also have some videos that show ripples that seem to follow that behavior as well. To be able to provide the necessary flexibility (as we already did with the animation durations), the `terminateOnPointerUp` global option has been added.

Closes angular#9577
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 30, 2018
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM


// Since the enter duration is bigger than the exit duration, the enter duration timer
// will still exist. To properly finish all timers, we just wait the remaining time.
tick (enterDuration - exitDuration);
Copy link
Member

Choose a reason for hiding this comment

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

Extra space

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Added this PR to release: minor.

@devversion devversion added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Jan 31, 2018
@tinayuangao tinayuangao merged commit efb03c9 into angular:master Feb 1, 2018
@devversion devversion deleted the feat/ripple-terminate-on-pointer-up branch February 1, 2018 19:27
mmalerba pushed a commit to mmalerba/components that referenced this pull request Feb 1, 2018
* feat(ripple): support ripple fade-out on pointer up

By default, ripples in Angular Material will only fade out if the pointer is released and the enter animation completed. This behavior is similar in the MDC implementation of the Material Design guidelines.

In some scenarios, developers prefer fading out the ripples immediately on pointer release. Similarly the Material Design guidelines also have some videos that show ripples that seem to follow that behavior as well. To be able to provide the necessary flexibility (as we already did with the animation durations), the `terminateOnPointerUp` global option has been added.

Closes angular#9577

* Comment improvements

* Remove unnecessary whitespace
@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 8, 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 target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ripple] add terminateOnMouseup option to RippleGlobalOptions
5 participants