chore: prop adjustment for single character Badges#8564
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/nodejs-website Please review the changes when you have a chance. Thank you! 🙏 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8564 +/- ##
==========================================
+ Coverage 74.96% 75.01% +0.04%
==========================================
Files 103 103
Lines 9037 9037
Branches 312 311 -1
==========================================
+ Hits 6775 6779 +4
+ Misses 2260 2256 -4
Partials 2 2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Pull request overview
This PR removes the explicit circular prop from the Badge component and replaces it with automatic detection based on content length. When a Badge contains a single-character string, it automatically applies circular styling with monospace font.
Changes:
- Removed the
circularprop from Badge component's TypeScript interface - Implemented automatic circular badge detection for single-character strings
- Updated Badge stories to remove explicit
circularprop usage - Bumped package version from 1.5.7 to 1.5.8
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/ui-components/src/Common/Badge/index.tsx | Removed circular prop and replaced with automatic detection logic based on string length |
| packages/ui-components/src/Common/Badge/index.stories.tsx | Removed circular prop from story configurations while maintaining single-character examples |
| packages/ui-components/package.json | Incremented package version for the change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Fast-tracking, cc @nodejs/nodejs-website |
Description
Follow up pr for #8561, adresses #8561 (comment)