Skip to content

Conversation

@crisbeto
Copy link
Member

@crisbeto crisbeto commented Jul 27, 2017

Currently the pseudo checkbox both inherits its colors via CSS and has a color input. This means that if we wanted to the keep it in sync with its parent component (e.g. a multi-select), we'd have to add some boilerplate that listens to changes, goes through and updates all of the checkboxes, and triggers change detection while avoiding the "changed after check" assertions.

Since the component is meant to be really lean and to inherit its colors from the parent, these changes remove the color input altogether in order to reduce the complexity and be clearer regarding the intended usage.

Since the same is true for the md-option component, I've removed the md-options.{{ palette }} selectors as well.

Fixes #6079.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 27, 2017
Currently the pseudo checkbox both inherits its colors via CSS and has a `color` input. This means that if we wanted to the keep it in sync with its parent component (e.g. a multi-select), we'd have to add some boilerplate that listens to changes, goes through and updates all of the checkboxes, and triggers change detection while avoiding the "changed after check" assertions.

Since the component is meant to be really lean and to inherit its colors from the parent, these changes remove the `color` input altogether in order to reduce the complexity and be clearer regarding the intended usage.

Since the same is true for the `md-option` component, I've removed the `md-options.{{ palette }}` selectors as well.

Fixes angular#6079.
@crisbeto crisbeto force-pushed the 6079/pseudo-checkbox-theming branch from 8e2be02 to 43da3f4 Compare July 27, 2017 10:20
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

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jul 29, 2017
@tinayuangao tinayuangao merged commit d29fb66 into angular:master Jul 31, 2017
@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 6, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple select (md-select): color attribute does not change for md-pseudo-checkbox

4 participants