docs(site): add menu reference#1673
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (9)
Players (5)
Skins (30)
UI Components (37)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (8)
Skins (27)
UI Components (31)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (10)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (4)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
decepulis
left a comment
There was a problem hiding this comment.
Requesting a change to anatomy. But. Good otherwise!
| <FrameworkCase frameworks={["react"]}> | ||
| ```tsx | ||
| <Menu.Root> | ||
| <Menu.Trigger>Settings</Menu.Trigger> | ||
| <Menu.Content> | ||
| <Menu.View> | ||
| <Menu.Root> | ||
| <Menu.Trigger type="playback-rate"> | ||
| Speed <Menu.ItemValue /> | ||
| </Menu.Trigger> | ||
| <Menu.Content> | ||
| <Menu.Back /> | ||
| <Menu.RadioGroup value={rate} onValueChange={setRate}> | ||
| <Menu.GroupLabel>Speed</Menu.GroupLabel> | ||
| <Menu.RadioItem value="1">Normal</Menu.RadioItem> | ||
| <Menu.RadioItem value="1.5">1.5x</Menu.RadioItem> | ||
| </Menu.RadioGroup> | ||
| </Menu.Content> | ||
| </Menu.Root> | ||
|
|
||
| <Menu.Root> | ||
| <Menu.Trigger type="captions"> | ||
| Captions <Menu.ItemValue /> | ||
| </Menu.Trigger> | ||
| <Menu.Content> | ||
| <Menu.Back /> | ||
| <Menu.RadioGroup value={captions} onValueChange={setCaptions}> | ||
| <Menu.GroupLabel>Captions</Menu.GroupLabel> | ||
| <Menu.RadioItem value="off">Off</Menu.RadioItem> | ||
| <Menu.RadioItem value="en">English</Menu.RadioItem> | ||
| </Menu.RadioGroup> | ||
| </Menu.Content> | ||
| </Menu.Root> | ||
|
|
||
| <Menu.Item onSelect={copyLink}>Copy link</Menu.Item> | ||
| </Menu.View> | ||
| </Menu.Content> | ||
| </Menu.Root> | ||
| ``` | ||
| </FrameworkCase> | ||
|
|
||
| <FrameworkCase frameworks={["html"]}> | ||
| ```html | ||
| <button type="button" commandfor="settings-menu">Settings</button> | ||
|
|
||
| <media-menu id="settings-menu"> | ||
| <media-menu-view> | ||
| <media-menu-item commandfor="speed-menu" type="playback-rate"> | ||
| Speed <media-menu-item-value></media-menu-item-value> | ||
| </media-menu-item> | ||
| <media-menu-item commandfor="captions-menu" type="captions"> | ||
| Captions <media-menu-item-value></media-menu-item-value> | ||
| </media-menu-item> | ||
| <media-menu-item>Copy link</media-menu-item> | ||
| </media-menu-view> | ||
|
|
||
| <media-menu id="speed-menu"> | ||
| <media-menu-back></media-menu-back> | ||
| <media-menu-radio-group value="1"> | ||
| <media-menu-group-label>Speed</media-menu-group-label> | ||
| <media-menu-radio-item value="1">Normal</media-menu-radio-item> | ||
| <media-menu-radio-item value="1.5">1.5x</media-menu-radio-item> | ||
| </media-menu-radio-group> | ||
| </media-menu> | ||
|
|
||
| <media-menu id="captions-menu"> | ||
| <media-menu-back></media-menu-back> | ||
| <media-menu-radio-group value="off"> | ||
| <media-menu-group-label>Captions</media-menu-group-label> | ||
| <media-menu-radio-item value="off">Off</media-menu-radio-item> | ||
| <media-menu-radio-item value="en">English</media-menu-radio-item> | ||
| </media-menu-radio-group> | ||
| </media-menu> | ||
| </media-menu> | ||
| ``` | ||
| </FrameworkCase> |
There was a problem hiding this comment.
The intent of Anatomy is to show off the available components and their intended hierarchy, not necessarily to give a working example. I think you can drop a lot of the detail here. More like this https://base-ui.com/react/components/menu
There was a problem hiding this comment.
If the docs skill misled you, it might need some editing!
Closes #1672
Summary
Add the missing Menu component reference page and focused demos for React and HTML. This also updates the playback-rate and captions button references so their menu-trigger behavior matches the current Menu API.
Changes
menuTriggerbehavior on captions and playback-rate buttons.Testing
pnpm -F site api-docspnpm -F site buildNote
Low Risk
Documentation and demo-only changes with no runtime library or security impact.
Overview
Adds a Menu component reference page and registers it in the docs sidebar, including anatomy, behavior, styling, accessibility, generated API tables, and a Basic usage example.
New React and HTML/CSS demos show a video player Settings menu with nested playback rate and captions submenus (radio groups, back navigation, animated panels) plus a Copy link action.
CaptionsButton and PlaybackRateButton references now document
menuTrigger: when enabled, activation opens the linked menu instead of toggling/cycling, including React auto-enabling for captions insideMenu.Trigger.Reviewed by Cursor Bugbot for commit d57eba1. Bugbot is set up for automated code reviews on this repo. Configure here.