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
[AvatarGroup] Fix misalignment with non-default spacing #31165
[AvatarGroup] Fix misalignment with non-default spacing #31165
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me!
@sjdemartini Thanks for the fix! Your provided image is all clear. I put a hold on this because it is a breaking change. I think we should try to use the feature flag and be able to merge the breaking change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@siriwatknp sounds good, thanks! Is there anything I need to do as far as the feature flag, or is that something on your end? |
No worries, it is on our end to work on the feature flag or any approach that would help us merge the breaking change without waiting for the next version to happen. |
We have concluded in our internal meeting that we will merge the breaking changes PR (mostly related to styles change) if it fixes a bug. So, I am merging this one! |
Closes #29641
The
marginLeft
style (applied only for customspacing
) should be applied on all but the last element of the group, in order to avoid misalignment of the Avatar children. This makes the non-default spacing (such asspacing="small"
orspacing={10}
) consistent with the behavior of the defaultspacing="medium"
CSS, which leaves the margin-left as-is for the:last-child
.Before
After
(This demo uses default spacing, then
spacing={10}
, thenspacing={-10}
, thenspacing="small"
.)