feat(metabar): improve headings and add stability#381
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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.