Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

feature(button): change md-icon-button to use round ripple effect #2460

Conversation

matthewrfindley
Copy link
Contributor

Addresses issue -> #2373.

A breaking change was introduced in 0300c3a. The breaking change removes attach{insert component name}Behavior from $mdInkRipple to seperate the concern of configuring ripple effects for specific component types and the core ripple effect behavior.

This PR could be broken up into 1) implement feature 2) refactor inkRipple if this change is too extreme to bring into the project ATM.

@ThomasBurleson
Copy link
Contributor

Hey @robertmesserle , @matthewrfindley created separate Ripple effect files to simulate inheritance-like solution. Not sure I like this approach.... what are your thoughts ?

@matthewrfindley matthewrfindley force-pushed the feature/md-button-rounded-focus-state branch from 8c4893b to 52840aa Compare April 23, 2015 16:43
@@ -57,7 +57,7 @@ angular
* </md-button>
* </hljs>
*/
function MdButtonDirective($mdInkRipple, $mdTheming, $mdAria, $timeout) {
function MdButtonDirective($mdButtonInkRipple, $mdTheming, $mdAria, $timeout) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I like this approach as opposed to a bunch of boilerplate functions on the original $mdInkRipple

@robertmesserle
Copy link
Contributor

@ThomasBurleson @matthewrfindley I much prefer this approach to our original approach. LGTM!

  BREAKING CHANGE: Removed attach(button|tab|checkbox|list)Behavior
    in favor of composing an injectable ripple service specific to
    your target.  $mdInkRipple was too aware of how to configure
    components.  You now have access to $mdButtonInkRipple,
    $mdTabInkRipple, $mdListInkRipple, $mdCheckboxInkRipple.

  Change your code from this:
    ``` javascript
        function MyService($mdInkRipple) {
          //... Included for brevity
          $mdInkRipple.attachButtonBehavior(scope, element, options);
        }
    ```

  To this:
    ``` javascript
        function MyService($mdButtonInkRipple) {
          //... Included for brevity
          $mdButtonInkRipple.attach(scope, element, options);
        }
    ```
- Removed during a rebase
@matthewrfindley matthewrfindley force-pushed the feature/md-button-rounded-focus-state branch from 80273fc to 82bfa9b Compare May 22, 2015 21:35
@matthewrfindley
Copy link
Contributor Author

@ThomasBurleson this has been rebased.

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

Successfully merging this pull request may close these issues.

3 participants