Skip to content

Migrate consumers to @workflowbuilder/ui (2/3: consumers) - #45

Open
librowski wants to merge 6 commits into
ui-packagefrom
ui-consumers
Open

Migrate consumers to @workflowbuilder/ui (2/3: consumers)#45
librowski wants to merge 6 commits into
ui-packagefrom
ui-consumers

Conversation

@librowski

@librowski librowski commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Part 2 of 3. Stacked on #44 (base branch librowski/ui-package) - review/merge that first. This PR's diff is only the consumer migration.

Summary

Switches sdk / demo / ai-studio off the published @synergycodes/overflow-ui@1.0.0-beta.27 (MUI) onto the in-repo @workflowbuilder/ui (Base UI) added in Part 1, and fixes the resulting API breaks.

Changes

  • 75 imports @synergycodes/overflow-ui@workflowbuilder/ui; dependency → workspace:*; @base-ui/react added to sdk/demo/ai-studio.
  • Removed the LOCAL_OVERFLOW_UI vite aliases, the overflow-ui-css alias, and the dev:local script. SDK index.css now pulls @workflowbuilder/ui/{tokens,index}.css.
  • Fixed the real Base UI API breaks: Switch.onChange(checked, event) and DatePicker date-fns valueFormat. Menu / Select / IconSwitch / Tooltip were already compatible.
  • Renamed in-source references (sdk comments/JSDoc) and the docs code-example imports to @workflowbuilder/ui.
  • Changeset for @workflowbuilder/sdk included.

Verification

  • pnpm install clean; build, build:lib, build:ai-studio, build:docs green; typecheck, lint, test (sdk 184 + execution-core 78) green.
  • Rendered demo + ai-studio in a browser: components styled (layer order, switches, modal backdrop transition, datepicker, select). The base-ui 1.4.1 pin (Part 1) is what keeps the modal backdrop fade working - 1.6.0 regressed it.
  • Nothing resolves @synergycodes/overflow-ui from npm or the old local dist path.

Update (2026-07-31): review fixes + rebase

Rebased onto the fixed #44 / current main; review fixes landed on this branch.

  • feat(sdk): reduce required peer dependencies #69 reconciliation: kept main's reduced peerDependencies shape (4 peers) with the demoted packages as regular dependencies; this PR's changes layered on top.
  • Semantic conflicts caught beyond git's textual merge: 5 files main added/changed after this branch diverged still imported @synergycodes/overflow-ui (use-on-connect.tsx + spec, two stale spec mocks, ai-studio undo-redo buttons) - migrated to @workflowbuilder/ui.
  • @base-ui/react and @phosphor-icons/react are now externalized from the SDK bundle and @base-ui/react is a regular SDK dependency (supersedes the earlier framing that Base UI ships inlined). Verified in dist: real @base-ui/react imports, no @workflowbuilder/ui leakage in JS or .d.ts.
  • Dead MUI-era selectors fixed (they silently stopped working after the Base UI swap): ModalProvider now toggles a wb-modal-open class on body (driven by the existing modal store); the datepicker-in-modal z-index rule targets Base UI [data-open] popovers under that class, and the variable-suggestions backdrop suppression is repointed at it. Verified at mechanism level + compiled CSS; a quick visual pass (modal + datepicker, modal + variable suggestions) is recommended during review.
  • Changeset expanded: stays minor, now calls out that internal DOM structure / class names changed across all bundled UI and that @base-ui/react is a new regular dependency.

Verification (fresh): full gates re-run 2026-07-30/31 on the stack (typecheck / lint / tests / all builds green); pnpm install --frozen-lockfile verified on this tip. Note: pr-check only runs for PRs targeting main, so this PR shows no checks until #44 merges.

librowski-synergy and others added 6 commits July 31, 2026 16:35
The SDK bundles @workflowbuilder/ui and @base-ui/react into its dist, but
declared them as runtime dependencies - so a published @workflowbuilder/sdk
would 404 on @workflowbuilder/ui (not published) at npm install. Move both to
devDependencies (they are inlined, consumers don't install them).

Add @workflowbuilder/ui to the dts plugin's bundledPackages so its types are
inlined into dist/index.d.ts instead of leaking unresolvable
import('@workflowbuilder/ui') references into the public type surface. Verified:
no real ui/base-ui imports remain in dist/index.d.ts.

Remove the obsolete docs/overflow-ui.md (described the old external
@synergycodes/overflow-ui local-dev flow this migration replaces).
… branch point

Rebasing onto current main pulled in commits landed after this branch
diverged (WB-339's use-on-connect.tsx, PR #48's language-selector spec,
PR #48's ai-studio undo-redo buttons) that still imported the retired
@synergycodes/overflow-ui package. Point them at @workflowbuilder/ui
like every other already-migrated call site, and regenerate the
lockfile for the fully rebased dependency graph.
…undle

@workflowbuilder/ui is bundled (not externalized) into the SDK, so
@base-ui/react was being inlined transitively into dist/index.js even
though the SDK never imports it directly. @phosphor-icons/react was
already a direct SDK dependency but was likewise getting bundled a
second time on top of the copy demo/ai-studio install directly.

Add both to the SDK's Vite external list and move @base-ui/react from
devDependencies to dependencies, mirroring the treatment already used
for i18next/jsonforms/immer/zustand and matching how packages/ui
declares them.
The datepicker z-index fix (index.css) and the variable-suggestions
backdrop suppression (variable-text.module.css) both keyed off
`.base-Modal-root` and `.mantine-Popover-dropdown`, class names from
the retired MUI Base + Mantine modal/popover. Neither selector matched
anything after the Base UI migration, silently reintroducing both bugs:
a datepicker opened inside a modal rendered behind it, and the
variable-suggestions backdrop no longer disappeared when a modal opened
on top of it.

ModalProvider now toggles a `wb-modal-open` class on <body> whenever the
SDK's modal store has a modal open - a stable signal owned by the SDK
rather than coupled to @workflowbuilder/ui's internal markup. Both
selectors are repointed at it; the datepicker fix additionally keys off
Base UI's own `[data-open]` popup attribute, since the DatePicker's
popover class is a hashed CSS module class internal to
@workflowbuilder/ui.
Update the move-ui-library-in-repo changeset: @base-ui/react is now a
regular dependency of the SDK rather than an inlined implementation
detail, and note explicitly that internal DOM structure and class
names of the bundled UI changed (MUI Base + Mantine -> Base UI), so
consumer styles or tests written against internal class names may need
updating. Stays a minor bump.
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