Skip to content

feat(ui): update redpanda-ui to ui-registry v2.1.0#2528

Draft
c-julin wants to merge 1 commit into
ben/console-react-19from
jc/ui-registry-2.1.0
Draft

feat(ui): update redpanda-ui to ui-registry v2.1.0#2528
c-julin wants to merge 1 commit into
ben/console-react-19from
jc/ui-registry-2.1.0

Conversation

@c-julin

@c-julin c-julin commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What

Updates Console's vendored redpanda-ui components to ui-registry v2.1.0 (the Base UI–native major release).

Important

Stacked on #2525 (React 19). Registry v2.1.0 components are typed for React 19 (Base UI useRender, mutable RefObject.current, no string refs). On React 18 this produced 6 type errors in vendored components; all 6 disappear on top of #2525 with zero compat patches. Base this PR on ben/console-react-19; review/merge after #2525.

Changes

  • Re-synced all 74 registry components to v2.1.0 via the shadcn registry, dropping the removed lib/base-ui-compat shim.
  • Migrated call sites off the Radix-compat API (per the registry's upgrading-to-base-ui guide + codemod):
    • asChildrender across ~65 files (jscodeshift codemod) + the expression-child cases the codemod skips.
    • Accordion: dropped type/collapsible; value/defaultValue now string[]; onValueChange is (value[], details).
    • ToggleGroup: dropped type; value now string[]; callbacks destructure [v].
    • Removed the dropped transition prop from Progress / Collapsible / Popover / Tabs / Card.
    • Dialog onOpenAutoFocus={e => e.preventDefault()}initialFocus={false}.
    • Card: removed the dropped animated/motion props (entrance animations on the rp-connect onboarding cards are dropped — see Follow-ups).
  • Dependency bumps required by v2.1.0 components:
    • recharts 2 → 3, react-resizable-panels 3 → 4 (directionorientation), added cnfast (new cn() impl in utils).

Type-check status

tsgo is clean except 5 errors at the React-19 + shiki/react-markdown typing boundary (code-block-dynamic.tsx, use-shiki.tsx). use-shiki.tsx is byte-identical to the #2525 base (untouched by this PR) yet errors — i.e. this friction belongs to finalizing React 19, not the registry bump. All five share one root cause (a pre component whose ComponentProps<'pre'> doesn't match hast's Components type) and should resolve together as #2525 settles its shiki typings.

Follow-ups

  • Resolve the shiki/markdown pre-component typing (jointly with feat(frontend): migrate to React 19 via Module Federation bridge #2525).
  • Decide whether to re-add entrance animation to the rp-connect onboarding cards (registry intentionally removed Card's animated path) by wrapping in motion.div.
  • data-[state=…] Tailwind selectors in app code still use the Radix attribute names; remap to Base UI (data-open/data-popup-open/data-panel-open/data-pressed) for correct open/active styling (visual-only, not a type error).

🤖 Generated with Claude Code

Re-sync all 74 registry components to v2.1.0 (Base UI native API),
migrate call sites off the removed compat shim (asChild->render,
Accordion/ToggleGroup string[] API, removed transition props,
onOpenAutoFocus->initialFocus, resizable direction->orientation),
bump recharts->3 and react-resizable-panels->4, add cnfast.
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.

1 participant