Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #644 +/- ##
==========================================
+ Coverage 75.90% 75.93% +0.02%
==========================================
Files 145 147 +2
Lines 13735 13910 +175
Branches 992 1001 +9
==========================================
+ Hits 10426 10562 +136
- Misses 3303 3342 +39
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
| File | Base | Head | Diff |
|---|---|---|---|
documentation.html |
36.92 KB | 50.38 KB | +13.46 KB (+36.44%) |
documentation.js |
9.74 KB | 21.57 KB | +11.83 KB (+121.41%) |
styles.css |
137.01 KB | 141.80 KB | +4.79 KB (+3.50%) |
index.js |
9.69 KB | 9.70 KB | +15.00 B (+0.15%) |
embedding.js |
37.29 KB | 37.30 KB | +5.00 B (+0.01%) |
intl.js |
37.08 KB | 37.08 KB | +5.00 B (+0.01%) |
synopsis.js |
15.72 KB | 15.72 KB | +5.00 B (+0.03%) |
There was a problem hiding this comment.
Pull request overview
Introduces a “Stability Overview” table to the new web generator output, mirroring the legacy generator’s ability to render a stability summary on the “About”/documentation page when slot tags are present.
Changes:
- Add
StabilityOverviewUI component (CSS + JSX) and register it inwebJSX import mapping. - Precompute and pass stability overview entries through the
jsx-astgenerator pipeline, injecting the table when the slot tag is present. - Ensure the
webgenerator creates the output directory before writing HTML/JS/CSS artifacts.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/generators/web/ui/components/StabilityOverview/index.module.css | Adds minimal layout styling for the stability overview table and badge cell. |
| src/generators/web/ui/components/StabilityOverview/index.jsx | Implements the stability overview table UI using Badge tooltips. |
| src/generators/web/generate.mjs | Creates config.output directory before emitting generated files. |
| src/generators/web/constants.mjs | Registers StabilityOverview in JSX_IMPORTS for bundling/import generation. |
| src/generators/jsx-ast/utils/buildContent.mjs | Threads stability overview entries through processEntry and injects the component when slot tags are present. |
| src/generators/jsx-ast/generate.mjs | Precomputes stability overview data once and passes it to workers via the extra stream context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
avivkeller
left a comment
There was a problem hiding this comment.
I wonder if adding stability to the sidebar would be better?
It's should be on toc ? it's already |
I wonder if Aviv meant completely being there or maybe always being there? Although that seems a discussion for another issue. |
|
|
||
| const STABILITY_KINDS = ['error', 'warning', 'default', 'info']; | ||
|
|
||
| /** |
There was a problem hiding this comment.
if we remove it es-lint ask for it but it's doesn't require any jsdoc
| .filter(node => node.stability?.children?.length) | ||
| .map(({ api, heading, stability }) => { | ||
| const [{ data }] = stability.children; | ||
| return { |
There was a problem hiding this comment.
Could this map fn be moved to a dedicated function and be unit tested? Thanks!
|
|
||
| // Pre-compute stability overview data once — avoid serialising full AST nodes to workers | ||
| const stabilityOverviewEntries = headNodes | ||
| .filter(node => node.stability?.children?.length) |
There was a problem hiding this comment.
| .filter(node => node.stability?.children?.length) | |
| .filter(node => !!node.stability?.children?.length) |
| ); | ||
|
|
||
| // Inject the stability overview table where the slot tag is present | ||
| if ( |
There was a problem hiding this comment.
I wonder how optimal this is... I wonder if a visit statement is better here, I also kinda dislike this method of inserting the stability index.
There was a problem hiding this comment.
This method would make sense for legacy docs. For the new docs, this method isn't really acceptable. The stability overview must be a React component now for the web generator, and all that we must do here is replace the STABILITY_OVERVIEW_SLOT_BEGIN or IDK with a slot for the component.
This would also make it easier to maintain the component.
i do that but aviv ask for AST approach #644 (comment) So what should I do ? |
Description
introduce stability overview on new web generator
Validation
It's should be cool 😎
Related Issues
Close #357
Check List
node --run testand all tests passed.node --run format&node --run lint.