UUI: Upgrade to 2.0.0 on v17 and consume the Login project by source#23209
UUI: Upgrade to 2.0.0 on v17 and consume the Login project by source#23209iOvergaard wants to merge 6 commits into
Conversation
…themes - Bump @umbraco-ui/uui 1.18.1 -> 2.0.0, drop @umbraco-ui/uui-css - Switch backoffice + login stylesheets from uui-css.css to UUI's light.css - Copy UUI 2.0 theme CSS (light/dark/high-contrast) + fonts from @umbraco-ui/uui - Point dark/high-contrast theme manifests at UUI's dark.css/high-contrast.css; remove local *.theme.css - Migrate UUIFormControlMixin -> UUIFormControlWithBasicsMixin (17 components) - Re-declare the global `Option` type in external/uui so existing code and third-party extensions keep compiling (UUI 2.0 removed it; the exported replacement is UUISelectOption) - Storybook: load UUI themes inline + add a theme toolbar - Raise frontend toolchain to Node 24.13 / npm 11 (required by UUI 2.0 engines) - AcceptanceTest: adjust block colour literals for UUI 2.0 colour normalisation Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…hain to TS6/es2024 Mirrors v18 #22591 onto v17 so the login project builds against the in-repo client source (and therefore UUI 2.0) instead of the published @umbraco-cms/backoffice package. - Login resolves @umbraco-cms/backoffice/* via generated tsconfig path aliases (new devops/tsconfig generator) + vite-tsconfig-paths; drops its @umbraco-cms/backoffice dep - Login index.html loads UUI's light.css from the sibling client's node_modules - StaticAssets: BuildLogin now depends on RestoreBackoffice (Login's tsc walks client src) - Client: TypeScript 5.9.3 -> 6.0.3, es2022 -> es2024 (target/lib), drop baseUrl - Drop now-unnecessary @ts-expect-error around Object.groupBy (6 files); use Object.entries + `?? []` - external/uui: add side-effect import so UUI 2.0 components register when consumed by source; add rollup treeshake moduleSideEffects to preserve UUI's per-component customElements.define() - Bump msw; regenerate mockServiceWorker.js for client + login - Raise login engines + .nvmrc to Node 24.13 / npm 11 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @iOvergaard's task in 5m 45s —— View job PR ReviewTarget: Ports two independently-tested v18 changes to v17: upgrades
Note Complexity advisory — This PR may benefit from splitting.
This is an observation, not a blocker. The full review follows below. Important
Suggestions
Approved with Suggestions for improvementThe migration is thorough, the compat |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-23209.westeurope.6.azurestaticapps.net |
There was a problem hiding this comment.
Pull request overview
This PR upgrades the v17 frontend stack to align with UUI 2.0.0 and updates the Login SPA to type-resolve @umbraco-cms/backoffice/* directly from the in-repo Client source, reducing the need to maintain multiple UUI lines across CMS branches.
Changes:
- Upgrade UUI to
^2.0.0, switch theme assets to UUI’slight.css/dark.css/high-contrast.css, and remove local*.theme.cssoverrides. - Update Login to resolve backoffice imports via generated
tsconfig.jsonpath aliases (+ Vite tsconfig-paths + dev server fs allowlist) and adjust build ordering so Login restore/build has Clientnode_modulesavailable. - Bump frontend toolchain baselines (Node 24.13 / npm 11, TypeScript 6.0.3, ES2024) and clean up
Object.groupByusage now that it’s understood by TS.
Reviewed changes
Copilot reviewed 52 out of 54 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/DataType/BlockListEditor/BlockListBlocks.spec.ts | Adjusts expected color values to match updated UI/theme behavior. |
| src/Umbraco.Web.UI.Login/vite.config.ts | Adds vite-tsconfig-paths + dev server FS allowlist to support consuming Client source/types. |
| src/Umbraco.Web.UI.Login/tsconfig.json | Generated TS config with ES2024 + path aliases to Client source for @umbraco-cms/backoffice/*. |
| src/Umbraco.Web.UI.Login/public/mockServiceWorker.js | Updates MSW worker metadata version. |
| src/Umbraco.Web.UI.Login/package.json | Removes @umbraco-cms/backoffice devDep, bumps engines/tooling, adds generate:tsconfig. |
| src/Umbraco.Web.UI.Login/index.html | Switches dev-time theme import to UUI 2 light.css sourced from Client workspace. |
| src/Umbraco.Web.UI.Login/devops/tsconfig/index.js | New generator that derives Login paths from Client package.json#exports. |
| src/Umbraco.Web.UI.Login/CLAUDE.md | Documents Login-by-source type resolution model + install prerequisites. |
| src/Umbraco.Web.UI.Login/.nvmrc | Updates local Node major to 24 to match new engines baseline. |
| src/Umbraco.Web.UI.Client/vite.config.ts | Updates dev/preview static copy to pull UUI theme CSS + fonts from @umbraco-ui/uui. |
| src/Umbraco.Web.UI.Client/tsconfig.json | Moves Client to ES2024/TS6-era config (generated) and updates path mapping baseline. |
| src/Umbraco.Web.UI.Client/src/packages/user/user-permission/components/input-entity-user-permission/input-entity-user-permission.element.ts | Updates Object.groupBy usage and hardens grouping output to avoid undefined arrays. |
| src/Umbraco.Web.UI.Client/src/packages/user/user-group/components/input-user-group/user-group-input.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/extensions-configuration/property-editor-ui-tiptap-extensions-configuration.element.ts | Refactors grouping code to use Object.entries + nullish-safe arrays under TS6. |
| src/Umbraco.Web.UI.Client/src/packages/templating/templates/global-components/template-card/template-card.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/templating/templates/global-components/input-template/input-template.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/templating/stylesheets/global-components/stylesheet-input/stylesheet-input.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/tags/components/tags-input/tags-input.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/property-editor-ui-content-picker.element.ts | Updates Object.groupBy usage now that TS understands it. |
| src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/config/source-content/input-content-picker-source.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/property-editors/collection/config/column/components/input-collection-content-type-property.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/language/components/input-language/input-language.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document/input-document-granular-user-permission/input-document-granular-user-permission.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document-property-value/input-document-property-value-user-permission/input-document-property-value-user-permission.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/data-type/modals/data-type-picker-flow/data-type-picker-flow-modal.element.ts | Refactors grouping to TS6-friendly Object.groupBy handling with nullish-safe arrays. |
| src/Umbraco.Web.UI.Client/src/packages/data-type/components/data-type-input/data-type-input.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/core/themes/manifests.ts | Updates theme manifest CSS paths to UUI 2 filenames and documents asset-copy expectations. |
| src/Umbraco.Web.UI.Client/src/packages/core/property-editor/ui-picker-modal/property-editor-ui-picker-modal.element.ts | Refactors grouping logic around Object.groupBy to remove TS suppression. |
| src/Umbraco.Web.UI.Client/src/packages/core/property-editor-data-source/input/input-property-editor-data-source.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/core/object-type/input-object-type.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/core/culture/components/input-culture-select/input-culture-select.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/core/components/multiple-text-string-input/input-multiple-text-string-item.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/core/components/multiple-color-picker-input/multiple-color-picker-item-input.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/core/components/multiple-color-picker-input/multiple-color-picker-input.element.ts | Migrates to UUIFormControlWithBasicsMixin for UUI 2 compatibility. |
| src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/composition-picker-modal.element.ts | Refactors grouping and normalizes comment whitespace in changed block. |
| src/Umbraco.Web.UI.Client/src/external/uui/vite.config.ts | Copies UUI theme CSS/fonts from @umbraco-ui/uui and configures Rollup to preserve UUI side effects. |
| src/Umbraco.Web.UI.Client/src/external/uui/package.json | Drops @umbraco-ui/uui-css, bumps @umbraco-ui/uui to ^2.0.0. |
| src/Umbraco.Web.UI.Client/src/external/uui/index.ts | Ensures UUI side-effect import and reintroduces global Option type shim for compatibility. |
| src/Umbraco.Web.UI.Client/src/css/high-contrast.theme.css | Removes legacy local high-contrast theme CSS (replaced by UUI-provided theme file). |
| src/Umbraco.Web.UI.Client/src/css/dark.theme.css | Removes legacy local dark theme CSS (replaced by UUI-provided theme file). |
| src/Umbraco.Web.UI.Client/public/mockServiceWorker.js | Updates MSW worker metadata version. |
| src/Umbraco.Web.UI.Client/package.json | Bumps engines + TypeScript/MSW toolchain versions for UUI 2 / ES2024 baseline. |
| src/Umbraco.Web.UI.Client/package-lock.json | Updates dependency lock to reflect UUI 2 + tooling upgrades. |
| src/Umbraco.Web.UI.Client/index.html | Switches dev index stylesheet from uui-css.css to light.css. |
| src/Umbraco.Web.UI.Client/devops/tsconfig/index.js | Updates generated TS config defaults to ES2024 and removes baseUrl. |
| src/Umbraco.Web.UI.Client/devops/build/copy-to-cms.js | Clarifies that UUI theme CSS is copied earlier by the external/uui workspace build step. |
| src/Umbraco.Web.UI.Client/CLAUDE.md | Updates documented peer dependency to @umbraco-ui/uui ^2.0.0. |
| src/Umbraco.Web.UI.Client/.storybook/preview.js | Loads UUI themes inline and adds a Storybook theme toolbar + decorator. |
| src/Umbraco.Web.UI.Client/.nvmrc | Updates local Node major to 24 to match new engines baseline. |
| src/Umbraco.Cms.StaticAssets/umbraco/UmbracoLogin/Index.cshtml | Switches login page stylesheet reference to light.css. |
| src/Umbraco.Cms.StaticAssets/umbraco/UmbracoBackOffice/Index.cshtml | Switches backoffice host stylesheet reference to light.css. |
| src/Umbraco.Cms.StaticAssets/Umbraco.Cms.StaticAssets.csproj | Makes BuildLogin depend on RestoreBackoffice so Client node_modules exists for type-walk. |
| src/Umbraco.Cms.StaticAssets/CLAUDE.md | Updates docs for new theme filenames and Login build dependency rationale. |
Files not reviewed (1)
- src/Umbraco.Web.UI.Client/package-lock.json: Generated file
Walk back the TypeScript 6 / es2024 toolchain modernisation that rode in with the login-by-source port (#22591), keeping v17 on TypeScript 5.9.x. The login-by-source mechanism itself is retained. - typescript pinned back to 5.9.3 (client) / ^5.9.3 (login); typescript-eslint and typescript-json-schema restored to their pre-port versions - tsconfig generators back to es2022 target/lib and restore `baseUrl` (the baseUrl removal broke `src/...`-style imports under TS 5.9; es2024 lib tripped a private-property intersection in media-thumbnail.stories.ts) - login tsconfig generator targets es2022 to match the client source it compiles - restore the original `@ts-expect-error` guards around Object.groupBy (6 files), since es2022 lib does not type the static method - regenerate client + login tsconfig.json and lockfiles Verified: client `tsc`, login `npm run build`, and `build:for:cms` all green on TS 5.9. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
UUI 2.0 tripled the default --uui-border-radius from 3px (--uui-size-1) to 9px (--uui-size-3). Override the token back to the previous value in umb-css.css so the v17 line keeps its established, subtler rounding. Every UUI component derives its radius from this single token, so one override covers them all; a doubled :root selector raises specificity above the theme files that set it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-23209.westeurope.6.azurestaticapps.net |
The icon-manager dev page still linked the removed uui-css.css. Switch it to UUI's light.css like the other backoffice/login entry points so its styling still loads. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-23209.westeurope.6.azurestaticapps.net |
…tion) The first radius reset only overrode --uui-border-radius. UUI 2.0 added a graduated scale: buttons, button-groups and pagination read --uui-border-radius-3 (15px) and boxes/inputs read --uui-border-radius-2 (9px), so the Save/publish buttons and pagination stayed rounded. Reset all three radius tokens to 3px (--uui-size-1) to fully restore the v1 look. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-ground-017b08103-23209.westeurope.6.azurestaticapps.net |
|
@nielslyngsoe could you give this a review when you get a moment? It's the v17 counterpart of the v18 UUI 2.0 work you reviewed (#21994 + #22591), so most of it will feel familiar — but there are a few deliberate v17-only choices I'd really value your eyes on. Preview: https://victorious-ground-017b08103-23209.westeurope.6.azurestaticapps.net v17-only decisions (this is where I most want your opinion)
What to test on the preview
Known leftover: Thanks Niels 🙏 |
| */ | ||
| @customElement('umb-multiple-color-picker-input') | ||
| export class UmbMultipleColorPickerInputElement extends UUIFormControlMixin(UmbLitElement, '') { | ||
| export class UmbMultipleColorPickerInputElement extends UUIFormControlWithBasicsMixin(UmbLitElement, '') { |
There was a problem hiding this comment.
@iOvergaard
This is properly a problem in terms of a breaking change.
I would assume there are people out there extending UUIFormControl and it seems they need to convert to UUIFormControlWithBasicsMixin but they will not do so as part of a minor upgrade.
Is there any options for us to 'rename' UUIFormControlWithBasicsMixin to UUIFormControl in our export instead?
Why
We currently maintain a matrix of two UUI versions across two (soon three) CMS lines. This brings
@umbraco-ui/uui2.0.0 to v17 so we can converge on a single UUI line to maintain.This is the v17 counterpart of the v18 work — it mirrors #21994 (UUI 2.0 + theme switch), #23183 (final 2.0.0 bump) and #22591 (Login consumes the client by source), adapted to v17/dev with a couple of deliberate v17-only choices (see below).
What changed
1. UUI 1.18.1 → 2.0.0 + theme switch
@umbraco-ui/uuito^2.0.0, drop@umbraco-ui/uui-css.uui-css.cssto UUI'slight.css.light/dark/high-contrast.css) + fonts from@umbraco-ui/uui; point the dark/high-contrast theme manifests at the new filenames and remove the local*.theme.css.UUIFormControlMixin→UUIFormControlWithBasicsMixin(17 components) — the mixin was split in 2.0;WithBasicspreserves the previous behaviour.2. Login consumes the client by source (port of #22591)
@umbraco-cms/backoffice/*from the in-repo client source via generatedtsconfigpath aliases +vite-tsconfig-paths, instead of the published@umbraco-cms/backofficepackage — so it tracks the in-repo UUI 2.0 immediately.BuildLoginnow depends onRestoreBackoffice(Login'stscwalks the client'ssrc/).3. v17-only choices
baseUrlremoval caused build errors, and there's no need to take a TS major on a shipping line just for this.) The original@ts-expect-errorguards aroundObject.groupByare retained.--uui-border-radiusfrom 3px (--uui-size-1) to 9px (--uui-size-3). We override the token back inumb-css.cssso the v17 backoffice keeps its established, subtler rounding. Every UUI component derives from this single token, so one override covers them all. (v18 keeps the new 9px look; this is a deliberate v17 decision to avoid a visible style shift on the shipping line.)Breaking-change considerations (for package authors)
engines, not an optional bump. (TypeScript stays on 5.9.x.)Optiontype that UUI 1.x declared is removed in 2.0 (replaced by the exportedUUISelectOption). To avoid breaking existing code and third-party extensions, the globalOptionis re-declared inexternal/uuiso nothing downstream needs to change (TODO (V19)to migrate toUUISelectOptionand drop the shim).uui-css.css→light.css;dark.theme.css/high-contrast.theme.css→ UUI'sdark.css/high-contrast.css.UUIFormControlMixin's behaviour changed in 2.0; our components moved toUUIFormControlWithBasicsMixin. Extensions should prefer theUmb-prefixed form controls from the backoffice over raw UUI mixins.Verification (local)
tsc(TypeScript 5.9 / es2022)npm run build(compiles the client source through the path aliases, externalises@umbraco-cms/*)npm run build:for:cms(UUI 2.0 themes + fonts copied;light/dark/high-contrast.cssproduced; radius override present in the servedumb-css.css)The
preview/backofficelabel is applied to spin up a preview environment for visual verification (corner rounding, theming).🤖 Generated with Claude Code