feat(site): feature and preset reference UI + docs integration#1258
feat(site): feature and preset reference UI + docs integration#1258
Conversation
…tion Wire feature and preset pipelines into the api-docs-builder entry point, create Zod schemas and content collections, build FeatureReference and PresetReference Astro components, update the remark plugin for TOC injection, and replace all hand-written tables in 11 feature pages + presets.mdx + skins.mdx with generated references. - Fix preset handler to resolve `export *` re-exports (React skins) - FeatureReference renders ## API Reference > ### State > ### Actions - PresetReference renders framework-aware tables with feature cross-links - Feature pages: drop <UtilReference>, change ## Selector to ### Selector Closes #1246 Closes #1247 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (7)
Players (3)
Skins (17)
UI Components (23)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (6)
Skins (14)
UI Components (19)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (8)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (3)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 220870b. Configure here.
| successCount++; | ||
| } | ||
|
|
||
| log.info(`Done! Generated ${featureResults.length} feature files.`); |
There was a problem hiding this comment.
Log messages overcount generated feature and preset files
Low Severity
The "Done!" log messages for features and presets currently report the total items found, using featureResults.length and presetResults.length. This differs from component and util logging, which track successful generations. As a result, these messages can overstate the number of files actually written if validation errors occur.
Reviewed by Cursor Bugbot for commit 220870b. Configure here.
| description={def.description} | ||
| componentName={featureName} | ||
| /> | ||
| )) |
There was a problem hiding this comment.
Actions table rows get wrong IDs from StateRow
Medium Severity
The ApiActionsTable component incorrectly reuses StateRow, causing action entries to generate DOM IDs like ${componentName}-state-${name} instead of ${componentName}-action-${name}. This leads to incorrect anchor links, misleading ARIA semantics, and a potential for duplicate IDs if a feature has a state and an action with the same name.
Reviewed by Cursor Bugbot for commit 220870b. Configure here.
Replace 3 separate per-preset tables with a single combined table using the existing disclosure row pattern. Click to expand shows feature bundle, linked features, skins, and media element (all framework-aware). - Add description field to PresetReference (extracted from file-level JSDoc) - Add JSDoc descriptions to all 6 preset source files (3 HTML + 3 React) - PresetReference loads all presets via getCollection (zero-config in MDX) - Add e2e test for preset description extraction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Change first column from "Preset: /video" to "Import: @videojs/react/video" (framework-aware via Astro.params) - Fix JSX whitespace gaps in comma-separated feature and skin lists - Show '–' when a preset has no features (e.g., background) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use framework-aware import paths in overview and presets intro - Move preset intro text inside FrameworkCase for per-framework paths - Reword skins-to-presets prose for clarity Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>


Summary
export *re-exports (React skins were missing)feature-reference.ts,preset-reference.ts) and content collections<FeatureReference>component (renders ## API Reference > ### State table > ### Actions table)<PresetReference>component (framework-aware tables with cross-linked feature names)<ApiActionsTable>component andfeatureReferenceModel.jsfor TOC injectionremarkConditionalHeadings.jsto handle<FeatureReference>for TOC<FeatureReference>presets.mdxandskins.mdxwith<PresetReference><UtilReference>from feature pages (selector API ref not useful enough)Closes #1246
Closes #1247
Test plan
pnpm api-docsgenerates JSON ingenerated-feature-reference/andgenerated-preset-reference/🤖 Generated with Claude Code
Note
Medium Risk
Moderate risk because it changes the docs generation pipeline (new JSON outputs, new AST export parsing, schema validation) and rewires multiple docs pages/TOC injection; failures would primarily impact site builds and generated reference accuracy.
Overview
Adds generated API references for features and presets and wires them into the docs site.
api-docs-buildernow generates/validates JSON into newgenerated-feature-reference/andgenerated-preset-reference/directories, and preset extraction is enhanced to handleexport *re-exports plus an optional presetdescriptionsourced from file-level JSDoc.Updates the site to consume the new data. Adds new Zod schemas + content collections, new
FeatureReference/PresetReferenceAstro components (including an actions table and preset detail toggles), extends TOC injection to recognize<FeatureReference>, and replaces hand-maintained preset/skin tables and multiple feature reference pages with the new components; preset modules also gain top-level JSDoc descriptions for display.Reviewed by Cursor Bugbot for commit 6650ec4. Bugbot is set up for automated code reviews on this repo. Configure here.