-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Proposal: Provide public access to a button's ripple #4179
Comments
Thinking about a good way to expose the ripple instance.. Any ideas already? |
Why not just a public |
Hm yeah. We might be able to just make that public. For most of the components like Need to discuss this first with @jelbourn. Not sure if we should expose the underlying ripple instance. |
The |
Basically for components like the For buttons it will be a bit more weird because the ripples don't launch from the |
I think I see the difficulty. With a normal button, if you just used It would seem ideal to be able to pass an override config through this.button.ripple.launch(0, 0, { centered: true }); Overall, I agree with @jelbourn that the api could/should be simplified. It isn't exactly clear how |
@willshowell Exactly, the ripple would render from the top-left. And regarding positioning, I personally think that such positioning stuff shouldn't be part of the ripple service. The service was designed to be very low-level since it is mostly used internal. What I think would be a better way, is like a TypeScript mixin (e.g #3944) that will provide a custom This mixin could be responsible for more API-friendly ways of launching ripples on a component. Although I still don't think that we should provide APIs for |
Big fan of the mixins idea! |
* Exposes the `MatRipple` instance of the button as a public property. This can be used to show ripple indicators for feature discoveries as seen on the Specs (https://material.io/guidelines/growth-communications/feature-discovery.html#feature-discovery-design-patterns). Quote from the specs "Ripples guide users through subsequent steps". Closes angular#4179
* 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)
* 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)
* 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)
* Exposes the `MatRipple` instance of the button as a public property. This can be used to show ripple indicators for feature discoveries as seen on the Specs (https://material.io/guidelines/growth-communications/feature-discovery.html#feature-discovery-design-patterns). Quote from the specs "Ripples guide users through subsequent steps". Closes #4179
* Exposes the `MatRipple` instance of the button as a public property. This can be used to show ripple indicators for feature discoveries as seen on the Specs (https://material.io/guidelines/growth-communications/feature-discovery.html#feature-discovery-design-patterns). Quote from the specs "Ripples guide users through subsequent steps". Closes angular#4179
* 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)
Exposes the `MatRipple` instance of the button as a public property. This can be used to show ripple indicators for feature discoveries as seen on the Specs (https://material.io/guidelines/growth-communications/feature-discovery.html#feature-discovery-design-patterns). Quote from the specs "Ripples guide users through subsequent steps". Closes #4179
* 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)
* 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 #4179 (comment)) * Disables ripples for most of the demo buttons in the ripple demo (allows better debugging; when pressing the buttons)
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. |
Bug, feature request, or proposal:
Proposal
What is the proposed behavior?
Public access to the MdRipple within a button, nav-list-item, etc
What is the use-case or motivation?
I'd like to programmatically trigger a button's ripple to call attention to it. Under feature discovery, there is discussion of using ripples to guide users through flows: "Ripples guide users through subsequent steps".
Currently, there is no good way (if any?) to access the button's ripple. I suppose I could create a new rippled component and position and mask it correctly, but that seems needlessly complex.
The text was updated successfully, but these errors were encountered: