Skip to content

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

avivkeller
Copy link
Member

Ref: nodejs/node#52343 (comment)
Ref: nodejs/node#52343 (comment)

This PR renames MJS to ESM, and adds a (1) (etc) when multiple identically titled codetabs are used.
image

@Copilot Copilot AI review requested due to automatic review settings July 19, 2025 18:55
@avivkeller avivkeller requested a review from a team as a code owner July 19, 2025 18:55
Copy link

vercel bot commented Jul 19, 2025

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

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jul 19, 2025 7:04pm

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 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

Copy link

codecov bot commented Jul 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.13%. Comparing base (a008bed) to head (4ebd32c).

✅ 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.
📢 Have feedback on the report? Share it here.

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Aviv Keller <[email protected]>
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.

LGMT ! Do we have test for this component ?

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.

3 participants