Skip to content

docs(site): add ui-next component documentation and upgrade Docusaurus#6102

Open
dan-rukas wants to merge 46 commits into
OHIF:masterfrom
dan-rukas:docs-ui-next
Open

docs(site): add ui-next component documentation and upgrade Docusaurus#6102
dan-rukas wants to merge 46 commits into
OHIF:masterfrom
dan-rukas:docs-ui-next

Conversation

@dan-rukas

@dan-rukas dan-rukas commented Jun 23, 2026

Copy link
Copy Markdown
Member

Context

Replaces the monolithic component showcase page with 26 individual, well-documented component pages for the ui-next library. Also upgrades Docusaurus from 3.7.0 to 3.10.1, fixes runtime crashes on migration guide pages, and resolves CSS isolation issues so ui-next components render correctly on documentation pages.

Deploy preview: https://ohif-ui-next-docs.netlify.app/

Changes & Results

Component documentation system

26 component pages — each at /components/[name] with:

  • Interactive demos using live ui-next components
  • Variant pickers (where applicable) — switch between visual variants with descriptive labels
  • Props tables with type information and defaults
  • Copy-able code examples showing import patterns and common usage

Components documented:

Simple Compound OHIF-specific
Button Combobox AllInOneMenu
Checkbox Dialog CinePlayer
Input DropdownMenu DataRow
Label HoverCard DataTable
Slider Popover Numeric
Switch ScrollArea PanelSection
Select SmartScrollbar
Table ToolButton
Tabs ToolButtonList
Toast / Sonner
Tooltip

Shared layout system (_layout/ directory):

  • ComponentLayout.tsx — Three-column layout: left sidebar, content area, right TOC
  • sidebar-config.ts — Navigation structure (Foundations, Components sections)
  • TableOfContents.tsx — Scroll-aware right-hand nav, reads h2 headings from the page
  • PageHeader.tsx, Section.tsx, InteractivePicker.tsx, CodeBlock.tsx, ExampleBlock.tsx, PropsTable.tsx — Shared building blocks used across all pages

Iconography page (/components/icons):

  • Searchable grid of 137 curated icons from the OHIF icon set
  • Size toggle (16 / 20 / 24 / 32 px)
  • Click any icon to copy its component name
  • Tooltip on hover showing icon name

Colors & Theming page (/colors-and-theming):

  • Integrated into the sidebar layout (previously standalone)
  • Full theming guide: color token architecture, theme presets, creating custom themes, accessibility
  • Live preview links currently point to temporary Netlify deploys — will be updated to final OHIF-hosted URLs

Overview page (/components):

  • Entry point from the top nav "Components" link
  • Lives inside the sidebar layout

Docusaurus 3.7.0 to 3.10.1

All @docusaurus/* packages updated from 3.7.0 to 3.10.1; pnpm-lock.yaml regenerated for the dependency bump. Key config change: v4.useCssCascadeLayers: true wraps Infima in a CSS layer, enabling the component isolation strategy below.

Fix: Migration guide page crash

Migration guide index pages crashed with Hook useDocsSidebar is called outside the <DocsSidebarProvider>. Switched to prop-less <DocCardList /> which auto-detects its sidebar category in Docusaurus 3.x.

Fix: CSS isolation for ui-next components

Two layers of CSS interference caused ui-next components to render incorrectly on documentation pages: Infima's global element selectors bleeding into components, and missing Tailwind Preflight resets.

Fix:

  • CSS Cascade Layers + revert-layer.showcase-isolated class reverts all Infima styles inside component demos
  • Scoped Tailwind Preflight — Added tailwindcss-scoped-preflight to scope Preflight resets inside .showcase-isolated only
  • Portal isolation — Used :where() selectors (zero specificity) to extend CSS resets to Radix portal containers without overriding Tailwind utility classes
  • Scoped custom.css rules — Element selectors scoped to .markdown / .theme-doc-markdown to prevent bleed into showcase areas

Also synced custom.css theme tokens to match current ui-next values, added the full opacity scale (fixes bg-primary/85 etc.), and removed stale CSS blocks.

Old showcase system removed (34 files)

Removed the monolithic /components-list page, the original /components landing, all 23 *Showcase.tsx modules, ShowcaseRow.tsx, /colors-and-type, and /patterns with its 6-file subdirectory. All replaced by the new per-component pages.

Testing

pnpm install --frozen-lockfile
pnpm --filter ohif-docs run start -- --port 8001
  • Visit /components/button — interactive variant picker, props table, code example
  • Visit /components/dialog — open dialog, verify buttons inside have correct styling (blue background, no browser borders)
  • Visit /components/icons — search icons, toggle sizes, click to copy name
  • Navigate between pages via sidebar — current page highlights, content updates
  • Left sidebar: visible on desktop, hamburger on mobile
  • Right TOC: visible on xl+ screens, highlights current section on scroll
  • /components overview page: accessible from top nav "Components" link
  • Visit /colors-and-theming — renders inside sidebar layout with TOC
  • Click "Migration Guides" in the sidebar — card list renders, no crash
  • Browse any doc page (e.g., /configuration/url) — headings, lists, styles unchanged

Production build:

pnpm --filter ohif-docs run build

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • OS: macOS Sequoia 15.7.4 (24G517), Apple M4 Pro
  • Node version: 24.15.0
  • Browser: Chrome 149.0.7827.157 (arm64)

dan-rukas and others added 30 commits June 15, 2026 10:30
The explicit hook call crashes in Docusaurus 3.10 when sidebar context is missing. DocCardList without props auto-detects its items internally.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regenerate pnpm-lock.yaml under pnpm 11.5.2 to reconcile the workspace after merging master into docs-ui-next.

Remove the no-op "resolutions" field from platform/docs/package.json
Use useLocation() instead of window.location.pathname in ComponentLayout

SSR-safe and reactive to client-side navigation.
offsetTop is relative to the nearest positioned ancestor, not the document — drifts when layout uses sticky/fixed. Also throttles the scroll handler with requestAnimationFrame.
- CodeBlock: add clipboard fallback for insecure origins, timer cleanup, and aria-label on copy button
- InteractivePicker: add tablist/tab/tabpanel roles and aria-selected
- DataRow: add missing required description prop to props table
- Toast: split into separate toast() options and Toaster props sections
- colors-and-theming: fix default --background to 0 0% 0% (pure black)
@netlify

netlify Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit 3be689c
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/6a3d65ce404fc10008f161f6
😎 Deploy Preview https://deploy-preview-6102--ohif-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Upgrades Docusaurus to 3.10.1, adds tailwindcss-scoped-preflight for showcase CSS isolation, builds a new _layout component system (sidebar, TOC, pickers, prop tables), adds 25+ component documentation pages and a Colors & Theming page, removes all legacy ShowcaseRow/patterns/components-list pages, and fixes DocCardList and link references in migration guides.

Changes

Component Documentation System and Infrastructure

Layer / File(s) Summary
Docusaurus 3.10 upgrade, Tailwind isolation, and CSS scoping
platform/docs/package.json, platform/docs/docusaurus.config.js, platform/docs/tailwind.config.js, platform/docs/src/css/custom.css
Upgrades all @docusaurus/* to 3.10.1, moves onBrokenMarkdownLinks into markdown.hooks, replaces future.experimental_faster with future.faster+v4 flags, adds tailwindcss-scoped-preflight with .showcase-isolated strategy, disables global Tailwind preflight, adds explicit opacity scale, and reworks CSS to scope typography/list styles to .markdown containers with cascade-layer isolation for portal content including Radix popper wrappers and Sonner toaster.
Shared _layout component primitives
platform/docs/src/pages/components/_layout/*
Creates the entire layout subsystem: CodeBlock (copy-to-clipboard with execCommand fallback), ComponentLayout (responsive sidebar with toggle/overlay, active-link highlighting, TOC ref), TableOfContents (MutationObserver heading discovery, rAF-throttled scroll tracking, sticky nav), PageHeader, Section (with slugify id generation), ExampleBlock (conditional margins), InteractivePicker (PickerOption interface, tab-driven state, renderPreview), PropsTable (PropDef interface), and sidebar-config (SidebarItem/SidebarSection types and Foundations/Components sections).
Colors & Theming documentation page
platform/docs/src/pages/colors-and-theming.tsx
Adds comprehensive theming documentation with themes CSS-variable token map, helper components (Swatch, TokenRow, SwatchSet, CopyThemeLink, ThemeRow, ContrastTable, Accordion), and ThemingPageContent composing app theming instructions, token role explanations, layering model accordion, tonal/neutral theme grids, custom theme guidance, and WCAG accessibility contrast matrices inside ComponentLayout with BrowserOnly wrapper. Replaces deleted colors-and-type.tsx.
Component documentation overview
platform/docs/src/pages/components/index.tsx
Adds the /components landing page that introduces @ohif/ui-next with dynamic component/layout loading via require, hardcoded foundations and componentGroups navigation data, responsive grid layouts for Foundations and grouped Components sections, and BrowserOnly wrapper for client-side rendering.
Core form control component docs
platform/docs/src/pages/components/{button,checkbox,combobox,input,label,select,slider,switch-toggle,tabs,tooltip}.tsx
Adds BrowserOnly-wrapped documentation pages for foundational form/input components using dynamic require, local states/types arrays for InteractivePicker demos, multiple ExampleBlock sections, CodeBlock usage snippets, and PropsTable driven by local prop metadata. Each page covers interaction patterns, sizing, variants, and accessibility states.
Advanced and compound component docs
platform/docs/src/pages/components/{all-in-one-menu,cine-player,data-row,dialog,dropdown-menu,hover-card,icons,numeric,panel-section,popover,scroll-area,smart-scrollbar,toast,tool-button,tool-button-list}.tsx
Adds documentation pages for complex compound components with specialized interactivity: SmartScrollbar (loading simulation via useByteArray, wheel-driven stepping, demo viewport), DataRow (segmentation/measurement state examples, visibility/lock toggles), CinePlayer (4D dynamic volume with updateDynamicInfo), ToolButton (activeId state tracking), Icons (search input, copy-to-clipboard, size picker, icon grid), AllInOneMenu (hierarchical menu, direction/positioning guidance), Dialog (draggable state option), PanelSection (accordion-driven nested examples), Toast (promise/action/cancel variants), and comprehensive prop tables for all sub-components.
Remove legacy showcase and patterns modules
Deleted: components-list.tsx, components.tsx, colors-and-type.tsx, ShowcaseRow.tsx, 23× *Showcase.tsx component files, patterns.tsx, patterns/DataRowExample.tsx, patterns/patterns-{measurements,segmentation,split-panel,tmtv}.tsx
Removes all legacy showcase-based pages after new per-component documentation system is complete, eliminating the old ShowcaseRow wrapper pattern, components-list aggregator, and pattern-specific demo directories (26 files total).

Migration Guide DocCardList and Link Fixes

Layer / File(s) Summary
Remove useCurrentSidebarCategory from DocCardList
platform/docs/docs/migration-guide/3p{10,12,8,9}/*/index.md, platform/docs/versioned_docs/version-3.11/migration-guide/3p{8,9}/*/index.md
Removes the useCurrentSidebarCategory import and items prop from DocCardList across all migration guide index pages, switching to parameterless <DocCardList /> rendering that uses Docusaurus sidebar defaults. Applied to both current docs and version-3.11 versioned guides.
Update internal documentation links
platform/docs/docs/migration-guide/3p9-to-3p10/3-UI/{1a-Colors.md,3-Migration-3p10-Input.md}, platform/docs/versioned_docs/version-3.11/migration-guide/3p9-to-3p10/3-UI/{1a-Colors.md,3-Migration-3p10-Input.md}
Updates the Color System link from /colors-and-type to /colors-and-theming and the Numeric component link from /components-list#numeric to /components/numeric in both current and version-3.11 migration guide docs, reflecting the new component documentation page routes.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Suggested reviewers

  • sedghi
  • wayfarer3130

Poem

🐇 Hop hop, the old showcases fall away,
New _layout primitives brighten the day!
DocCardList needs no items to pass,
And theming tokens now live in their class.
Docusaurus ten-point-one takes the stage—
The rabbit is proud of this doc-filled page! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs(site): add ui-next component documentation and upgrade Docusaurus' clearly and specifically describes the main changes: new component documentation pages and Docusaurus upgrade.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description follows the template with Context, Changes & Results, Testing, and a completed checklist, and it includes concrete implementation and verification details.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread platform/docs/docs/migration-guide/3p10-to-3p11/index.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 17

🧹 Nitpick comments (2)
platform/docs/src/pages/components/_layout/InteractivePicker.tsx (1)

25-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Complete the tabs ARIA pattern (or remove tab roles).

This currently applies tab roles without the required relationships/focus behavior (idaria-controls, aria-labelledby, active tabIndex management). Please either fully implement the tabs pattern or keep semantic buttons without tab roles.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@platform/docs/src/pages/components/_layout/InteractivePicker.tsx` around
lines 25 - 47, The InteractivePicker component applies ARIA tab roles without
fully implementing the required tabs pattern. Either complete the implementation
by adding: unique id attributes to each tab button, aria-controls on buttons
pointing to the tabpanel element, aria-labelledby on the tabpanel referencing
the active tab's id, and managing tabIndex values on the tab buttons (0 for
active, -1 for inactive) to enable proper keyboard navigation; OR remove all
tab-related role attributes (role="tablist" on the parent div, role="tab" on
each button, and role="tabpanel" on the panel div) and keep them as standard
semantic buttons without the ARIA tab pattern.
platform/docs/src/pages/colors-and-theming.tsx (1)

981-984: 🚀 Performance & Scalability | 🔵 Trivial

Remove the BrowserOnly wrapper; the page is server-renderable.

BrowserOnly with an empty fallback prevents static rendering of the entire page. However, the layout components (ComponentLayout, PageHeader, Section) contain no browser globals, and all browser API calls (clipboard copy, scroll tracking) are properly isolated in event handlers and useEffect hooks, which don't execute during SSR. The page can be statically rendered and will work correctly once hydrated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@platform/docs/src/pages/colors-and-theming.tsx` around lines 981 - 984, The
ThemingPage function currently wraps ThemingPageContent with the BrowserOnly
component and an empty fallback, which prevents static rendering of the page.
Since all browser API calls are properly isolated in event handlers and
useEffect hooks within the layout components, the page is safe to render on the
server. Remove the BrowserOnly wrapper and return ThemingPageContent directly
instead to enable static rendering while maintaining correct behavior after
hydration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@platform/docs/src/css/custom.css`:
- Line 222: The font-family declarations containing 'Inter' have unnecessary
quotes around the font name, which violates the Stylelint
font-family-name-quotes rule. Remove the single quotes around Inter in both
font-family declarations (at line 222 and line 607) so that the font name
appears unquoted while keeping the comma and sans-serif fallback intact. This
applies to both instances where font-family is set to 'Inter', sans-serif.
- Around line 606-634: The current CSS reset selector targets all direct body
children except for Docusaurus, script, style, and link elements, which is too
broad and causes unrelated portals or injected UI to lose their styles. Narrow
this reset by adding a marker class to the portal container or content element
used by the component demos, and then update all the selectors (the one using
:where(body > :not(`#__docusaurus`)...), the wildcard selectors, and the form
element selector) to target only elements with that marker class instead of all
direct body children. This way the reset will only apply to showcase-owned
portals.

In `@platform/docs/src/pages/colors-and-theming.tsx`:
- Around line 267-274: The "Copy Theme" link label is not unique across all
theme rows, making it difficult for assistive technology users to distinguish
between identical actions. Modify the text content displayed in the link
(currently showing "Copy Theme" or "Copied!") to include the theme name
alongside the action label so each button has a descriptive and unique
accessible name that screen readers can properly announce.
- Around line 215-218: The grid with fixed gridTemplateColumns of '24px 200px
1fr' will overflow on narrow mobile viewports. Modify the grid container div to
use responsive column definitions that collapse to a single or two-column layout
on mobile devices, and reserve the current three-column layout only for larger
screens using md: breakpoint variants. Additionally, consider wrapping the grid
in overflow-x-auto or adjusting the grid template to use smaller flexible
columns that adapt to the viewport width instead of the fixed 200px token
column.
- Around line 354-372: The Accordion component needs to expose its expanded
state to screen readers for better accessibility. Add the aria-expanded
attribute to the button element, setting it to the open state variable to
indicate whether the accordion is expanded or collapsed. Additionally, create a
stable panel id by combining the component's id prop with a suffix (such as
"panel"), add this id to the content div that displays when open is true, and
add the aria-controls attribute to the button element to reference this panel id
so assistive technologies can associate the button with the content it controls.

In `@platform/docs/src/pages/components/_layout/CodeBlock.tsx`:
- Around line 8-10: The component has a memory leak where the setTimeout at line
26 continues running after unmount, causing setCopied to update state on an
unmounted component. To fix this, import useEffect from React at the top of the
file, then add a useEffect hook that returns a cleanup function. In the cleanup
function, check if timerRef.current exists and clear it using
clearTimeout(timerRef.current). This ensures that whenever the component
unmounts or the effect re-runs, any pending timeout is properly cancelled before
setCopied attempts to run.

In `@platform/docs/src/pages/components/_layout/ComponentLayout.tsx`:
- Around line 76-79: The active-link comparison at lines 76–79 uses currentPath
directly from useLocation().pathname without accounting for Docusaurus baseUrl
normalization. When a non-root baseUrl is configured, pathname includes the
baseUrl prefix while item.href values do not, causing the comparison to fail.
Fix this by normalizing currentPath by removing the baseUrl prefix before
comparing it to item.href. Use the useBaseUrl hook to retrieve the baseUrl
value, then strip it from currentPath before performing the equality checks
against item.href and item.href + '/'.

In `@platform/docs/src/pages/components/data-row.tsx`:
- Line 19: The selectedId state initialized with useState on line 19 is inferred
as type string, but the code later sets it to null for row deselection (line
164), causing a TypeScript type error. Update the useState hook to explicitly
specify the state type as string or null by adding a generic type parameter to
useState that accepts both string and null values, ensuring the type annotation
matches the actual usage where selectedId can be either a string ID or null.

In `@platform/docs/src/pages/components/dropdown-menu.tsx`:
- Around line 162-171: The code snippet in the dropdown-menu documentation is
missing the Button import in the import statement block. The example shows usage
of Button component in the DropdownMenuTrigger but the import block only
includes DropdownMenu, DropdownMenuTrigger, DropdownMenuContent,
DropdownMenuItem, and DropdownMenuSeparator. Add Button to the import list from
'`@ohif/ui-next`' so that users can successfully copy-paste and run the example
without errors.

In `@platform/docs/src/pages/components/hover-card.tsx`:
- Around line 220-247: The code example in the hover-card.tsx file is missing
imports for components that are used in the snippet. Add Button, Icons, and
CardDescription to the import statement at the beginning of the code block. The
Button component is used in the HoverCardTrigger elements, the Icons component
is used for the CloudSettings icon, and CardDescription is used in the
CardHeader. Update the import block to include these missing imports from the
'`@ohif/ui-next`' package alongside the existing HoverCard, HoverCardTrigger,
HoverCardContent, Card, CardHeader, CardTitle, and CardContent imports.

In `@platform/docs/src/pages/components/icons.tsx`:
- Around line 241-246: The clear-search button that clears the search query when
clicked lacks an aria-label attribute, making it inaccessible for users relying
on screen readers. Add an aria-label attribute to the button element (the one
with onClick={() => setSearchQuery('')}) with a descriptive value like "Clear
search" to provide an accessible name that assistive technology users can
understand.
- Around line 164-168: The handleCopyIcon function calls
navigator.clipboard.writeText without error handling or fallback, which can
cause unhandled promise rejections if the Clipboard API is unavailable or fails.
Wrap the clipboard operation in a try-catch block and implement a fallback
mechanism (such as the one already used in the CodeBlock.tsx file) to handle
cases where the modern Clipboard API is not supported or throws an error,
ensuring the copy functionality degrades gracefully.

In `@platform/docs/src/pages/components/label.tsx`:
- Around line 77-80: The code snippet includes an import statement that only
imports Label from '`@ohif/ui-next`', but the example usage below includes an
Input component on line 80 which is not imported. Update the import statement to
include both Label and Input components, so the complete import reads something
like importing both Label and Input from '`@ohif/ui-next`' to make the usage
example valid and complete.

In `@platform/docs/src/pages/components/popover.tsx`:
- Around line 120-129: The code snippet shows an import statement that includes
Popover, PopoverTrigger, and PopoverContent, but the example usage includes a
Button component that is not imported. Add Button to the import destructuring
statement on line 120 so that the copied example will work correctly without
missing dependencies.

In `@platform/docs/src/pages/components/select.tsx`:
- Around line 71-77: In the "With label" example block, the Label and
SelectTrigger components are not properly associated for accessibility. Add an
htmlFor attribute to the Label component with a unique identifier value, and add
a matching id attribute to the SelectTrigger component. This creates a proper
semantic association between the label and the select trigger, improving
accessibility for users relying on screen readers.

In `@platform/docs/src/pages/components/smart-scrollbar.tsx`:
- Around line 181-183: The handleWheel function does not guard against cases
where deltaY equals zero, causing unintended index decrements. Add an early
return check at the beginning of the handleWheel callback to exit immediately if
deltaY is 0, preventing the index from being modified when there is no wheel
movement.

In `@platform/docs/src/pages/components/tooltip.tsx`:
- Around line 119-127: The import statement for Tooltip, TooltipTrigger,
TooltipContent, and TooltipProvider from '`@ohif/ui-next`' is missing the Button
import that is used in the code example. Add Button to the destructured imports
in the import statement from '`@ohif/ui-next`' so that the Button component is
available when used in the example code.

---

Nitpick comments:
In `@platform/docs/src/pages/colors-and-theming.tsx`:
- Around line 981-984: The ThemingPage function currently wraps
ThemingPageContent with the BrowserOnly component and an empty fallback, which
prevents static rendering of the page. Since all browser API calls are properly
isolated in event handlers and useEffect hooks within the layout components, the
page is safe to render on the server. Remove the BrowserOnly wrapper and return
ThemingPageContent directly instead to enable static rendering while maintaining
correct behavior after hydration.

In `@platform/docs/src/pages/components/_layout/InteractivePicker.tsx`:
- Around line 25-47: The InteractivePicker component applies ARIA tab roles
without fully implementing the required tabs pattern. Either complete the
implementation by adding: unique id attributes to each tab button, aria-controls
on buttons pointing to the tabpanel element, aria-labelledby on the tabpanel
referencing the active tab's id, and managing tabIndex values on the tab buttons
(0 for active, -1 for inactive) to enable proper keyboard navigation; OR remove
all tab-related role attributes (role="tablist" on the parent div, role="tab" on
each button, and role="tabpanel" on the panel div) and keep them as standard
semantic buttons without the ARIA tab pattern.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9dcb9a57-70d8-4cee-ab9f-6afcd26995e8

📥 Commits

Reviewing files that changed from the base of the PR and between 20632f9 and 566ec96.

⛔ Files ignored due to path filters (7)
  • platform/docs/static/img/theming-color-roles.png is excluded by !**/*.png
  • platform/docs/static/img/theming-dialog-01-select-theme.png is excluded by !**/*.png
  • platform/docs/static/img/theming-dialog-02-default.png is excluded by !**/*.png
  • platform/docs/static/img/theming-dialog-03-custom.png is excluded by !**/*.png
  • platform/docs/static/img/theming-layers.png is excluded by !**/*.png
  • platform/docs/static/img/theming-themes.png is excluded by !**/*.png
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (86)
  • platform/docs/docs/migration-guide/3p10-to-3p11/index.md
  • platform/docs/docs/migration-guide/3p12-to-3p13/index.md
  • platform/docs/docs/migration-guide/3p8-to-3p9/1-segmentation/index.md
  • platform/docs/docs/migration-guide/3p8-to-3p9/index.md
  • platform/docs/docs/migration-guide/3p9-to-3p10/3-UI/1a-Colors.md
  • platform/docs/docs/migration-guide/3p9-to-3p10/3-UI/3-Migration-3p10-Input.md
  • platform/docs/docs/migration-guide/index.md
  • platform/docs/docusaurus.config.js
  • platform/docs/package.json
  • platform/docs/src/css/custom.css
  • platform/docs/src/pages/colors-and-theming.tsx
  • platform/docs/src/pages/colors-and-type.tsx
  • platform/docs/src/pages/components-list.tsx
  • platform/docs/src/pages/components.tsx
  • platform/docs/src/pages/components/AllinOneMenuShowcase.tsx
  • platform/docs/src/pages/components/ButtonShowcase.tsx
  • platform/docs/src/pages/components/CheckboxShowcase.tsx
  • platform/docs/src/pages/components/CinePlayerShowcase.tsx
  • platform/docs/src/pages/components/ComboboxShowcase.tsx
  • platform/docs/src/pages/components/DataRowShowcase.tsx
  • platform/docs/src/pages/components/DialogShowcase.tsx
  • platform/docs/src/pages/components/DropdownMenuShowcase.tsx
  • platform/docs/src/pages/components/HoverCardShowcase.tsx
  • platform/docs/src/pages/components/InputShowcase.tsx
  • platform/docs/src/pages/components/LabelShowcase.tsx
  • platform/docs/src/pages/components/NumericMetaShowcase.tsx
  • platform/docs/src/pages/components/PanelSectionShowcase.tsx
  • platform/docs/src/pages/components/PopoverShowcase.tsx
  • platform/docs/src/pages/components/ScrollAreaShowcase.tsx
  • platform/docs/src/pages/components/SelectShowcase.tsx
  • platform/docs/src/pages/components/ShowcaseRow.tsx
  • platform/docs/src/pages/components/SliderShowcase.tsx
  • platform/docs/src/pages/components/SwitchShowcase.tsx
  • platform/docs/src/pages/components/TabsShowcase.tsx
  • platform/docs/src/pages/components/ToastShowcase.tsx
  • platform/docs/src/pages/components/ToolButtonListShowcase.tsx
  • platform/docs/src/pages/components/ToolButtonShowcase.tsx
  • platform/docs/src/pages/components/TooltipShowcase.tsx
  • platform/docs/src/pages/components/_layout/CodeBlock.tsx
  • platform/docs/src/pages/components/_layout/ComponentLayout.tsx
  • platform/docs/src/pages/components/_layout/ExampleBlock.tsx
  • platform/docs/src/pages/components/_layout/InteractivePicker.tsx
  • platform/docs/src/pages/components/_layout/PageHeader.tsx
  • platform/docs/src/pages/components/_layout/PropsTable.tsx
  • platform/docs/src/pages/components/_layout/Section.tsx
  • platform/docs/src/pages/components/_layout/TableOfContents.tsx
  • platform/docs/src/pages/components/_layout/sidebar-config.ts
  • platform/docs/src/pages/components/all-in-one-menu.tsx
  • platform/docs/src/pages/components/button.tsx
  • platform/docs/src/pages/components/checkbox.tsx
  • platform/docs/src/pages/components/cine-player.tsx
  • platform/docs/src/pages/components/combobox.tsx
  • platform/docs/src/pages/components/data-row.tsx
  • platform/docs/src/pages/components/dialog.tsx
  • platform/docs/src/pages/components/dropdown-menu.tsx
  • platform/docs/src/pages/components/hover-card.tsx
  • platform/docs/src/pages/components/icons.tsx
  • platform/docs/src/pages/components/index.tsx
  • platform/docs/src/pages/components/input.tsx
  • platform/docs/src/pages/components/label.tsx
  • platform/docs/src/pages/components/numeric.tsx
  • platform/docs/src/pages/components/panel-section.tsx
  • platform/docs/src/pages/components/popover.tsx
  • platform/docs/src/pages/components/scroll-area.tsx
  • platform/docs/src/pages/components/select.tsx
  • platform/docs/src/pages/components/slider.tsx
  • platform/docs/src/pages/components/smart-scrollbar.tsx
  • platform/docs/src/pages/components/switch-toggle.tsx
  • platform/docs/src/pages/components/tabs.tsx
  • platform/docs/src/pages/components/toast.tsx
  • platform/docs/src/pages/components/tool-button-list.tsx
  • platform/docs/src/pages/components/tool-button.tsx
  • platform/docs/src/pages/components/tooltip.tsx
  • platform/docs/src/pages/patterns.tsx
  • platform/docs/src/pages/patterns/DataRowExample.tsx
  • platform/docs/src/pages/patterns/index.tsx
  • platform/docs/src/pages/patterns/patterns-measurements.tsx
  • platform/docs/src/pages/patterns/patterns-segmentation.tsx
  • platform/docs/src/pages/patterns/patterns-split-panel.tsx
  • platform/docs/src/pages/patterns/patterns-tmtv.tsx
  • platform/docs/tailwind.config.js
  • platform/docs/versioned_docs/version-3.11/migration-guide/3p8-to-3p9/1-segmentation/index.md
  • platform/docs/versioned_docs/version-3.11/migration-guide/3p8-to-3p9/index.md
  • platform/docs/versioned_docs/version-3.11/migration-guide/3p9-to-3p10/3-UI/1a-Colors.md
  • platform/docs/versioned_docs/version-3.11/migration-guide/3p9-to-3p10/3-UI/3-Migration-3p10-Input.md
  • platform/docs/versioned_docs/version-3.11/migration-guide/index.md
💤 Files with no reviewable changes (34)
  • platform/docs/src/pages/components/ToolButtonShowcase.tsx
  • platform/docs/src/pages/patterns/patterns-measurements.tsx
  • platform/docs/src/pages/components/SwitchShowcase.tsx
  • platform/docs/src/pages/components/AllinOneMenuShowcase.tsx
  • platform/docs/src/pages/components/SliderShowcase.tsx
  • platform/docs/src/pages/components/ScrollAreaShowcase.tsx
  • platform/docs/src/pages/components/SelectShowcase.tsx
  • platform/docs/src/pages/components/TooltipShowcase.tsx
  • platform/docs/src/pages/components/CheckboxShowcase.tsx
  • platform/docs/src/pages/patterns/DataRowExample.tsx
  • platform/docs/src/pages/components/InputShowcase.tsx
  • platform/docs/src/pages/components/PanelSectionShowcase.tsx
  • platform/docs/src/pages/patterns/index.tsx
  • platform/docs/src/pages/components/DataRowShowcase.tsx
  • platform/docs/src/pages/components/ComboboxShowcase.tsx
  • platform/docs/src/pages/colors-and-type.tsx
  • platform/docs/src/pages/components/PopoverShowcase.tsx
  • platform/docs/src/pages/components/ShowcaseRow.tsx
  • platform/docs/src/pages/components/HoverCardShowcase.tsx
  • platform/docs/src/pages/components/ButtonShowcase.tsx
  • platform/docs/src/pages/components-list.tsx
  • platform/docs/src/pages/components/TabsShowcase.tsx
  • platform/docs/src/pages/patterns/patterns-split-panel.tsx
  • platform/docs/src/pages/components/DialogShowcase.tsx
  • platform/docs/src/pages/components/DropdownMenuShowcase.tsx
  • platform/docs/src/pages/components/ToastShowcase.tsx
  • platform/docs/src/pages/patterns/patterns-tmtv.tsx
  • platform/docs/src/pages/patterns.tsx
  • platform/docs/src/pages/components/CinePlayerShowcase.tsx
  • platform/docs/src/pages/components.tsx
  • platform/docs/src/pages/patterns/patterns-segmentation.tsx
  • platform/docs/src/pages/components/ToolButtonListShowcase.tsx
  • platform/docs/src/pages/components/NumericMetaShowcase.tsx
  • platform/docs/src/pages/components/LabelShowcase.tsx

.theme-doc-markdown h5 {
color: var(--ifm-color-primary);
font-weight: 400;
font-family: 'Inter', sans-serif;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove the quotes around Inter to satisfy Stylelint.

Both changed declarations trip font-family-name-quotes; use Inter, sans-serif.

Proposed fix
-  font-family: 'Inter', sans-serif;
+  font-family: Inter, sans-serif;
-  font-family: 'Inter', sans-serif;
+  font-family: Inter, sans-serif;

Also applies to: 607-607

🧰 Tools
🪛 Stylelint (17.13.0)

[error] 222-222: Expected no quotes around "Inter" (font-family-name-quotes)

(font-family-name-quotes)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@platform/docs/src/css/custom.css` at line 222, The font-family declarations
containing 'Inter' have unnecessary quotes around the font name, which violates
the Stylelint font-family-name-quotes rule. Remove the single quotes around
Inter in both font-family declarations (at line 222 and line 607) so that the
font name appears unquoted while keeping the comma and sans-serif fallback
intact. This applies to both instances where font-family is set to 'Inter',
sans-serif.

Source: Linters/SAST tools

Comment thread platform/docs/src/css/custom.css Outdated
Comment on lines +215 to +218
<div className="mb-5 grid items-start gap-x-3" style={{ gridTemplateColumns: '24px 200px 1fr' }}>
<Swatch color={color} />
<code className="bg-transparent pl-0 pt-0.5 text-sm text-[#7cacf8]">{token}</code>
<div className="text-secondary-foreground text-lg">{children}</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add mobile fallbacks for the fixed desktop grids.

The 200px token column, ml-[248px] offsets, and six-column theme grids can overflow narrow docs viewports. Add responsive variants or horizontal wrappers.

Proposed direction
-    <div className="mb-5 grid items-start gap-x-3" style={{ gridTemplateColumns: '24px 200px 1fr' }}>
+    <div className="mb-5 grid grid-cols-[24px_minmax(0,1fr)] items-start gap-x-3 gap-y-1 md:grid-cols-[24px_200px_minmax(0,1fr)]">
       <Swatch color={color} />
       <code className="bg-transparent pl-0 pt-0.5 text-sm text-[`#7cacf8`]">{token}</code>
-      <div className="text-secondary-foreground text-lg">{children}</div>
+      <div className="text-secondary-foreground col-start-2 text-lg md:col-start-auto">{children}</div>
     </div>

Also gate the left offsets with md:ml-[248px] and wrap the theme grids in overflow-x-auto or provide smaller-column mobile layouts.

Also applies to: 514-516, 668-727

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@platform/docs/src/pages/colors-and-theming.tsx` around lines 215 - 218, The
grid with fixed gridTemplateColumns of '24px 200px 1fr' will overflow on narrow
mobile viewports. Modify the grid container div to use responsive column
definitions that collapse to a single or two-column layout on mobile devices,
and reserve the current three-column layout only for larger screens using md:
breakpoint variants. Additionally, consider wrapping the grid in overflow-x-auto
or adjusting the grid template to use smaller flexible columns that adapt to the
viewport width instead of the fixed 200px token column.

Comment thread platform/docs/src/pages/colors-and-theming.tsx
Comment thread platform/docs/src/pages/colors-and-theming.tsx Outdated
Comment thread platform/docs/src/pages/components/label.tsx Outdated
Comment thread platform/docs/src/pages/components/popover.tsx Outdated
Comment thread platform/docs/src/pages/components/select.tsx
Comment on lines +181 to +183
const handleWheel = useCallback((deltaY: number) => {
setCurrentIndex(prev => Math.max(0, Math.min(TOTAL_SLICES - 1, prev + (deltaY > 0 ? 1 : -1))));
}, []);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Guard the zero-delta wheel path.

When deltaY === 0, the current expression still decrements the index. Add an early return to avoid unintended index changes.

Suggested patch
   const handleWheel = useCallback((deltaY: number) => {
+    if (deltaY === 0) return;
     setCurrentIndex(prev => Math.max(0, Math.min(TOTAL_SLICES - 1, prev + (deltaY > 0 ? 1 : -1))));
   }, []);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const handleWheel = useCallback((deltaY: number) => {
setCurrentIndex(prev => Math.max(0, Math.min(TOTAL_SLICES - 1, prev + (deltaY > 0 ? 1 : -1))));
}, []);
const handleWheel = useCallback((deltaY: number) => {
if (deltaY === 0) return;
setCurrentIndex(prev => Math.max(0, Math.min(TOTAL_SLICES - 1, prev + (deltaY > 0 ? 1 : -1))));
}, []);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@platform/docs/src/pages/components/smart-scrollbar.tsx` around lines 181 -
183, The handleWheel function does not guard against cases where deltaY equals
zero, causing unintended index decrements. Add an early return check at the
beginning of the handleWheel callback to exit immediately if deltaY is 0,
preventing the index from being modified when there is no wheel movement.

Comment thread platform/docs/src/pages/components/tooltip.tsx
- Replace broad body-child CSS reset with targeted selectors for Radix popper, Dialog (.showcase-portal), and Sonner portals
- Add unmount cleanup for CodeBlock copy timer
- Add clipboard fallback and clear-search aria-label on Icons page

@sedghi sedghi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

The displayed copy-paste examples on the dropdown-menu, hover-card, label, popover, and tooltip pages omitted components they reference (Button, Input, Icons, CardDescription). Add the missing imports so each snippet runs as shown.
@dan-rukas

Copy link
Copy Markdown
Member Author

Addressed the substantive items from Code Rabbit:

  • Portal CSS scope — narrowed the reset to the demos' own portal roots (Radix popper wrapper / Dialog / Sonner toaster) so it no longer touches third-party body portals like medium-zoom and DocSearch.
  • CodeBlock — added unmount cleanup for the copy timer.
  • Icons page — clipboard fallback + aria-label on the clear-search button.
  • Usage snippets — completed the imports on the dropdown-menu, hover-card, label, popover, and tooltip examples so they're copy-paste runnable.
  • Theming page a11y — exposed the accordion's expanded state (aria-expanded/aria-controls/role="region") and gave the repeated "Copy Theme" / "Preview in Viewer" links unique aria-labels.
  • Select — associated the label with the trigger via htmlFor/id in the "With label" example.

Leaving these as intentional for this docs PR:

  • font-family quotes (Stylelint) — the repo doesn't run Stylelint, so the rule isn't enforced here.
  • ComponentLayout baseUrl normalizationbaseUrl is /, so there's no prefix to normalize against.
  • data-row selectedId typing — harmless: the docs build transpiles without type-checking, and the value is only ever a string or null at runtime.
  • Mobile grid fallbacks / smart-scrollbar zero-delta guard — minor, not worth changing for these demo pages right now.

Status of the 17 CodeRabbit comments

Addressed (12): portal CSS scope · CodeBlock timer cleanup · Icons clipboard fallback · Icons clear-search aria-label · dropdown-menu / hover-card / label / popover / tooltip snippet imports · accordion ARIA · unique theme-link names · Select label association.

Declined — intentional (5): font-family Stylelint quotes · ComponentLayout baseUrl normalization · data-row selectedId type · mobile grid fallbacks · smart-scrollbar zero-delta guard.

@dan-rukas

Copy link
Copy Markdown
Member Author

Updated the PR description to include the latest updates to documentation including Table and DataTable

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.

2 participants