Add river breakout tabs component - #1309
Conversation
🦋 Changeset detectedLatest commit: 2de2554 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
🟢 Unit test coverage changes foundUnit test coverage has been updated through this PR. Changes: 1 new tests, 0 removed tests, 0 improved, 0 decreased
|
There was a problem hiding this comment.
Pull request overview
Adds a new RiverBreakoutTabs component to @primer/react-brand for “river breakout” storytelling sections that use a tabbed layout on wide viewports and an accordion layout on narrower viewports, plus a few supporting styling and docs updates.
Changes:
- Added
RiverBreakoutTabs(component, styles, tests, Storybook stories, docs, and i18n strings). - Updated gridline
RiverBreakoutshared styles (tablet centering + side borders) and added a stable CSS hook forVideoPlayerso it can be styled within river visuals. - Adjusted
Linklabel styling to resist parent specificity overrides.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/VideoPlayer/VideoPlayer.tsx | Adds data-video-player-container attribute hook for styling the VideoPlayer root. |
| packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.tsx | New RiverBreakoutTabs implementation (tabs on wide, accordion on narrow). |
| packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.test.tsx | Unit + a11y tests (RTL + jest-axe) for the new component. |
| packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.stories.tsx | Default Storybook story with i18n content + controls. |
| packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.features.stories.tsx | Feature stories covering layouts and controlled/uncontrolled usage. |
| packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.examples.stories.tsx | Example stories (images/videos/rivers) demonstrating real compositions. |
| packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.module.css | Component styling for wide tablist + accordion modes. |
| packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.module.css.d.ts | Generated CSS module typings. |
| packages/react/src/river/RiverBreakoutTabs/index.ts | Barrel export for the new component folder. |
| packages/react/src/river/river-shared.module.css | Updates shared RiverBreakout gridline styling + VideoPlayer radius overrides. |
| packages/react/src/river/index.ts | Exports RiverBreakoutTabs from the river package entrypoint. |
| packages/react/src/Link/Link.module.css | Updates .Link--label color behavior to avoid parent overrides. |
| apps/storybook/static/locales/en/RiverBreakoutTabs.json | Adds RiverBreakoutTabs Storybook strings (en). |
| apps/storybook/static/locales/de/RiverBreakoutTabs.json | Adds RiverBreakoutTabs Storybook strings (de). |
| apps/storybook/static/locales/es/RiverBreakoutTabs.json | Adds RiverBreakoutTabs Storybook strings (es). |
| apps/storybook/static/locales/fr/RiverBreakoutTabs.json | Adds RiverBreakoutTabs Storybook strings (fr). |
| apps/storybook/static/locales/ja/RiverBreakoutTabs.json | Adds RiverBreakoutTabs Storybook strings (ja). |
| apps/storybook/static/locales/pt-BR/RiverBreakoutTabs.json | Adds RiverBreakoutTabs Storybook strings (pt-BR). |
| apps/next-docs/next-env.d.ts | Updates the referenced Next route types file path. |
| apps/next-docs/content/components/RiverBreakoutTabs/index.mdx | New docs page for RiverBreakoutTabs usage + props. |
| .changeset/sweet-carpets-jump.md | Changeset for introducing RiverBreakoutTabs (minor). |
| .changeset/quick-eagles-grab.md | Changeset for RiverBreakout gridline tablet appearance update (patch). |
| .changeset/clean-birds-share.md | Changeset for Link specificity override behavior (patch). |
| .changeset/brave-lobsters-cry.md | Changeset for the VideoPlayer data attribute hook (patch). |
Copilot's findings
Comments suppressed due to low confidence (1)
packages/react/src/river/RiverBreakoutTabs/RiverBreakoutTabs.module.css:265
- This file adds
border-inlinerules at 618px / 63.25rem / 1300px on.RiverBreakoutTabs, but the same border behavior for gridline breakouts is now defined on.RiverBreakout--variant-gridlineinriver-shared.module.css. Since the root element includes both classes, these rules are redundant; consider removing them here so breakouts have a single source of truth for gridline borders.
@media screen and (min-width: 618px) {
.RiverBreakoutTabs {
border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);
}
}
@media screen and (min-width: 63.25rem) {
.RiverBreakoutTabs {
border-inline: none;
}
}
@media screen and (min-width: 1300px) {
.RiverBreakoutTabs {
border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);
}
}
- Files reviewed: 22/24 changed files
- Comments generated: 6
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
Summary
Adds a new RiverBreakoutTabs component that is similar to RiverBreakout, but introduces wide tab list + narrow accordion behavior for the same content set.
🔗 Docs
🔗 Storybook
List of notable changes:
What should reviewers focus on?
Steps to test:
Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots: