-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
fix(CodeTabs): name overrides, duplicate name titles #7994
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
base: main
Are you sure you want to change the base?
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 improves the CodeTabs component by implementing name overrides (renaming "MJS" to "ESM") and handling duplicate tab names by appending count suffixes like "(1)", "(2)".
Key changes:
- Adds a NAME_OVERRIDES mapping to standardize language display names
- Implements duplicate name detection and numbering system
- Refactors tab label generation logic to handle both overrides and duplicates
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 #7994 +/- ##
==========================================
- Coverage 73.15% 73.13% -0.02%
==========================================
Files 95 95
Lines 8354 8354
Branches 218 218
==========================================
- Hits 6111 6110 -1
- Misses 2242 2243 +1
Partials 1 1 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Copilot <[email protected]> Signed-off-by: Aviv Keller <[email protected]>
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.
LGMT ! Do we have test for this component ?
Ref: nodejs/node#52343 (comment)
Ref: nodejs/node#52343 (comment)
This PR renames

MJS
toESM
, and adds a(1)
(etc) when multiple identically titled codetabs are used.