Skip to content

Conversation

@avivkeller
Copy link
Member

This PR adds Stability notices to the sidebar ("E" for Experimental, "L" for Legacy, "D" for Deprecated, and nothing for Stable). Additionally, it trims CLI flags and Environment variables down to just their names, similarly to how we do for methods.

image image

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

vercel bot commented Jul 27, 2025

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

Name Status Preview Updated (UTC)
api-docs-tooling ✅ Ready (Inspect) Visit Preview Jul 27, 2025 8:19pm

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 enhances the documentation sidebar by adding stability indicators (badges) to headings and simplifying CLI flag and environment variable names. The changes improve the visual representation of API stability status and make navigation cleaner by showing only essential names.

  • Adds stability badges to headings in the table of contents with visual indicators (E for Experimental, L for Legacy, D for Deprecated)
  • Simplifies CLI flag and environment variable headings to show only the flag/variable name
  • Includes CSS styling for the new stability badges

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/generators/web/ui/components/MetaBar/index.module.css Adds CSS styling for stability badges
src/generators/web/ui/components/MetaBar/index.jsx Implements stability badge rendering logic in the sidebar
src/generators/jsx-ast/utils/buildBarProps.mjs Extracts stability information and simplifies heading names for CLI flags/env vars
Comments suppressed due to low confidence (1)

src/generators/jsx-ast/utils/buildBarProps.mjs:44

  • [nitpick] The variable name 'cliFlagOrEnv' is ambiguous. Consider renaming to 'cliFlagOrEnvMatches' to better indicate it contains regex match results.
  const cliFlagOrEnv = [...data.text.matchAll(/`(-[\w-]+|[A-Z0-9_]+=)/g)];

@codecov
Copy link

codecov bot commented Jul 27, 2025

Codecov Report

❌ Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@a470b27). Learn more about missing BASE report.
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/generators/jsx-ast/utils/buildBarProps.mjs 83.33% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #381   +/-   ##
=======================================
  Coverage        ?   74.51%           
=======================================
  Files           ?      120           
  Lines           ?    11086           
  Branches        ?      696           
=======================================
  Hits            ?     8261           
  Misses          ?     2822           
  Partials        ?        3           

☔ 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

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

LGTM

@avivkeller avivkeller merged commit 53b457d into main Jul 29, 2025
18 checks passed
@avivkeller avivkeller deleted the improve/metabar branch July 29, 2025 16:24
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.

4 participants