Skip to content

Conversation

@avivkeller
Copy link
Member

Description

This PR resolves some TODOs that were pending upstream changes, since said changes have now occurred.

Validation

The TODO resolutions should not cause any regressions.

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

Copilot AI review requested due to automatic review settings May 15, 2025 20:52
@avivkeller avivkeller requested review from a team as code owners May 15, 2025 20:52
@vercel
Copy link

vercel bot commented May 15, 2025

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview May 15, 2025 8:53pm

Copy link
Contributor

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 resolves pending TODOs by removing legacy image handling and outdated props following upstream changes.

  • Removes the unused "img" prop from various Avatar components and their related overlays.
  • Eliminates legacy image utility functions and tests to adopt new image optimization approaches.
  • Updates dependencies and Next.js configuration to include Radix UI's Avatar component.

Reviewed Changes

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

Show a summary per file
File Description
packages/ui-components/package.json Added dependency for Radix UI Avatar.
packages/ui-components/Common/AvatarGroup/index.tsx Removed the unused "img" prop and related type imports.
packages/ui-components/Common/AvatarGroup/Overlay/index.tsx Removed "img" prop usage in AvatarOverlay.
packages/ui-components/Common/AvatarGroup/Avatar/index.tsx Replaced the legacy Avatar primitive with Radix UI's implementation and removed "img".
apps/site/util/imageUtils.ts Removed legacy image utility function.
apps/site/util/tests/imageUtils.test.mjs Removed tests related to the legacy image utility function.
apps/site/next.config.mjs Added Radix UI Avatar to the optimized transpilation/external list.
apps/site/components/withAvatarGroup.tsx Removed the "img" prop passed to AvatarGroup, aligning with Avatar changes.
apps/site/components/MDX/Image/index.tsx Removed the condition for the "unoptimized" image property in MDXImage.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

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

  • The removal of the 'img' prop in AvatarGroup is a breaking change for any external consumer expecting to customize the image rendering. Consider documenting this change explicitly in the release notes.
-  img?: ElementType | 'img';

apps/site/components/MDX/Image/index.tsx:13

  • The removal of the 'unoptimized' property in MDXImage streamlines the code but may affect image rendering behavior. Consider updating the component documentation and tests to confirm that the new behavior aligns with the intended image optimization strategy.
-        unoptimized={isUnoptimizedImage}

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.93%. Comparing base (479f73b) to head (324fef8).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7751      +/-   ##
==========================================
+ Coverage   74.87%   74.93%   +0.06%     
==========================================
  Files          98       97       -1     
  Lines        7895     7860      -35     
  Branches      200      198       -2     
==========================================
- Hits         5911     5890      -21     
+ Misses       1983     1969      -14     
  Partials        1        1              

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@araujogui araujogui left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

github-actions bot commented May 16, 2025

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 100 🟢 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 🟢 99 🟢 100 🟢 96 🟢 92 🔗

@avivkeller
Copy link
Member Author

avivkeller commented May 16, 2025

Can someone confirm whether the size difference is a concern? It doesn't seem to have an effect on the final site

@bjohansebas
Copy link
Member

Can someone confirm whether the size difference is a concern

I don't see a big difference in the build size for us to worry about it, it's only 2KB more, and that's just on a single page compared to the main build.

main:
imagen
this pr:
imagen

@avivkeller
Copy link
Member Author

I meant the size of the icon, sorry I wasn't very clear 🤣. In chromatic it looks smaller, but this behavior is technically the correct one IIUC, as it defaults to the "small" setting.

@avivkeller avivkeller added this pull request to the merge queue May 17, 2025
Merged via the queue into main with commit c353780 May 17, 2025
15 of 17 checks passed
@avivkeller avivkeller deleted the chore/resolve-todos branch May 17, 2025 13:22
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.

8 participants