Repository navigation
refactor(react)!: export compound radio groups from the package root - #3073
Conversation
Remove the single-component compatibility shims (`AudioTrackRadioGroupLegacy`,
`CaptionsRadioGroupLegacy`, `PlaybackRateRadioGroupLegacy`,
`QualityRadioGroupLegacy`) and their props types. The `@videojs/react` root now
exports the same compound namespaces as the `@videojs/react/ui/*` subpaths, and
the reference pages drop the compatibility note.
BREAKING CHANGE: `AudioTrackRadioGroup`, `CaptionsRadioGroup`,
`PlaybackRateRadioGroup`, and `QualityRadioGroup` imported from `@videojs/react`
are now compound namespaces instead of single components. Replace
`<XRadioGroup {...options} renderItem={...} />` with
`<XRadioGroup.Root {...options}><XRadioGroup.Options renderItem={...} /></XRadioGroup.Root>`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
✅ 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.
|
✅ Deploy Preview for vjs-registry ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@videojs/cdn
@videojs/cli
@videojs/core
@videojs/element
@videojs/html
@videojs/media
@videojs/react
@videojs/spf
@videojs/store
@videojs/utils
@videojs/cloudflare-video
@videojs/dash-video
@videojs/hlsjs-video
@videojs/mux-audio
@videojs/mux-video
@videojs/native-hls-video
@videojs/shaka-video
@videojs/spotify-audio
@videojs/tiktok-video
@videojs/twitch-video
@videojs/vimeo-video
@videojs/wistia-video
@videojs/youtube-video
@videojs/google-cast
@videojs/mux-data
commit: |
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (18)
Players (5)
Skins (41)
UI Components (62)
⚛️ @videojs/react — 19 small size changes
Presets (7)
Media (22)
Extensions (2)
Players (5)
Skins (26)
UI Components (39)
🧩 @videojs/core — no changesEntries (76)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (13)
📦 @videojs/cdn — no changes📦 @videojs/cloudflare-video — no changes📦 @videojs/dash-video — no changes📦 @videojs/google-cast — no changes📦 @videojs/hlsjs-video — no changes📦 @videojs/media — no changesEntries (3)
📦 @videojs/mux — no changes📦 @videojs/mux-audio — no changesEntries (2)
📦 @videojs/mux-data — no changes📦 @videojs/mux-video — no changesEntries (2)
📦 @videojs/native-hls-video — no changes📦 @videojs/shaka-video — no changes📦 @videojs/spf — no changesEntries (7)
📦 @videojs/spotify-audio — no changes📦 @videojs/tiktok-video — no changes📦 @videojs/twitch-video — no changes📦 @videojs/other — no changesEntries (3)
📦 @videojs/vimeo-video — no changes📦 @videojs/wistia-video — no changesEntries (2)
📦 @videojs/youtube-video — no changesℹ️ How to interpretEach entry is independently bundled, minified, and brotli-compressed. Initial size includes its static import graph; lazy dynamic chunks are reported separately. Entries are not additive because their dependency graphs overlap. Preset rows represent realistic combined bundles. Changes of 300 B or less across initial, lazy, and total size are collapsed, not discarded. Run |
…7ams8m-radio-groups
The reference pages and demos no longer route around the root export, and a test covers the four root namespaces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
decepulis
left a comment
There was a problem hiding this comment.
Agent review (same method as the stack review on #3063). This does what rahim asked in answer 3 and the diff is clean: no *RadioGroupLegacy / *LegacyProps reference survives anywhere in the repo (git grep over the head, including skins, sandbox, e2e, installation and docs), ComponentImports already defaults reactFrom to @videojs/react so dropping the prop is correct, the root now exports the same export * as namespaces as the subpaths with the part props reachable as CaptionsRadioGroup.OptionsProps etc. (matching the Menu/Dialog family), and the new test pins the root parts to the component module. CI is fully green on this head, including compatibility.
Nothing to change. One sequencing note for whoever merges: the API stability stack was tagged against main without this PR, so #3068 currently removes @internal from the four *RadioGroupLegacy shims (page wins over tag), and a trial merge of this branch into the top of the stack reports 4 conflicts in those component.tsx files. Merge this PR first and let the stack re-run --fix on top of it; merging the stack first and this PR second produces trivial but avoidable conflicts.
Generated by Claude Code
|
Follow-up on the sequencing note: rather than relying on merge order, fold this PR into the API stability stack as its new bottom. Concretely: keep this PR's base on Generated by Claude Code |
…7ams8m-radio-groups
…7ams8m-radio-groups
|
The Website Tests Generated by Claude Code |
…7ams8m-radio-groups
|
Update on the Generated by Claude Code |
…7ams8m-radio-groups
…7ams8m-radio-groups
…7ams8m-radio-groups
Part 1 of the API stability stack: this PR → #3063 (checker) → #3066 (docs rewrites) → #3067 (reference pages) → #3082 (exports) → #3068 (tags and CI) → #3083 (store). It's at the bottom so it merges first; the later PRs are tagged against it.
Summary
The four menu radio groups have two different APIs under the same name:
@videojs/react/ui/<name>exports the compound component (AudioTrackRadioGroup.Root,.Options,.Value). The docs and skins use this one.@videojs/reactroot exports*RadioGroupLegacy, an@internalsingle-component shim. Its comment says it's a "compatibility adapter for the existing preset sources".This PR removes the shims so the root exports the same compound namespaces as the subpaths, like every other compound component.
AudioTrackRadioGroupLegacy,CaptionsRadioGroupLegacy,PlaybackRateRadioGroupLegacyandQualityRadioGroupLegacy, and their*LegacyPropstypes.packages/react/src/index.tsnow exports the namespaces. This matches theMenu/Dialogfamily, which exports no flat*Propstypes from the root.@videojs/reactinstead of theui/*subpath.Found while working on the checker in #3063, where a documented name was being published through an
@internaldeclaration.Preview pages
The changes are on the React versions (the Import section, the removed note and the demo):
Breaking change
Importing
AudioTrackRadioGroup,CaptionsRadioGroup,PlaybackRateRadioGrouporQualityRadioGroupfrom@videojs/reactnow gives the compound namespace. The shim split its props between two parts, so migrate them the same way:label, theformat*props anddisabledgo on.Root, which renders no element.className,style,render,aria-*,renderItemandref, goes on.Options.To let a menu trigger read the group's state, wrap the
Menu.TriggerandMenu.Contentin.Roottoo.Nothing in the repo used the shims. Skins, demos, sandbox templates, e2e and installation already use the parts. The hook tests that render components with these names define their own local helpers. HTML has no equivalent shim.
Testing
pnpm build:packagespnpm -F @videojs/react test: 599 passed, plus the new root export testpnpm typecheckpnpm lintbuild/tests/vite.test.tstimes out, and it also times out on unmodifiedmain.🤖 Generated with Claude Code
https://claude.ai/code/session_01WLkDiofiR86hzNgRopBotH
Note
Medium Risk
Public breaking API change for root imports; behavior of the compound parts is unchanged, but downstream apps using the removed legacy shims must migrate.
Overview
Breaking:
@videojs/reactnow exports the compoundAudioTrackRadioGroup,CaptionsRadioGroup,PlaybackRateRadioGroup, andQualityRadioGroupnamespaces (.Root,.Options,.Value) from the package root, aligned withMenu/Dialogand theui/*subpaths.The internal single-component
*Legacyadapters and*LegacyPropstypes are removed. Consumers who imported the flat components from the root must split props onto.Root(e.g.label,format*,disabled) and.Options(e.g.renderItem,className,ref).Docs and React demos import from
@videojs/reactinstead of deepui/*paths, compatibility notes are dropped, and a test asserts root exports match the subpath parts.Reviewed by Cursor Bugbot for commit cd3b8dd. Bugbot is set up for automated code reviews on this repo. Configure here.