-
Notifications
You must be signed in to change notification settings - Fork 608
Evenly space AvatarStack #5911
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
base: main
Are you sure you want to change the base?
Evenly space AvatarStack #5911
Conversation
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
/* stylelint-disable-next-line alpha-value-notation */ | ||
opacity: calc(100% - 4 * var(--opacity-step)); | ||
} | ||
|
||
&:nth-child(n + 6) { |
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.
Maybe this can be variable? Consumers of AvatarStack can decide on the max amount of avatars to show at rest 🤔
} | ||
|
||
&:where([data-avatar-count='3+']) { | ||
/* | ||
MIN-WIDTH CALC FORMULA EXPLAINED: | ||
avatar size ➡️ var(--avatar-stack-size) | ||
plus the visible part of the 2nd avatar ➡️ var(--avatar-stack-size) - var(--overlap-size) | ||
plus the visible part of the 3rd AND 4th avatar ➡️ (var(--avatar-stack-size) - var(--overlap-size-avatar-three-plus)) * 2 |
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.
Currently, the max amount of avatars that can be displayed at rest is 5 - shouldn't the min-width
include the 5th avatar?
👋🏻 Hey @joeoak, thanks for giving this fix a go! Is it ready for review? |
hey @lesliecdubs! I opened this as more of a proposal 😅 - so I think we still need to align on whether this is the right design decision |
Hey, I am on board with the change in general, but would suggested to decrease spacing the more items are added, to reduce the overall size when 4 or 5 Avatars are displayed. |
Changelog
Changed
Proposed:
Risks:
--overlap-size
?Diff:
avatarStack-250409.mp4
Rollout strategy
Testing & Reviewing
Merge checklist