Skip to content

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 force-pushed the single-selection-list-color branch from d19f3b7 to e720d89 Compare December 3, 2022 08:46
@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.

3 participants