Migration of panels from Wix Base UI (wix-base-ui) to Wix Design System (@wix/design-system) in bookings-calendar-catalog-viewer. This is a prerequisite for Dark Mode in Studio 2.0. The plan defines the repeatable process for migrating each panel.
Steps are assigned to either the main conversation (for user interaction) or subagents (for autonomous work):
| Step | Executor | Type |
|---|---|---|
| 1. Audit | Subagent | Explore |
| 2. Rename as Deprecated (separate PR) | Subagent | general-purpose |
| 3. Feature Toggle Setup | Subagent | general-purpose |
4. Migrate using /migrate-bui-to-wds |
Subagent | general-purpose |
| 5. CSS Cleanup + Global CSS Import | Subagent | general-purpose |
| 6. Build & Test | Subagent | general-purpose |
| 7. Punch List & Fix Loop | Subagent | general-purpose |
These steps should generally follow the way migration was done in https://github.com/wix-private/bookings-calendar-catalog-viewer/pull/5635
- Identify all BUI imports in the target panel (
Composites.*,TextLabel,Divider, etc.) - Identify BUI-specific SCSS (imports from
wix-base-ui,classNameoverrides) - Flag any known migration gaps (
TODO(wds-migration): @WDS_MIGRATION_GAP)
- Rename
Settings→DeprecatedSettings(and update all existing references accordingly) - If and only if
SharedSettingsexists:- rename
SharedSettingstoDeprecatedSharedSettings(and update all existing references accordingly) - rename
Settings.mobiletoDeprecatedSettings.mobile(and update all existing references accordingly)
- rename
- This change should be done in a separate PR, to make it clear that the renamed files are only renamed and not changed. Later, we will migrate the renamed components back into
SettingsandSettings.mobileandSharedSettings. - In order for the artifact to remain working in production after the rename, add a
Settings/index.tsxfile the default-exports theDeprecatedSettings/index.tsx, and ifSettings.mobileis renamed, do the same there. - Ask for approval before pushing and creating this PR.
- SharedSettings partial deprecation: If
Settingsonly imports specific components fromSharedSettings/(not the whole folder), deprecate only those components (e.g.SharedSettings/ComponentX/→DeprecatedSharedSettings/ComponentX/), not the entireSharedSettings/directory. This keeps non-deprecated components available for the new WDS path.
- Decide on a FT name. in the format
specs.bookings.<artifactName>MigrateFromBUIToWDS - Wire experiment in entry point gate:
experiments.enabled(EXPERIMENT)→ WDS path, else → Deprecated path - Create entry point
Settings/index.tsxwith experiment gate:- It should render WDS settings when FT is enabled and the Deprecated BUI settings when the FT is disabled
- Both settings should be loaded lazily (using React.lazy), to avoid loading both UI libraries
- If
SharedSettingsexists, createSettings.mobile/index.tsxwith same pattern of lazy load with FT
- Create new WDS versions of all settings components in
Settings/andSharedSettings/using the/migrate-bui-to-wdsskill. - Tell the skill the source deprecated directory, and instruct it not to change the source, but migrate into the target directory.
- If a component has test files (spec or driver), copy them as well to the target directory and update them to use WDS.
- Important The @wix/bookings-editor-ui artifact is using BUI. @wix/bookings-breakpoint-indication is a clone that uses WDS. In migrate code, use @wix/bookings-breakpoint-indication instead of @wix/bookings-editor-ui
- Create
*.stories.tsxfor each migrated component as part of the migration (CSF3 format, 290px settings panel decorator) - If needed, create a
StorybookProviderscomponent to wrap all the providers needed for stories. - Add these scripts in artifacts package.json:
"storybook:start": "yoshi-flow-editor storybook start",
"storybook:build": "yoshi-flow-editor storybook build",
- Don't migrate BUI-specific SCSS imports
- Replace custom padding/margin with WDS spacing tokens (SP1, SP2, etc.)
- Use
Boxlayout props (direction,align,verticalAlign) instead of custom CSS where possible - Ensure root component imports
@wix/design-system/styles.global.css
- Run
yarn && yarn buildto confirm everything compiles - Run unit tests (
yarn test) - Run the
storybook:startscript in the background, and keep track of the storybook local URL. - Open the storybook URL in a browser, then open every story and check that it opens without an error and that it and look good. Check spacing, alignment, and interactive states
- Log each error you encounter.
- Review migrated files: no remaining BUI imports in WDS path, using spacing tokens instead of pixels
- Create a punch list of remaining problems
- Fix issues from the punch list
- Re-build and re-test until clean