Skip to content

feat(site): feature and preset reference UI + docs integration#1258

Open
decepulis wants to merge 4 commits intomainfrom
worktree-feat+feature-preset-ui
Open

feat(site): feature and preset reference UI + docs integration#1258
decepulis wants to merge 4 commits intomainfrom
worktree-feat+feature-preset-ui

Conversation

@decepulis
Copy link
Copy Markdown
Collaborator

@decepulis decepulis commented Apr 7, 2026

Summary

  • Wire feature + preset pipelines into api-docs-builder entry point (generates 11 feature + 3 preset JSON files)
  • Fix preset handler to resolve export * re-exports (React skins were missing)
  • Create Zod schemas (feature-reference.ts, preset-reference.ts) and content collections
  • Build <FeatureReference> component (renders ## API Reference > ### State table > ### Actions table)
  • Build <PresetReference> component (framework-aware tables with cross-linked feature names)
  • Build <ApiActionsTable> component and featureReferenceModel.js for TOC injection
  • Update remarkConditionalHeadings.js to handle <FeatureReference> for TOC
  • Replace hand-written tables in all 11 feature reference pages with <FeatureReference>
  • Replace hand-written tables in presets.mdx and skins.mdx with <PresetReference>
  • Drop <UtilReference> from feature pages (selector API ref not useful enough)

Closes #1246
Closes #1247

Test plan

  • All 60 api-docs-builder e2e tests pass
  • All 316 site tests pass
  • pnpm api-docs generates JSON in generated-feature-reference/ and generated-preset-reference/
  • Feature pages render State/Actions tables from generated data
  • Preset/skin pages render per-preset tables with feature cross-links
  • TOC sidebar shows API Reference > State > Actions > Selector on feature pages

🤖 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-builder now generates/validates JSON into new generated-feature-reference/ and generated-preset-reference/ directories, and preset extraction is enhanced to handle export * re-exports plus an optional preset description sourced from file-level JSDoc.

Updates the site to consume the new data. Adds new Zod schemas + content collections, new FeatureReference/PresetReference Astro 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.

…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>
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 7, 2026

Deploy Preview for vjs10-site ready!

Name Link
🔨 Latest commit 6650ec4
🔍 Latest deploy log https://app.netlify.com/projects/vjs10-site/deploys/69d52ecb5350020008bc3bb7
😎 Deploy Preview https://deploy-preview-1258--vjs10-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v10-sandbox Ready Ready Preview, Comment Apr 7, 2026 4:20pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📦 Bundle Size Report

🎨 @videojs/html — no changes
Presets (7)
Entry Size
/video (default) 25.15 kB
/video (default + hls) 157.13 kB
/video (minimal) 25.13 kB
/video (minimal + hls) 157.13 kB
/audio (default) 23.25 kB
/audio (minimal) 23.30 kB
/background 6.95 kB
Media (7)
Entry Size
/media/background-video 1.04 kB
/media/container 1.59 kB
/media/dash-video 236.26 kB
/media/hls-video 133.40 kB
/media/mux-video 156.10 kB
/media/native-hls-video 3.54 kB
/media/simple-hls-video 15.06 kB
Players (3)
Entry Size
/video/player 6.66 kB
/audio/player 6.65 kB
/background/player 6.65 kB
Skins (17)
Entry Type Size
/video/minimal-skin.css css 3.42 kB
/video/skin.css css 3.44 kB
/video/minimal-skin js 25.13 kB
/video/minimal-skin.tailwind js 25.43 kB
/video/skin js 25.14 kB
/video/skin.tailwind js 25.52 kB
/audio/minimal-skin.css css 2.48 kB
/audio/skin.css css 2.45 kB
/audio/minimal-skin js 23.27 kB
/audio/minimal-skin.tailwind js 23.49 kB
/audio/skin js 23.27 kB
/audio/skin.tailwind js 23.56 kB
/background/skin.css css 117 B
/background/skin js 1.14 kB
/base.css css 157 B
/shared.css css 88 B
/skin-element js 1.35 kB
UI Components (23)
Entry Size
/ui/alert-dialog 2.28 kB
/ui/alert-dialog-close 1.71 kB
/ui/alert-dialog-description 1.62 kB
/ui/alert-dialog-title 1.63 kB
/ui/buffering-indicator 1.88 kB
/ui/captions-button 2.01 kB
/ui/controls 1.97 kB
/ui/error-dialog 2.42 kB
/ui/fullscreen-button 2.05 kB
/ui/hotkey 1.40 kB
/ui/mute-button 2.01 kB
/ui/pip-button 2.05 kB
/ui/play-button 2.01 kB
/ui/playback-rate-button 2.06 kB
/ui/popover 2.42 kB
/ui/poster 1.83 kB
/ui/seek-button 2.05 kB
/ui/slider 1.70 kB
/ui/thumbnail 2.23 kB
/ui/time 1.77 kB
/ui/time-slider 2.08 kB
/ui/tooltip 2.58 kB
/ui/volume-slider 2.40 kB

Sizes are marginal over the root entry point.

⚛️ @videojs/react — no changes
Presets (7)
Entry Size
/video (default) 20.01 kB
/video (default + hls) 151.98 kB
/video (minimal) 20.05 kB
/video (minimal + hls) 152.13 kB
/audio (default) 16.82 kB
/audio (minimal) 16.89 kB
/background 3.16 kB
Media (6)
Entry Size
/media/background-video 476 B
/media/dash-video 236.38 kB
/media/hls-video 133.35 kB
/media/mux-video 156.26 kB
/media/native-hls-video 3.50 kB
/media/simple-hls-video 14.98 kB
Skins (14)
Entry Type Size
/video/minimal-skin.css css 3.35 kB
/video/skin.css css 3.37 kB
/video/minimal-skin js 19.97 kB
/video/minimal-skin.tailwind js 23.41 kB
/video/skin js 19.93 kB
/video/skin.tailwind js 23.52 kB
/audio/minimal-skin.css css 2.38 kB
/audio/skin.css css 2.34 kB
/audio/minimal-skin js 16.80 kB
/audio/minimal-skin.tailwind js 19.30 kB
/audio/skin js 16.74 kB
/audio/skin.tailwind js 19.27 kB
/background/skin.css css 90 B
/background/skin js 272 B
UI Components (19)
Entry Size
/ui/alert-dialog 2.01 kB
/ui/buffering-indicator 1.72 kB
/ui/captions-button 1.84 kB
/ui/controls 1.74 kB
/ui/error-dialog 2.10 kB
/ui/fullscreen-button 1.85 kB
/ui/mute-button 1.87 kB
/ui/pip-button 1.85 kB
/ui/play-button 1.84 kB
/ui/playback-rate-button 1.90 kB
/ui/popover 3.56 kB
/ui/poster 1.55 kB
/ui/seek-button 1.85 kB
/ui/slider 3.05 kB
/ui/thumbnail 1.95 kB
/ui/time 1.28 kB
/ui/time-slider 3.31 kB
/ui/tooltip 2.81 kB
/ui/volume-slider 3.33 kB

Sizes are marginal over the root entry point.

🧩 @videojs/core — no changes
Entries (8)
Entry Size
. 5.29 kB
/dom 10.45 kB
/dom/media/custom-media-element 1.82 kB
/dom/media/dash 235.76 kB
/dom/media/hls 132.94 kB
/dom/media/mux 155.60 kB
/dom/media/native-hls 2.90 kB
/dom/media/simple-hls 14.45 kB
🏷️ @videojs/element — no changes
Entries (2)
Entry Size
. 999 B
/context 943 B
📦 @videojs/store — no changes
Entries (3)
Entry Size
. 1.39 kB
/html 696 B
/react 360 B
🔧 @videojs/utils — no changes
Entries (10)
Entry Size
/array 104 B
/dom 1.73 kB
/events 319 B
/function 327 B
/object 247 B
/predicate 265 B
/string 148 B
/style 190 B
/time 478 B
/number 158 B
📦 @videojs/spf — no changes
Entries (3)
Entry Size
. 40 B
/dom 12.45 kB
/playback-engine 12.41 kB

ℹ️ How to interpret

All sizes are standalone totals (minified + brotli).

Icon Meaning
No change
🔺 Increased ≤ 10%
🔴 Increased > 10%
🔽 Decreased
🆕 New (no baseline)

Run pnpm size locally to check current sizes.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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.`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 220870b. Configure here.

description={def.description}
componentName={featureName}
/>
))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

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

Docs: Feature and Preset Reference — Docs Integration Feature: Feature and Preset Reference — UI Components

1 participant