Skip to content

fix(chips): disabled state not matching specs #13272

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

@devversion devversion commented Sep 23, 2018

  • Currently if chips are disabled with the spec 2018 alignment, it's not clear whether a chip is disabled or not. The chip still has a focus effect, hover effect and pointer cursor for the mat-chip-remove.
  • Also moves the @include mat-elevation to the theme (probably introduced before: feat(elevation): move elevation rules into theme stylesheets #11344 has been merged)

@devversion devversion added P2 The issue is important to a large percentage of users, with a workaround target: major This PR is targeted for the next major release labels Sep 23, 2018
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 23, 2018
@@ -150,6 +146,17 @@ $mat-chip-remove-size: 18px;
}
}

.mat-standard-chip.mat-chip-disabled {
Copy link
Member

Choose a reason for hiding this comment

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

This can be moved up into the .mat-standard-chip styles so all the standard chip styling is in the same place.

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.

&:focus {
@include _mat-theme-elevation(3, $theme);
&:not(.mat-chip-disabled) {
&:focus, &:active {
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the spec again, focused chips aren't supposed to have an elevation, but rather a darker overlay:

spec

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I can change that while being at it. Should I also make the overlay darker if focused?

Copy link
Member

Choose a reason for hiding this comment

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

Sure.

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. The darker overlay if focused is already added to the chips.

@devversion devversion force-pushed the fix/chips-disabled-state-match-specs branch from eac3dce to 2013153 Compare September 24, 2018 09:26
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Sep 24, 2018
@jelbourn jelbourn added blocked This issue is blocked by some external factor, such as a prerequisite PR and removed action: merge The PR is ready for merge by the caretaker labels Sep 24, 2018
@devversion devversion added target: patch This PR is targeted for the next patch release and removed target: major This PR is targeted for the next major release labels Oct 19, 2018
@jelbourn jelbourn removed blocked This issue is blocked by some external factor, such as a prerequisite PR labels Nov 2, 2018
@devversion devversion added the action: merge The PR is ready for merge by the caretaker label Nov 3, 2018
@devversion devversion force-pushed the fix/chips-disabled-state-match-specs branch from 2013153 to 3022b8b Compare November 8, 2018 23:09
* Currently if chips are disabled with the spec 2018 alignment, it's not clear whether a chip is disabled or not. The chip still has a focus effect, hover effect and pointer cursor for the `mat-chip-remove`.
* Also moves the `@include mat-elevation` to the theme (probably introduced before: angular#11344 has been merged)
@devversion devversion force-pushed the fix/chips-disabled-state-match-specs branch from 3022b8b to 662abab Compare November 10, 2018 10:17
@andrewseguin andrewseguin merged commit 60e0d88 into angular:master Nov 14, 2018
josephperrott pushed a commit that referenced this pull request Nov 19, 2018
* Currently if chips are disabled with the spec 2018 alignment, it's not clear whether a chip is disabled or not. The chip still has a focus effect, hover effect and pointer cursor for the `mat-chip-remove`.
* Also moves the `@include mat-elevation` to the theme (probably introduced before: #11344 has been merged)
@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 10, 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 P2 The issue is important to a large percentage of users, with a workaround target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants