Skip to content

fix(ui): avatar overlap #7834

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
Jun 6, 2025
Merged

fix(ui): avatar overlap #7834

merged 1 commit into from
Jun 6, 2025

Conversation

canerakdas
Copy link
Member

Description

As discussed in the Slack thread;

When there are fewer avatars or when viewed on the blog listing or blog pages, the avatars were not overlapping. With this PR, the issue where the first avatar was getting cut off has been fixed, and now the avatars properly overlap regardless of the number of items

Validation

Before

image image image image

After

image image image image

@Copilot Copilot AI review requested due to automatic review settings June 4, 2025 19:53
@canerakdas canerakdas requested a review from a team as a code owner June 4, 2025 19:53
Copy link

vercel bot commented Jun 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jun 4, 2025 7:54pm

Copy link
Contributor

@Copilot Copilot AI left a 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 fixes an avatar overlap issue by removing the expandable condition and updating the CSS to ensure proper spacing between avatars regardless of their count.

  • Removed the conditional addition of the "expandable" class in AvatarGroup/index.tsx.
  • Updated CSS to use the new "first:ml-0" syntax for adjusting the first avatar's margin.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/ui-components/Common/AvatarGroup/index.tsx Removed conditional "expandable" class to simplify avatar container rendering.
packages/ui-components/Common/AvatarGroup/index.module.css Updated margin settings using new CSS syntax "first:ml-0" for consistent avatar overlap.
Comments suppressed due to low confidence (2)

packages/ui-components/Common/AvatarGroup/index.module.css:11

  • Please verify that the use of the new CSS syntax 'first:ml-0' is fully supported in all target browsers and build environments to avoid potential compatibility issues.
@apply -ml-2
      first:ml-0;

packages/ui-components/Common/AvatarGroup/index.tsx:45

  • Removing the conditional 'expandable' class simplifies the component, but please confirm that this change does not affect the dynamic behavior for different avatar counts, particularly in edge cases with very few or many avatars.
<div className={classNames(styles.avatarGroup, styles[size])}>

Copy link

codecov bot commented Jun 4, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.43%. Comparing base (76b9440) to head (4dc3616).
Report is 12 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ackages/ui-components/Common/AvatarGroup/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7834      +/-   ##
==========================================
- Coverage   75.47%   75.43%   -0.04%     
==========================================
  Files         101      101              
  Lines        8309     8305       -4     
  Branches      218      218              
==========================================
- Hits         6271     6265       -6     
- Misses       2036     2038       +2     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

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

LGTM !

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you, Caner! BTW, I'm more than happy to fast-track this if needed, but there's no real rush here.

@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Jun 5, 2025
@avivkeller avivkeller added github_actions:pull-request Trigger Pull Request Checks and removed github_actions:pull-request Trigger Pull Request Checks labels Jun 5, 2025
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Jun 5, 2025
Copy link
Contributor

github-actions bot commented Jun 5, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🔴 73 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟠 82 🔗
/en/about/previous-releases 🟢 100 🟢 100 🟢 100 🟠 83 🔗
/en/download 🟢 98 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 96 🟢 92 🔗

@avivkeller avivkeller added the github_actions:pull-request Trigger Pull Request Checks label Jun 6, 2025
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Jun 6, 2025
@avivkeller avivkeller enabled auto-merge June 6, 2025 10:52
@avivkeller avivkeller disabled auto-merge June 6, 2025 12:18
@avivkeller avivkeller enabled auto-merge June 6, 2025 12:18
@avivkeller avivkeller added this pull request to the merge queue Jun 6, 2025
Merged via the queue into nodejs:main with commit ed840c2 Jun 6, 2025
27 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants