Skip to content

Hotfix: export a Backoffice version of demandCustomElement - #23624

Merged
nielslyngsoe merged 3 commits into
release/17.6.1from
v17/hotfix/uui-demandCustomElement
Aug 11, 2026
Merged

Hotfix: export a Backoffice version of demandCustomElement#23624
nielslyngsoe merged 3 commits into
release/17.6.1from
v17/hotfix/uui-demandCustomElement

Conversation

@nielslyngsoe

Copy link
Copy Markdown
Member

export demandCustomElement as part of the Backoffice impartmap: '@umbraco-cms/backoffice/external/uui';

making it posible to do this: import { demandCustomElement } from '@umbraco-cms/backoffice/external/uui';

Copilot AI lite review requested due to automatic review settings August 11, 2026 06:52
@claude

claude Bot commented Aug 11, 2026

Copy link
Copy Markdown

Claude finished @nielslyngsoe's task in 4m 23s —— View job


PR Review

Target: origin/release/17.6.1 · Based on commit: 8c99d7fe

Re-exports demandCustomElement from UUI v1.x as a backwards-compatibility shim in the backoffice importmap, making it importable via @umbraco-cms/backoffice/external/uui for plugin developers whose code depended on UUI 1.x.

  • Other changes: New demandCustomElement export added to the @umbraco-cms/backoffice/external/uui importmap entry. This function was present in UUI v1 but dropped in v2; the shim re-implements it locally.

Important

  • src/Umbraco.Web.UI.Client/src/external/uui/index.ts:20: The TODO targets v.18 for removal, but the 2-major-version rule (deprecated in vN → removed in vN+2) applied to v17 requires v19. The existing Option shim directly above uses // TODO (V19): ... — this is inconsistent and leaves consumers one major version less time to migrate. Suggest: // TODO (V19): Remove this backwards-compat shim when UUI v1.x consumers have migrated.

Suggestions

  • src/Umbraco.Web.UI.Client/src/external/uui/index.ts:21: @func defineElement in the JSDoc names the wrong function — the exported function is demandCustomElement, not defineElement. Looks like a copy-paste artifact. Either fix the tag (@function demandCustomElement) or remove the redundant @func tag since TypeScript already captures the name.

  • src/Umbraco.Web.UI.Client/src/external/uui/index.ts:27: Since this export is explicitly temporary (scheduled for removal), adding a @deprecated JSDoc tag would surface an IDE warning to any developer who imports it, signalling they should not build new features on top of it. Per docs/deprecation.md, deprecated exports should also emit a runtime warning via UmbDeprecation.


Approved with Suggestions for improvement

Good to go for the backwards-compat purpose. Please carefully consider the removal version in the TODO — aligning with V19 (matching the adjacent Option shim) would give consumers the standard migration window and keeps the file internally consistent.


  • Read review skill and gather context
  • Analyze changed files
  • Post findings (2 inline review comments + summary)
  • Apply labels (area/frontend)

Copilot AI 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.

Pull request overview

This PR adds a Backoffice-exported demandCustomElement helper to the @umbraco-cms/backoffice/external/uui entrypoint, enabling consumers (including extensions) to import it via the Backoffice importmap while maintaining compatibility with legacy UUI 1.x custom-element usage.

Changes:

  • Exported a new demandCustomElement function from the Backoffice UUI external index.
  • Implemented a console warning when a required custom element is not registered.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/Umbraco.Web.UI.Client/src/external/uui/index.ts
Comment thread src/Umbraco.Web.UI.Client/src/external/uui/index.ts
Comment thread src/Umbraco.Web.UI.Client/src/external/uui/index.ts
Comment thread src/Umbraco.Web.UI.Client/src/external/uui/index.ts
@claude claude Bot added the area/frontend label Aug 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

@nielslyngsoe
nielslyngsoe enabled auto-merge (squash) August 11, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/frontend release/17.6.1 status/regression A previously working feature that has broken or changed behavior unexpectedly type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants