-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
chore: resolve some todos #7751
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 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 ReportAll modified and coverable lines are covered by tests ✅
✅ 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. 🚀 New features to boost your workflow:
|
araujogui
left a comment
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.
LGTM
|
Lighthouse Results
|
|
Can someone confirm whether the size difference is a concern? It doesn't seem to have an effect on the final site |
|
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. |


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
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.