Skip to content

Conversation

@mperrotti
Copy link
Contributor

Relates to https://github.com/github/copilot-productivity/issues/3985
An alternative approach: #5705

Benefits of this approach:

  • AvatarStack can now be used on any background color without seeing the var(--bgColor-default) border around each avatar
  • Transparent 3rd, and 4th avatars no longer show n+3 avatars underneath eachother
  • Animates back to "stacked" layout after hovering instead of just snapping immediately into place
  • Uses direction property to remove redundant styles and !important flags

Demos

Both demos are zoomed in x10.

Before

Kapture.2025-02-19.at.17.58.16.mp4

After

Kapture.2025-02-19.at.18.00.52.mp4

Changelog

New

Changed

Replaces z-index and box-shadow AvatarStack styling with mask

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@mperrotti mperrotti requested a review from a team as a code owner February 19, 2025 23:09
@mperrotti mperrotti requested a review from joshblack February 19, 2025 23:09
@changeset-bot
Copy link

changeset-bot bot commented Feb 19, 2025

🦋 Changeset detected

Latest commit: 7b673ca

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Feb 19, 2025
@github-actions
Copy link
Contributor

👋 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!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 19, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 106.11 KB (+0.1% 🔺)
packages/react/dist/browser.umd.js 106.51 KB (+0.22% 🔺)

@ericwbailey
Copy link
Contributor

@mperrotti I reviewed this with macOS VoiceOver, NVDA, and JAWS. CSS' direction does not seem to negatively affect announcements, so I think we're good with this approach from an accessibility perspective!

Copy link
Contributor

@hectahertz hectahertz left a comment

Choose a reason for hiding this comment

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

Soooo nice, and the explanations in the comments were the cherry on top ✨

Comment on lines +129 to +132
// 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Really well explained, thanks

@github-actions github-actions bot temporarily deployed to storybook-preview-5714 February 26, 2025 16:06 Inactive
@joshblack joshblack removed their request for review February 26, 2025 19:34
@mperrotti mperrotti added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Feb 27, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-5714 February 27, 2025 21:25 Abandoned
@primer primer bot requested a review from a team as a code owner February 27, 2025 21:30
@primer primer bot requested a review from langermank February 27, 2025 21:30
@github-actions github-actions bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Feb 27, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-5714 February 27, 2025 21:33 Abandoned
@mperrotti mperrotti added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Feb 28, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-5714 February 28, 2025 16:52 Abandoned
@github-actions github-actions bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Feb 28, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-5714 February 28, 2025 17:03 Abandoned
@primer primer bot temporarily deployed to github-pages February 28, 2025 17:16 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-5714 February 28, 2025 17:16 Inactive
@mperrotti mperrotti added this pull request to the merge queue Mar 4, 2025
@mperrotti mperrotti removed this pull request from the merge queue due to a manual request Mar 4, 2025
@mperrotti mperrotti enabled auto-merge March 4, 2025 16:49
@github-actions github-actions bot requested a deployment to storybook-preview-5714 March 4, 2025 16:51 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-5714 March 4, 2025 17:03 Inactive
@mperrotti mperrotti added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Mar 4, 2025
@github-actions github-actions bot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Mar 4, 2025
@mperrotti mperrotti added this pull request to the merge queue Mar 4, 2025
Merged via the queue into main with commit 0cfafe8 Mar 4, 2025
50 checks passed
@mperrotti mperrotti deleted the mp/rm-zindex-layered-avatars branch March 4, 2025 17:47
@primer primer bot mentioned this pull request Mar 4, 2025
hectahertz pushed a commit that referenced this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants