Skip to content
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

fix(material/list): align color scheme between single and multi selection list #26074

Merged
merged 1 commit into from Dec 5, 2022

Conversation

crisbeto
Copy link
Member

MDC has the mdc-list-item--selected class which we were setting only on single selection mat-list-option to indicate using color that they're selected. After the recent change to indicate selection using a radio button, these look weird because the radio button inherits the list item theme palette while the background of the item stays as primary.

For reference:
Screenshot 2022-11-24 at 09 33 20

These changes resolve the issue by treating single selection and multi-selection lists the same.

Note: an alternative I was considering was to change the color so that it matches the radio button color, but then the appearance of the single selection list would be inconsistent with the multi-selection list.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Nov 24, 2022
@crisbeto crisbeto requested a review from zarend November 24, 2022 08:45
@crisbeto crisbeto self-assigned this Nov 28, 2022
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Dec 3, 2022
…tion list

MDC has the `mdc-list-item--selected` class which we were setting only on single selection `mat-list-option` to indicate using color that they're selected. After the recent change to indicate selection using a radio button, these look weird because the radio button inherits the list item theme palette while the background of the item stays as `primary`.

These changes resolve the issue by treating single selection and multi-selection lists the same.

**Note:** an alternative I was considering was to change the color so that it matches the radio button color, but then the appearance of the single selection list would be inconsistent with the multi-selection list.
@crisbeto crisbeto added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Dec 5, 2022
@crisbeto crisbeto merged commit 5b57863 into angular:main Dec 5, 2022
wagnermaciel pushed a commit to wagnermaciel/components that referenced this pull request Dec 9, 2022
…tion list (angular#26074)

MDC has the `mdc-list-item--selected` class which we were setting only on single selection `mat-list-option` to indicate using color that they're selected. After the recent change to indicate selection using a radio button, these look weird because the radio button inherits the list item theme palette while the background of the item stays as `primary`.

These changes resolve the issue by treating single selection and multi-selection lists the same.

**Note:** an alternative I was considering was to change the color so that it matches the radio button color, but then the appearance of the single selection list would be inconsistent with the multi-selection list.
@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 Jan 5, 2023
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 P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants