Skip to content

feat(list): allow avatar in selection list options #10316

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
merged 1 commit into from
Jul 3, 2018

Conversation

tinayuangao
Copy link
Contributor

Closes #10192

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 7, 2018
@tinayuangao tinayuangao added the target: patch This PR is targeted for the next patch release label Mar 7, 2018
// Reversed content is mainly used by the MatSelectionList for displaying the checkbox at the
// end of the list option. If avatar is the 4th item, it means the list-item has both checkbox
// and avatar-icon. There needs to be a padding for the mat-list-avatar on the end-side.
.mat-list-item-content-reverse .mat-list-avatar:nth-child(4) {
Copy link
Member

Choose a reason for hiding this comment

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

These selectors seem brittle. If the user has a display: none element somewhere inbetween, it'll throw everything off. You could work around it by setting a class on the avatar instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added padding to .mat-list-text instead and removed the :not(:nth-child(2)) since it's hard to override.

.mat-list-item-content-reverse .mat-list-text:not(:nth-child(2)) {
padding-left: 0;
padding-right: $mat-list-side-padding;
.mat-list-item-content-reverse .mat-list-text {
Copy link
Member

Choose a reason for hiding this comment

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

Why delete the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accidentally deleted. Reverted the change.

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 target: minor This PR is targeted for the next minor release labels Mar 10, 2018
@mmalerba
Copy link
Contributor

@tinayuangao needs rebase, reapply merge ready when done

@mmalerba mmalerba removed the action: merge The PR is ready for merge by the caretaker label Apr 18, 2018
@Timebutt
Copy link

Can this be merged? Looks like the Travis CI build needs to be retried and the merge conflicts fixed.

@CDDelta
Copy link

CDDelta commented Jun 13, 2018

It's been a while. Can this be rebased and merged? Thanks!

@tinayuangao tinayuangao added the action: merge The PR is ready for merge by the caretaker label Jun 20, 2018
@mmalerba mmalerba merged commit 20cbdba into angular:master Jul 3, 2018
@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 9, 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 target: minor This PR is targeted for the next minor release target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mat-list-option does not select mat-list-avatar
7 participants