Skip to content

Migrate frontend UI primitives to Nebari design registry - #460

Merged
jbouder merged 13 commits into
nebari-dev:mainfrom
MUFFANUJ:migrateToNebariDesign
Sep 3, 2026
Merged

jbouder merged 13 commits into
nebari-dev:mainfrom
MUFFANUJ:migrateToNebariDesign

Conversation

@MUFFANUJ

Copy link
Copy Markdown
Member

Reference Issues or PRs

Closes #439

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Documentation

Access-centered content checklist

Text styling

  • The content is written with plain language (where relevant).
  • If there are headers, they use the proper header tags (with only one level-one header: H1 or # in markdown).
  • All links describe where they link to (for example, check the Nebari website).
  • This content adheres to the Nebari style guides.

Non-text content

  • All content is represented as text (for example, images need alt text, and videos need captions or descriptive transcripts).
  • If there are emojis, there are not more than three in a row.
  • Don't use flashing GIFs or videos.
  • If the content were to be read as plain text, it still makes sense, and no information is missing.

Any other comments?

This PR migrates Nebi’s frontend shadcn setup to the @nebari design registry, replaces the registry-backed UI primitives with Nebari versions, reconciles theme/utils integration, and keeps registry-absent local components explicitly documented. It also updates affected call sites to the new Base UI component APIs while preserving existing behavior and accessibility.

  • Added frontend/components.json with the @nebari registry
  • Installed/reconciled @nebari/theme in frontend/src/index.css
  • Reconciled @nebari/utils with existing cn, capitalize, and getWorkspaceStatusColor
  • Replaced registry-backed primitives: button, input, textarea, badge, card, dialog, tabs, select
  • Added required registry dependency: spinner
  • Kept local-only primitives with notes: alert-dialog, select-v2, split-button, confirm-dialog, user-badge
  • Preserved Nebi-specific tokens like --color-primary-hover and --color-nav-hover
  • Updated feature components for new Dialog, Tabs, Select, and Button APIs
  • Documented the one intentional select ref compatibility exception
  • Verified snapshots do not need updates

@netlify

netlify Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for nebi-docs canceled.

Name Link
🔨 Latest commit 2bf9307
🔍 Latest deploy log https://app.netlify.com/projects/nebi-docs/deploys/6a84d830ab20340008e7a6b1

MUFFANUJ and others added 6 commits August 16, 2026 07:27
Resolved PublishDialog.test.tsx conflicts in favor of the Nebari Select
(combobox) interaction pattern, porting main's focus assertion and
adapting the new refreshes-defaults test from native selectOptions to
combobox clicks.

Co-Authored-By: Claude Fable 5 <[email protected]>
…tion

The merge from main brought in tests written against the old native
select and Radix dialog autofocus. The Nebari/Base UI Select trigger is
a combobox button, so assert on its visible text instead of .value, and
drop the focus wait the Base UI dialog no longer satisfies.

Co-Authored-By: Claude Fable 5 <[email protected]>
@jbouder

jbouder commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Hey @MUFFANUJ — great start on this migration! I experimented on top of this branch (experiment/nebari-design-with-db-fix, branched from your current head 6c1a601) to find where issues remained, and ended up with a set of changes I think this PR needs before merge. Everything below is available as cherry-pickable commits on that branch.

1. Finish the Base UI / Radix migration (7650760)

  • The branch still depends on the old @base-ui-components/[email protected] package — Nebari has since moved to @base-ui/react (^1.7.0). All managed ui/* components need refreshing from the registry after the swap (note the API rename: TabsTrigger → TabsTab).
  • Two Radix packages are still installed and used: @radix-ui/react-alert-dialog and @radix-ui/react-select. I rebuilt ConfirmDialog on the Nebari dialog, migrated ShareDialog and GroupMembersDialog to the Nebari select, and deleted alert-dialog.tsx and select-v2.tsx — after that both Radix deps drop out of package.json.

2. Align the app shell and theme tokens with current Nebari standards (same commit)

  • The page shell/body should sit on bg-canvas (the body was still on --color-background), with the canonical navigation-menu header: h-14, bg-header, h-8 logo, NavLink items; bg-sidebar for the admin chrome; px-12 py-6 body padding.
  • A few dark-mode tokens are stale vs @nebari/theme: --popover should match the card surface (oklch(33.01% 0.0052 286.11)) and --muted should be oklch(39.94% 0.0066 286.1).
  • --color-nav-hover: #f5effe is a hardcoded hex with no dark variant — I replaced it with app-defined header-action-hover / sign-out-foreground tokens defined for both themes.
  • AdminDashboard had raw hex/palette surfaces that should be semantic tokens, plus some Card padding fights and muted-text pairing issues.

3. Use the Nebari table component (db211b7) — the pages still render raw <table> markup. I added ui/table.tsx from the registry and migrated Workspaces, WorkspaceDetail, RemoteWorkspaceDetail, Registries, AuditLogs, FederatedIdentityReviews, Groups, RegistryManagement, and UserManagement.

4. Use the Nebari code block (660c772, 0aaa6ba) — raw <pre> blocks in Jobs, WorkspaceDetail, RemoteWorkspaceDetail, and AuditLogs should use the registry's ui/code-block.tsx (dark-forced card surface with the floating copy button). I also wrapped PixiTomlEditor's TOML textarea in the same CodeBlock frame so the editable view matches the read-only one.

Heads-up (unrelated to design): while testing on a populated database I hit a SQLite startup crash dropping workspaces.package_manager — that fix is up separately as #550, so no action needed here beyond rebasing once it lands.

Happy to walk through any of it — the full diff is at 6c1a601...experiment/nebari-design-with-db-fix.

@jbouder

jbouder commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@MUFFANUJ , a few styling changes we need to make:

  1. Update all code blocks to remove the dark prop
  2. Update the tabs component to use the updated version just merged. Heres the diff, in case you need it: nebari-dev/nebari-design@9f96672

@pmeier
pmeier requested a review from jbouder September 3, 2026 06:45

@jbouder jbouder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice migration overall: the installed ui/* files match the upstream registry, the theme tokens match, no Radix/asChild usage remains, and build/lint/tests are green. Requesting changes for two behavior regressions plus a handful of should-fixes, most left inline.

Blocking (not in the diff, so noted here): frontend/src/lib/brandingConfig.ts:109-116 — runtime branding (public/config.json → theme.light/dark) emits --color-primary, --color-primary-hover, etc. The new theme is @theme inline, so utilities now compile straight to var(--primary) (the built CSS has .bg-primary{background-color:var(--primary)}), meaning every operator-configured brand color is silently ignored, and --color-nav-hover no longer exists at all. Please map incoming keys to the bare Nebari variables (--primary, --primary-hover, …), drop or remap navHover, and update brandingConfig.test.ts:53-54, which still asserts the dead variable names.

The other blocking item (header NavLink active suppressing navigation from detail pages) is inline on Layout.tsx.

Comment thread frontend/src/components/ui/table.tsx Resolved

@jbouder jbouder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work! Thank you for working through this.

@jbouder
jbouder merged commit 75dfa23 into nebari-dev:main Sep 3, 2026
13 checks passed
@MUFFANUJ
MUFFANUJ deleted the migrateToNebariDesign branch September 3, 2026 13:33
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.

Migrate nebi Frontend shadcn Components & Theme to the @nebari Design Registry

2 participants