-
Notifications
You must be signed in to change notification settings - Fork 625
Add variant
& shape
props to AvatarStack
component
#6420
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
Conversation
🦋 Changeset detectedLatest commit: ac76175 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
👋 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 📦
|
* Select between `cascade` (default) and `stack` * Keep existing functionality as default and move new changes to be part of `stack` variant
AvatarStack
and remove opacityvariant
& shape
props to AvatarStack
component to control spacing/opacity and shape for avatars
variant
& shape
props to AvatarStack
component to control spacing/opacity and shape for avatarsvariant
& shape
props to AvatarStack
component
Uh oh! @chanakyav, at least one image you shared is missing helpful alt text. Check #6420 (comment) to fix the following violations:
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
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.
Pull Request Overview
This PR adds variant and shape customization options to the AvatarStack
component to provide more flexible rendering styles.
Key changes:
- Added
variant
prop with optionscascade
(default) andstacked
for different avatar spacing and opacity behaviors - Added
shape
prop with optionscircle
(default) andsquare
to control avatar shape rendering - Updated CSS to support the new variant and shape combinations with appropriate styling rules
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
AvatarStack.tsx |
Added new props and logic to pass shape to child avatars |
AvatarStack.module.css |
Extensive CSS updates for variant/shape combinations and styling rules |
AvatarStack.test.tsx.snap |
Updated snapshot to reflect new CSS classes and data attributes |
Popover/__snapshots__/Popover.test.tsx.snap |
Removed all snapshot content (unrelated to PR purpose) |
Link/__tests__/__snapshots__/Link.test.tsx.snap |
Removed all snapshot content (unrelated to PR purpose) |
Please inform me when this gets merged so we can update the Figma component as well. |
Note
Changelog
Added/Changed
This PR adds new functionality to the
AvatarStack
component through 2 new props:variant
&shape
variant
- Options:cascade
(default) &stacked
. Cascade will retain the existing functionality with respect to spacing and opacity. The stacked option will more evenly space out the avatars and remove the opacity for them.shape
- Options:circle
(default) &square
. The new square option will render the avatars as squares by passing thesquare
prop down to the avatar children components.AvatarStack
withshape='circle'
and varying avatar counts, and alignments:Screen.Recording.2025-08-04.at.10.50.15.AM.mov
AvatarStack
withshape='square'
and varying avatar counts, and alignments:Screen.Recording.2025-08-04.at.10.52.00.AM.mov
Rollout strategy
Testing & Reviewing
Merge checklist