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

fix(list): add ripple, inherit from .md-button #2395

Closed
wants to merge 1 commit into from

Conversation

marcysutton
Copy link
Contributor

Updates interaction styles of list controls to attach ripple on click of list items with proxy controls, and makes child primary & secondary icon buttons into md-button elements. This allows for correct icon button dimensions and mouse/focus behavior to be extended to list controls.

Updates interaction styles of list controls to attach ripple on click of list items with proxy controls, and makes child primary & secondary icon buttons into md-button. This allows for correct dimensions and mouse/focus behavior to be extended to list controls.
@ajoslin ajoslin added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Apr 17, 2015
@ThomasBurleson
Copy link
Contributor

The click on the switch does not ripple the row... yet the checkbox-click does. Bug ?

@ThomasBurleson
Copy link
Contributor

I really like this UX now.

@@ -189,6 +198,8 @@ function mdListItemDirective($mdAria, $mdConstant) {
function computeClickable() {
if (proxies.length || $element[0].firstElementChild.hasAttribute('ng-click')) {
$element.addClass('md-clickable');

ctrl.attachRipple($scope, angular.element($element[0].querySelector('.md-no-style')));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why .md-clickable and .attachRipple() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the only thing .md-clickable does is add the pointer cursor in CSS.

@marcysutton
Copy link
Contributor Author

The "Clickable Items with Secondary Controls" demo shows the switch as a secondary item, so it wouldn't highlight the whole row on click. It contrasts with the first controls demo, where the checkbox is the only action, and it can be toggled by clicking on the row.

@ajoslin ajoslin removed the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Apr 17, 2015
@marcysutton marcysutton deleted the wip-listcontrol-highlight branch April 24, 2015 18:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants