User-collection-table didn´t format and if you have da backoffice the time is still Am/pm
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Fix detail data request manager failing as soon as the number of items requested hits the UmbItemDataApiGetRequestController batch limit (40)
Co-authored-by: Paul Woodland <paul.woodland@pwnewmedia.com>
* feat(media): add umb-thumbnail and configurable checkerboard background
Adds `umb-thumbnail` as the recommended alias of `umb-imaging-thumbnail`
(the original tag stays registered for backwards compatibility), and makes
the checkerboard background opt-out via the `--umb-thumbnail-background` CSS
custom property plus an `img` part for full styling control. Also fixes an
action-event listener leak in the thumbnail element, and adds a Storybook
story, an MDX guide, and component tests.
Closes#23177
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(media): address PR review on umb-thumbnail
- Rephrase the imaging-thumbnail JSDoc to a neutral alias statement instead of
a "prefer" wording that read like an undeclared deprecation.
- Guard the thumbnail tests so a renamed private field fails loudly rather than
producing vacuous assertions.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(media): make umb-thumbnail canonical, deprecate umb-imaging-thumbnail
Invert the inheritance so the implementation lives on `UmbThumbnailElement`
(`umb-thumbnail`) and `UmbImagingThumbnailElement` (`umb-imaging-thumbnail`)
is the thin subclass. Removing the old tag is now just deleting one file.
The deprecated subclass emits a one-time `UmbDeprecation` warning (a
module-level guard avoids per-instance console spam) and carries a
`@deprecated` JSDoc, scheduled for removal in Umbraco 19.
Migrate the four internal consumers to `umb-thumbnail` so the deprecation
warning targets external code only, not our own.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(media): trim deprecated-alias thumbnail tests to a registration guard
The img part, checkerboard default and --umb-thumbnail-background override are
covered by thumbnail.element.test.ts and inherited from UmbThumbnailElement, so
re-asserting them on the umb-imaging-thumbnail subclass only tested inheritance.
Keep a single backwards-compat guard that the deprecated alias stays registered
and on the inheritance chain.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(media): rename canonical thumbnail to umb-media-thumbnail; alias keeps @deprecated, no runtime warning
Per review (Niels): the forward-looking name is `umb-media-thumbnail`
(`UmbMediaThumbnailElement`), leaving room for non-media thumbnails later. The
implementation, CSS custom property (`--umb-media-thumbnail-background`), story,
guide and internal consumers all use the new name.
`umb-imaging-thumbnail` stays registered as a thin alias and keeps its
`@deprecated` JSDoc (IDE signal) but no longer emits a runtime UmbDeprecation
warning — both tags fly for now. Docs and comments lead with umb-media-thumbnail.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(core): annotate deprecation warnings with caller origin, suppress core noise in production
Deprecation warnings now state where the call most likely came from — Umbraco
core, an /App_Plugins package, or other custom code — by classifying the call
stack (first frame not under /umbraco/backoffice/ is the caller). This answers
the Codegarden feedback that you can't tell whose code triggered a warning.
In production builds, core-origin warnings are suppressed (a consumer can't act
on Umbraco's own code); package/external/unknown origins are always shown. The
production signal is the client build, not the server runtime mode — the latter
is unreliable since Umbraco Cloud defaults to BackofficeDevelopment. The new
umbIsProductionBuild() reads Vite's import.meta.env.PROD (substituted to true in
the shipped core bundle) and falls back to false outside a Vite build.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(core): cleaner deprecation output and drop the throw for stack capture
Read new Error().stack directly instead of throwing and catching — the stack is
populated on construction. Annotate the warning with the resolved origin on its
own line rather than a bracketed prefix, and rely on the browser's native
expandable stack on console.warn for the full clickable trace instead of
printing one ourselves.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore(core): trim inline comments in deprecation utils
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(core): address PR review on deprecation origin
- Clarify umbIsProductionBuild docs: in Vite dev import.meta.env is defined
(PROD false); the guard is for non-Vite contexts (tsc pass, web-test-runner).
- Strip query/fragment from parsed frame URLs so the external-origin label
can't carry ?/# noise.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Guard against cache poisoning from concurrency
* Resolve code review comments relating to tests.
* Avoid unnecessary second invalidation of memory cache generatio.
* Tighten the cache-generation guard.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Display appropriate content type name in compositions dialog localised texts.
* Fix composition dialog translation typos and link references to the matching workspace
- fr: "sililaire" -> "similaire"
- it: "utlizzato" -> "utilizzato"
- es: remove duplicated "no puede no puede"
The reference list now builds its workspace edit href from the modal's
entityType instead of hardcoding document-type, so links resolve correctly
when the dialog is used for Media Types and Member Types.
* Integrate interaction memories into entity data picker
* Skip resetting unchanged data source API
Add an early-return guard in setDataSourceApi to avoid re-setting the same UmbPickerDataSource instance. Prevents rebuilding the modal token/route (which would close and reopen an open picker modal) on every re-render by only updating when the API actually changes.
* Add UmbEntityInputInteractionMemoryManager + implement across current inputs with memory
* clean up comment
* Block RTE: Implement unsupported block rendering
* Fixes `.ProseMirror-selectednode` focus ring
* Markup tidy-up
* Adds test for `umb-unsupported-rte-block`
* Block RTE: Reflect unsupported state as a host attribute
Replaces @state() + toggleAttribute() with @property({ reflect: true })
so Lit manages the 'unsupported' attribute sync during the update cycle,
avoiding constructor-time attribute access flagged by the linter.
Also removes the now-inert uui-text/uui-font classes from the block
wrapper div (backing styles were removed with UmbTextStyles).
* Adds JSDoc comment to `unsupported` property
* Block RTE: Extract #observeBlockViewProps() to reduce constructor size
Moves the block-view-props observer setup out of the constructor into a
dedicated #observeBlockViewProps() method, following the same pattern as
#observeData(). Reduces constructor from 123 to 64 lines (threshold: 70).
The `loaded`-signal test (added in #23167) built its host with
`UmbControllerHostElementMixin(HTMLElement)`, mirroring the older
`UmbBaseExtensionInitializer` tests. But `UmbExtensionInitializerBase`
requires a full `UmbElement` host, so the test failed `tsc` (TS2345)
under the root tsconfig. The product build excludes `*.test.ts`, so it
slipped through CI but breaks `npm run compile`/the editor.
Use `UmbElementMixin(HTMLElement)`, matching what production callers pass
(app/backoffice/preview elements are all UmbElements).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reconciles app.element.ts with #23020 (parallelized public extensions).
Kept the boot gate (await the app-entry-point initializer before routing)
and restored a blocking inline `await registerPublicExtensions()` instead
of the parallelized deferred form — a marginally slower but more robust
boot, identical to the release/17.5.0 fix (no empty-first-pass timing
reliance). extension-initializer-base.ts, the unit test, the acceptance
test and playwright config merge cleanly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* map settings to become a key-value-object
* implement type safety for block label ufm values
* added TODOs
* support variant value in Block Workspace Label
* External login: wait for app-entry-points before the login provider decision
The backoffice boot stopped waiting for app-entry-point extensions to settle
before deciding which auth provider to use (regression introduced in #22522).
On a slow connection an externally registered authProvider (e.g. Umbraco ID)
is not registered yet when the login screen renders, so the user is dropped on
the local login instead of being redirected to the external provider.
- extension-initializer-base: `loaded` re-arms to `undefined` while a pass is in
flight and resolves to `true` unconditionally (including zero extensions), so
`.asPromise()` gates correctly and never hangs on a default install (which has
no app-entry-points) — the reason the await was removed in the first place.
- app.element: restore the awaited boot gate before routing.
Tests:
- Unit test for the `loaded` signal contract (zero extensions resolves; a late,
slow extension is awaited).
- Playwright acceptance test that deploys an app-entry-point registering an
authProvider after a delay and asserts it is offered on the login screen.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(backoffice): guard the loaded-gate timing for permission loading
Add a test asserting the collection initializer's `loaded` does not open the
gate (`#loadedGuard` awaits it via `.asPromise()`, fronting private-extension
and user-permission loading) until the initially-registered extensions have
instantiated. Addresses the #22522 "user permissions resolved too late" concern
in writing; user-permission condition resolution itself lives in
UmbBaseExtensionInitializer (covered by base-extension-initializer.race.test.ts)
and is untouched by this change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(backoffice): harden loaded signal + narrow acceptance test glob (review)
Address PR review feedback:
- extension-initializer-base: only the latest processing pass settles `loaded`
(monotonic pass id), so a slow earlier pass can't unblock waiters early when
the async observer overlaps passes; and use `Promise.allSettled` so a throwing
`instantiateExtension` can't leave `loaded` stuck at `undefined` (hanging the
boot gate) — failures are logged rather than swallowed.
- playwright.config: narrow the project glob to `**/*.spec.ts` so Playwright
doesn't try to load the App_Plugins `entry-point.js` ESM fixture as a test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Adds UFM Member Name component
This is to support the standalone Member Picker values.
* fix(ufm): clear stale value on empty member picker; validate UDI-extracted GUIDs
* test(ufm): add umbMemberName parsing tests to marked-ufm.test.ts
Address PR review feedback:
- extension-initializer-base: only the latest processing pass settles `loaded`
(monotonic pass id), so a slow earlier pass can't unblock waiters early when
the async observer overlaps passes; and use `Promise.allSettled` so a throwing
`instantiateExtension` can't leave `loaded` stuck at `undefined` (hanging the
boot gate) — failures are logged rather than swallowed.
- playwright.config: narrow the project glob to `**/*.spec.ts` so Playwright
doesn't try to load the App_Plugins `entry-point.js` ESM fixture as a test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a test asserting the collection initializer's `loaded` does not open the
gate (`#loadedGuard` awaits it via `.asPromise()`, fronting private-extension
and user-permission loading) until the initially-registered extensions have
instantiated. Addresses the #22522 "user permissions resolved too late" concern
in writing; user-permission condition resolution itself lives in
UmbBaseExtensionInitializer (covered by base-extension-initializer.race.test.ts)
and is untouched by this change.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The backoffice boot stopped waiting for app-entry-point extensions to settle
before deciding which auth provider to use (regression introduced in #22522).
On a slow connection an externally registered authProvider (e.g. Umbraco ID)
is not registered yet when the login screen renders, so the user is dropped on
the local login instead of being redirected to the external provider.
- extension-initializer-base: `loaded` re-arms to `undefined` while a pass is in
flight and resolves to `true` unconditionally (including zero extensions), so
`.asPromise()` gates correctly and never hangs on a default install (which has
no app-entry-points) — the reason the await was removed in the first place.
- app.element: restore the awaited boot gate before routing.
Tests:
- Unit test for the `loaded` signal contract (zero extensions resolves; a late,
slow extension is awaited).
- Playwright acceptance test that deploys an app-entry-point registering an
authProvider after a delay and asserts it is offered on the login screen.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Build: tag prerelease npm publishes with 'next' dist-tag
Prereleases that flow through Deploy_Npm (e.g. 18.0.0-beta1) currently
land on the `latest` dist-tag, so a bare `npm install @umbraco-cms/backoffice`
resolves to an unstable build. Switch to `--tag next` when
NBGV_PrereleaseVersion is non-empty, leaving `latest` for stable releases.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Build: address review feedback on npm prerelease dist-tag
- Add Build to Deploy_Npm dependsOn so stageDependencies.Build.A.outputs
resolves explicitly (mirrors the Upload_API_Docs pattern).
- Pass npmPrereleaseVersion via env: instead of inline macro expansion in
bash, so an unset variable won't be interpreted as command substitution.
* Build: source npmPrereleaseVersion via dependencies, not dependsOn
Switches the variable mapping from stageDependencies (which needs Build
in dependsOn) to dependencies.Build.outputs[...], matching the pattern
the stage's condition already uses on line 941. Avoids drawing a
redundant parallel arrow from Build to Deploy_Npm in the ADO stage
graph — Build is already in the ancestor chain via Deploy_NuGet.
* Build: align Deploy_Npm with Umbraco Deploy publish pattern
- Use stageDependencies form in variables: (dependencies.* only works in conditions).
- Source NBGV_PrereleaseVersionNoLeadingHyphen for a cleaner check.
- Replace echo >> .npmrc with npm config set --location=project.
- Collapse if/else into a tag=latest|next shell variable; single npm publish *.tgz.
- Drop unnecessary env: passthrough and npm init -y.
Per Ronald's feedback on PR #22909 — mirrors the Deploy pipeline's release stage.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Populate the domain cache eagerly during start-up
* Added extension method to encapsulate and test logic for skipping startup seeding.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* update tiptap event listneres
* Tiptap: Add regression test for toolbar button active state on collapsed-cursor toggle (closes#22907)
Tests verify the `transaction` listener wiring that fixes the stored-mark active-state bug.
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
Backoffice: Move fetchAllPages into the repository module to break a core circular import
#22765 added the offset pagination helper `fetchAllPages` under
`@umbraco-cms/backoffice/utils`, but its contract is expressed entirely in
repository-owned types (`UmbDataSourceResponse<UmbPagedModel<T>>`). That made
`utils` import `repository` while `repository` already imports `utils`,
introducing a 17th core bidirectional module import and tripping
`check:module-dependencies` (threshold 16) — failing the `test` job on every
open PR.
Relocate the helper (and its test) into the `repository` module, which
legitimately owns those types, and export it from
`@umbraco-cms/backoffice/repository`. The sole consumer
(UmbLanguageCollectionRepository) already imports from that module. Core
bidirectional imports are back to 16.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Recover cache-sync job if database Sync() hangs.
* Apply also to TouchServerJob.
* Addressed code review comments.
* Added debug logging to allow monitorring of job runs.
* Added tests verifying that jobs resume after an inflight call completes.
* Add endpoints for sorting documents and media by system fields.
* Addressed code review feedback.
* Persist sort-children-by-field with a single set-based update.
* Addressed second round of code review feedback.
* DRYed up similar code, improved comments.
* Split tests into individual class files
* Added test for combined sort of invariant and variant children.
* Addressed further code review feedback.
* Include test scenario from #23128 for SortChildren()
* Renamed children authorizer as it is generic, not specific for sorting - and updated XML docs accordingly
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Prevent empty domain cache during concurrent initialization.
* Addressed code review comments and added further comment to the code.
* Use Lock object.
* Ensure all languages are retrieved handling rare (theoretical?) case where the number of languages exceeds the default page size.
* Addressed code review feedback.
* Addressed further code review feedback.
* Add configurable period for scheduled publishing task with optional clock alignment.
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Addressed code review comments.
* Clarified the maths, improved comments and test coverage.
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Guard read of session ID for log enrichment by presence of session cookie.
* Renamed tests.
* Add configurable option for session ID logging, retaining backward compatibility but giving options to skip session Id logging or use a cookie hash.
* Surface a package migration exception as a boot failure, avoiding being stuck in an upgrading state.
* Addressed code review feedback.
* Fix failing integration tests.
* Support tree expansion in generic Duplicate To modal
* Add expansion prop to tree picker modal types
* Apply expansion from data to picker context
* move to action: populate tree picker expansion with ancestors
* Pass tree expansion to duplicate document modal
* Extract ancestor fetching into private method
* Use UmbDocumentTreeRepository directly
* Exclude self from ancestor results
* make name more explicit
* Guard ancestor fetch and simplify expansion
* Only set treeExpansion when ancestors exist
* fix type issues
* Parallelize ancestor and pickable filter fetch
* Use getter for treeExpansion; remove unused imports
* Ensure requests to fetch ancestors after retrieving search results are batched to avoid a single query exceeding the maximum URL length.
* Guard against undefined ancestor entries from a failed batch
batchTryExecute resolves each chunk via tryExecute, which never rejects, so
a per-chunk failure comes back as a fulfilled result carrying an error and
leaves an undefined hole in the amalgamated data without surfacing an error.
Detect that before mapping and return an explicit error instead of throwing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Assert ancestor id uniqueness and silence direct-api lint rule
Strengthen the batching tests to assert every search-result id is requested
exactly once (Set size), not just that the total count matches. Add the
no-direct-api-import disable on the controller's api callback, matching the
existing url data sources, since the call is wrapped by the controller.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Addessed Codescene warnings.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Prevent empty domain cache during concurrent initialization.
* Addressed code review comments and added further comment to the code.
* Use Lock object.
* perf(tree): coalesce concurrent identical tree data requests
The tree data request manager hit the network on every call, so multiple
concurrent consumers (sidebar tree, breadcrumb structure, pickers) each
fetched the same data independently — e.g. three identical tree/document/root
requests per document-workspace load.
Apply the existing UmbManagementApiInFlightRequestCache (already used by the
item and detail request managers) to the tree request manager via a shared
static cache, coalescing concurrent identical root/children/ancestors/siblings
calls into a single in-flight request, cleared on settle (in-flight only, so
no stale-cache risk). The document tree opts in; other trees are unchanged
until they pass a cache.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(tree): cover request coalescing; address review feedback
- Add focused tests: concurrent identical root requests share one call,
the in-flight entry is cleared on settle, and no cache means no coalescing.
- Build the cache key lazily (only when a cache is wired) so non-opted-in
trees keep the original lightweight path.
- Constrain the #coalesce generic to drop the cast on cache.set.
- Document the new inflightRequestCache arg; trim the comment to one line.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Tolerate invalid data type configuration when getting the editor value storage type.
* Add logging in case of error.
* Resolve warning.
* Removed exception from warning (it's not useful).
* Log an error instead of a warning.
* Menu Structure: Guard against use-after-destroy in async structure request
When navigating to a trashed item, the IS_NOT_TRASHED condition initially
permits the standard menu structure context, which is then destroyed once the
workspace confirms the item is trashed. The in-flight async #requestStructure()
could resume after destruction and call setValue() on a completed subject,
throwing "_subject is undefined".
Guard the state mutations with the framework's existing _host-cleared-on-destroy
signal, and handle the previously fire-and-forget #requestStructure() promises so
a teardown mid-request is silently abandoned rather than surfacing as an uncaught
rejection. Applied to both the variant and non-variant menu structure base
contexts.
* Menu Structure: Make #requestStructure non-throwing instead of catching at call sites
Per PR review feedback: replace the blanket .catch(() => {}) wrappers with
early returns inside #requestStructure(). The _host guard already prevents
post-destroy state mutation; the throws only fire for can't-happen missing
observable states and were producing unhandled rejections with no caller
able to act on them.
* Added console warning, if the host is still available
* Block Grid: Guard validator against torn-down manager on navigation
The form-control mixin's updated() hook runs validators when the element
re-renders during teardown. If navigation has already disposed _manager,
checkBlockTypeConfigurationValidity would throw "Cannot read properties
of undefined (reading 'getContentTypeKeyOfContentKey')".
Early-return as valid when the manager is gone and use optional chaining
on the per-entry lookup as a safety net.
* Removed optional chaining of `_manager`
As `_manager` has already been checked.
* Reverting the `_manager` optional chaining
As TypeScript compiler doesn't like it, (inside the `filter` callback).
* Update uploaded media file name to a friendly name.
* Correct test description for acronym handling.
The case JUST-A-FILE.jpg verifies all-uppercase words are preserved
as acronyms, not that lowercase words get lowercased.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Match server-side StripFileExtension semantics in toFriendlyName.
The TypeScript helper previously delegated to getFileExtension, which
diverges from the C# StripFileExtension on two edge cases:
- a trailing dot ("file.") is stripped by the server but not the client
- an "extension" containing whitespace is preserved by the server but
stripped by the client
Inlined a stripFileExtension helper that mirrors the C# rules exactly,
making the "keep in sync" cross-reference accurate. Added tests for both
divergent cases and replaced the contrived leading/trailing whitespace
test with a realistic interior-whitespace case.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Add parity test for trailing-whitespace extension span.
Restores the ' spaced-name.jpg ' case as a parity test against
StripFileExtension's "extension containing whitespace is preserved"
rule. Output is 'Spaced Name.Jpg' (Jpg title-cased, matching the
server's TextInfo.ToTitleCase behaviour on the now-unstripped extension).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Handle getContext rejection in ensureMediaNameFromFile.
getContext rejects on timeout when the dataset context never resolves;
callers used void ensureMediaNameFromFile(...) so an unhandled rejection
would bubble. Catch the rejection and treat it as an absent context.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* Adds conditions to Document Recycle Bin
that the user must have "Read" permission.
* Directly imports Media Recycle Bin condition
this will remove an extra fetch request.
* Improve cohost polyfill
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Move <target/> part of the polyfill to targets file.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Improve cohost polyfill
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Move <target/> part of the polyfill to targets file.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* perf(core): parallelize independent boot API requests
UmbServerConnection.connect() awaited server status and configuration
sequentially even though they are independent reads; run them with
Promise.allSettled so both errors surface (the app cannot function
without either) while saving a round-trip.
During app startup, public (login) extension registration was awaited
before the auth flow; kick it off in parallel and await it only before
routing, where the login screen actually needs it.
Each serialized call costs a full management-API round-trip, which is
negligible locally but ~150 ms each on high-latency (e.g. Cloud) hosts.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor(core): only mark connection connected once both calls succeed
Move isConnected.setValue(true) out of #setStatus() into connect() after
the allSettled check, so the observable never reflects a partially
established connection when configuration fails but status succeeded.
Addresses review feedback on the parallelized connect().
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Entity refs render readonly when their workspace URL can't be resolved.
Also fixes name on remove dialog.
* Apply read-only on the picked content ref only in the non-routable link picker
* Address PR feedback: simplify document item resolver guard in the link picker, document the implicit uui-card-media disabled dependency in input-media, and cover the disabled card state with a test.
* Drop out of date comments.
* Simplify updates.
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Render $index in block detail overlay label.
* Cache $index, resolve append sentinel, and cover with unit tests.
* refactor(block): use pipeline for index deduplication and clean up stale observer
* Rename function to remove the unnecessary umb prefix.
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Show the edit permissions for document type button only for users with settings access.
* Fix translation for message (the "Permissions" tab is not called "Structure").
* Addressed code review feedback.
`core/manifests.ts` already imports and spreads `core/search/manifests.ts`
into its aggregate (line 23 + 58), so importing `searchManifests`
separately in `.storybook/preview.js` and spreading it next to
`coreManifests` registered the same manifests twice. Remove the redundant
import and spread.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #22957 deleted every package's `manifests.ts` and consolidated the
exports into `umbraco-package.ts`, but `.storybook/preview.js` still
imported from the old paths. The result was a Vite resolve error during
`npm run build-storybook` (first failure: "Could not resolve
../src/packages/block/manifests from .storybook/preview.js").
37 import paths swapped from `…/<pkg>/manifests` to
`…/<pkg>/umbraco-package`. The two packages that still expose their
manifests via a standalone `manifests.ts` — `core` and `core/search` —
are left untouched.
Verified by `npm run build-storybook` — succeeds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
PR #22995 added `input-tiptap.stories.ts` with an import from
`'../../manifests.js'`, but PR #22957 (already on release/17.5.0) had
deleted that file and moved the `manifests` array into
`umbraco-package.ts`. The merge into release/17.5.0 didn't catch the dead
import, so Storybook 404s on the story load.
Point the import at the new home — `manifests` is still exported by name,
so this is a one-line path fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Display variant node name on sort children dialog.
* Preserve user sort order when patching variant names on culture change
Patch names in-place on the existing _tableItems rather than rebuilding
from _children, so a user's drag-sorted or column-ordered arrangement is
not silently reverted if the app culture changes while the modal is open.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Refactor to reduce cyclomatic complexity of #resolveName method.
* Resolve sort dialog variant names and icons via item data resolvers
Replace the inlined variant-name logic in the content sort dialog with the
shared UmbItemDataResolver abstraction, and add UmbMediaItemDataResolver so
media items resolve their active-culture name and icon the same way documents
do. Each content sort entity action now supplies its resolver through manifest
meta, flowing into the modal via a new content-specific modal data type and a
base-action _getModalData() hook. This also removes the previously hard-coded
document icon in the dialog.
* Disable load more when page of items is being retrieved.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Fix migration of embedded block data when blocks are direct siblings in the 13 RTE source code.
* Apply suggestions from code review to update comments.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Address review: keep RteBlockHelper in original namespace; tidy docs and comment
- Move RteBlockHelper back to Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0.LocalLinks
to avoid a binary breaking change within the obsolete window (scheduled removal in v18).
Kept as its own file rather than reverting it into LocalLinkRteProcessor.cs.
- Add a <remarks> note on ConvertBlockUdisToKeys explaining that blocks with malformed UDIs
are dropped rather than preserved.
- Replace the opaque "fix recursive hiccup" comment in LocalLinkRteProcessor with one that
describes what the line actually does.
- Move RteBlockHelperTests back to mirror the production namespace.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Fix migration of embedded block data when blocks are direct siblings in the 13 RTE source code.
* Apply suggestions from code review to update comments.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Address review: keep RteBlockHelper in original namespace; tidy docs and comment
- Move RteBlockHelper back to Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_15_0_0.LocalLinks
to avoid a binary breaking change within the obsolete window (scheduled removal in v18).
Kept as its own file rather than reverting it into LocalLinkRteProcessor.cs.
- Add a <remarks> note on ConvertBlockUdisToKeys explaining that blocks with malformed UDIs
are dropped rather than preserved.
- Replace the opaque "fix recursive hiccup" comment in LocalLinkRteProcessor with one that
describes what the line actually does.
- Move RteBlockHelperTests back to mirror the production namespace.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Batch WHERE IN queries to avoid SQL Server 2100-parameter limit and add memory files.
* Drop past-incident references from SQL parameter-limit docs
The memory files should describe the current rule and safe patterns;
specific historical bugs belong in commit history, not CLAUDE.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Update comments from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Addressed memory file feedback.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Tiptap: Load enabled extensions in parallel and inline manifest APIs
Replace the for…of/await loop in umb-input-tiptap's #loadExtensions with
Promise.all over .map, so all enabled Tiptap extension APIs are fetched
in parallel. Configured-extension order in _extensions is preserved.
Inline the first-party Tiptap manifest API references: every
`api: () => import('./X.tiptap-api.js')` and the equivalent toolbar /
statusbar / kind references now use a static top-of-file import and
`api: ClassName`. The dynamic `await import('rich-text-essentials.tiptap-api.js')`
fallback in input-tiptap.element.ts is inlined for the same reason.
External (plugin-supplied) Tiptap extensions and the lazy modal/toolbar
UI element imports are unchanged.
Why: on Umbraco Cloud, opening a document workspace with a rich text
editor takes ~16 s uncached, of which ~14.6 s is a single serial
waterfall — 31 extension APIs fetched one after the other from a
for…of await loop, ~170 ms RTT stacked. Replacing the loop with
Promise.all collapses that to roughly one round-trip; eagerly bundling
the first-party manifests removes the dynamic chunk explosion that made
the waterfall so long in the first place. The toolbar APIs (~20 of them)
already load in a sub-100 ms parallel burst against the same server,
confirming HTTP/2 multiplexing handles bulk parallel requests fine.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Tiptap: Inline element references for toolbar/statusbar/modal/clipboard manifests
Extends the manifest-inlining pass to the remaining `element: () => import(...)`
and runtime API loader sites in the Tiptap package — toolbar/menu/action-button
kinds, the table & character-map & anchor modals, the colour-picker button, the
property-editor configuration UIs, both clipboard translators, the style-menu
kind, and the default toolbar API fallback in tiptap-toolbar.element.ts.
Result on the same Cloud test site (uncached, 17.5-rc):
Tiptap chunk count: 71 → 4
Total tiptap bytes: ~3.2 MB → ~3.1 MB (essentially unchanged)
Phase 5 of the load — the serial extension chain — collapses to a single
consolidated chunk fetch.
`input-tiptap.element.ts` and `property-editor-ui-tiptap.element.ts` are
intentionally not inlined into anything else: `<umb-input-tiptap>` is a public
element usable standalone (custom dashboards, workspace views), and the
property-editor shell loads via the property-editor UI loader. They remain
exported as their own modules.
CLAUDE.md updated to document the new convention for first-party Tiptap
extensions (direct class refs) and the carve-out for external plugin
extensions that may keep `() => import(...)` to ship their API code in a
separate chunk.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Tiptap: Move extension APIs and elements into a shared lazy boundary chunk
The previous PR collapsed ~70 Tiptap chunks into 3 by inlining first-party API
and element references directly into manifest files. That win came with a real
downside flagged in code review (lke / mra): the API/element implementation
bytes ended up in the manifest registration bundle, so every workspace —
including ones without an RTE — paid ~700 KB of Tiptap code on boot.
This commit keeps the chunk-coalescing win but restores the lazy boundary by
routing every first-party manifest's `api` / `element` reference through a
single shared bundle file `extensions/extension-apis.bundle.ts`. Each manifest
holds a dynamic-import thunk pointing at that one bundle, so:
- Rollup still emits a single chunk for all Tiptap extension code (no chunk
explosion).
- The manifest registration bundle stays slim — it carries only metadata
(alias / label / icon / group / kind / forExtensions) plus the thunks.
- The bundle is only fetched the first time `<umb-input-tiptap>` actually
mounts.
Data-type configuration UIs (`extensions-configuration`,
`toolbar-configuration`, `statusbar-configuration`) read manifest metadata
via `umbExtensionsRegistry.byType(...)` only — they never call
`loadManifestApi` / `loadManifestElement`, so the data-type editor continues
to work without loading any Tiptap implementation code.
Property-editor UI elements (`tiptap-rte`, the three configuration UIs) also
revert to `() => import('./X.element.js')` so each loads on demand from its
own chunk rather than being inlined into the manifest bundle.
`umb-input-tiptap` no longer statically imports the Rich Text Essentials API;
it prepends the alias to the observed list instead, so essentials resolves
through the same lazy bundle as every other extension.
Added a test and stories file that mount `<umb-input-tiptap>` standalone (no
property-editor wrapper) to make the public usage pattern explicit.
Built and verified via `npm run build:for:cms`:
- `dist-cms/packages/tiptap/manifests.js` 48 KB (eager at boot)
- `dist-cms/packages/tiptap/extension-apis.bundle-*.js` 84 KB (lazy)
- `dist-cms/packages/tiptap/tiptap-toolbar-element-api-base-*.js` 654 KB
(lazy dependency of the bundle)
- per-element property-editor UI chunks load on demand when settings open
`npm run check:circular`, `npm run compile`, `npx wtr src/packages/tiptap`
all pass.
Related to #21152, builds on #22995.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Tiptap: Don't mount <umb-input-tiptap> in the standalone test
Mounting the element via fixture() spins up an UmbTiptapRteContext that
consumes UMB_SERVER_CONTEXT. In the unit-test runtime no server context
provider exists, so the context request stays pending. When @open-wc's
fixture tears down at end-of-file the request rejects with
"host disconnected" — surfaced as an unhandled promise rejection that
web-test-runner counts as a fatal runner error, exiting 1 even though every
individual test passed. The rejection happened to be in flight while a
block-grid clipboard test was active in CI, which is why the failure surfaced
there rather than in the tiptap test file itself.
Drop the manifest-registration assertion too — pulling the package-level
`manifests.ts` aggregator triggers a transitive 404 on the
`@umbraco-cms/backoffice/tiptap` importmap entry in the wtr environment.
The class-export + custom-element-registration checks are enough to prove
standalone exportability. The Storybook stories still cover the visual
end-to-end load path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Use direct imports in core manifests
* Extract theme aliases into constants file
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Backoffice: Add Cache-Control headers to cache-busted backoffice assets (AB#68478)
Adds a UseUmbracoBackOfficeCacheHeaders middleware that sets
Cache-Control: public, max-age=31536000, immutable on responses served
from the cache-busted backoffice path (/umbraco/backoffice/<hash>/*).
The hash in the URL is derived from the Umbraco version, so the URL
itself invalidates on every release - making 'immutable' safe regardless
of whether individual filenames contain a content hash.
In debug mode the cache-bust hash changes per request, so the header is
set to 'no-cache' to avoid filling the browser disk cache with single-use
entries.
Design is non-destructive to consumer customisation, addressing the
review feedback on the v14 attempt (#14475):
- Does not touch StaticFileOptions; consumer
services.Configure<StaticFileOptions>(...) and OnPrepareResponse
callbacks continue to work unchanged.
- Sets the header via Response.OnStarting with a ContainsKey guard, so
any synchronous Cache-Control set upstream wins; consumer OnStarting
callbacks registered later fire first (LIFO) and also win.
- Skips non-2xx responses to avoid long-lived caching of error responses.
Related: GH #21152, PR #22896.
* Backoffice: Correct rationale for no-cache in debug mode
Reword the XML doc on UseUmbracoBackOfficeCacheHeaders to reflect that
IBackOfficePathGenerator is a singleton, so the cache-bust hash is
computed once at startup even in debug mode (per Copilot review on
#22951). The reason for no-cache is not "hash changes per request" but
that built assets may change in place during dev iteration; no-cache
allows fast 304 revalidation while no-store would force full
re-downloads.
No functional change.
* Backoffice: Add unit tests for UseUmbracoBackOfficeCacheHeaders
Covers six scenarios via a minimal in-process pipeline composed with
Microsoft.AspNetCore.TestHost:
- Production: 200 under hash prefix gets immutable header
- Debug: 200 under hash prefix gets no-cache
- Non-2xx under prefix: header not set (status gate)
- Path outside prefix: header not set (path gate)
- Consumer synchronous override: ContainsKey guard skips, consumer wins
- Consumer OnStarting override: LIFO ordering lets consumer win
Adds Microsoft.AspNetCore.TestHost to Umbraco.Tests.UnitTests (standard
Microsoft package, version pinned in tests/Directory.Packages.props).
* Backoffice: Extract cache-headers logic into IMiddleware class
Matches the existing Umbraco middleware convention (BootFailedMiddleware,
PreviewAuthenticationMiddleware, UmbracoRequestMiddleware, etc.) per
Kenn's note: prefer UseMiddleware<T>() with a DI-resolved class over
inline builder.Use lambdas.
The new UmbracoBackOfficeCacheHeadersMiddleware:
- Implements IMiddleware; registered as a singleton in AddWebComponents
- Computes prefix and header value once in the constructor (both
dependencies are singletons themselves, so this is stable)
- Behaviour is unchanged from the inline version
The UseUmbracoBackOfficeCacheHeaders extension method becomes a thin
UseMiddleware<T>() wrapper. Tests updated to register the middleware in
the TestServer DI container so it can be resolved through UseMiddleware.
* Backoffice: Document IMiddleware convention in Web.Common CLAUDE.md
Adds an explicit "Convention" note before the middleware list so future
contributors (and AI assistants) default to the IMiddleware class +
AddSingleton + UseMiddleware<T>() pattern rather than inline
builder.Use(async ...) lambdas. Also lists the new
UmbracoBackOfficeCacheHeadersMiddleware in the folder structure and
middleware reference.
* Backoffice: Tighten middleware convention note with full corroboration
Lists every IMiddleware implementer in the codebase (10/10) and calls
out the two known inline-lambda exceptions (CspNonceExtensions,
WebApplicationExtensions) so the rule reads as the established
convention rather than an absolute, while still steering new work
toward IMiddleware + AddSingleton + UseMiddleware<T>().
* Backoffice: Register cache-headers middleware in AddBackOfficeCore
DI scope validation runs in Development/CI and pre-checks every
singleton's dependency graph can be constructed. The middleware was
registered in AddWebComponents (which runs for every Umbraco bootstrap),
but its IBackOfficePathGenerator dependency is only registered by
AddBackOffice(). The previous CI run on this branch surfaced the
problem in four Delivery-only/Website-only bootstrap tests
(CoreWithDeliveryApi_BootsSuccessfully, DeliveryOnlyScenario_BootsSuccessfully,
etc.) with "Unable to resolve service for type 'IBackOfficePathGenerator'
while attempting to activate 'UmbracoBackOfficeCacheHeadersMiddleware'".
Move the registration alongside IBackOfficePathGenerator in
AddBackOfficeCore (Api.Management), which is the same scope as the
backoffice itself. This also matches the wire-up gate in
UmbracoApplicationBuilder.cs that only calls UseUmbracoBackOfficeCacheHeaders
when IBackOfficeEnabledMarker is registered.
CLAUDE.md updated with the rule ("register the middleware next to its
dependencies' registration") and a pitfall note about DI scope validation.
* Backoffice: Address review feedback from AndyButland (PR #22951)
- Move UseUmbracoBackOfficeCacheHeadersTests from Umbraco.Tests.UnitTests
to Umbraco.Tests.Integration. It uses HostBuilder + TestServer to
exercise the real HTTP pipeline, which is integration-shaped rather
than unit-shaped. Drop Microsoft.AspNetCore.TestHost from UnitTests
(Mvc.Testing in Integration provides it transitively) and from
tests/Directory.Packages.props.
- Soften the misleading "no trailing slash" comment in
UmbracoBackOfficeCacheHeadersMiddleware — we trim anyway, so the
comment is now framed as defensive normalisation.
- Trim the dense middleware convention note in Web.Common/CLAUDE.md to
one paragraph (rule + the two known inline-lambda exceptions). Move
the DI-scope-validation pitfall narrative out of CLAUDE.md and into a
three-line code comment next to the AddSingleton call in
AddBackOfficeCore where it actually applies.
* Backoffice: HTTP verb gate, 304 inclusion, namespace + unused using (PR #22951 review)
Three more from AndyButland's review:
1. Verb gate + 304 inclusion in UmbracoBackOfficeCacheHeadersMiddleware.
Restrict the path-prefix match to GET and HEAD so POST/PUT/DELETE
responses and OPTIONS (CORS preflight) responses don't get tagged as
immutable. Include 304 alongside 2xx in the status gate so
intermediate caches (CDN/proxy) receive the Cache-Control directive on
revalidation responses too. Extended the test suite with four new
cases: NotModifiedResponseUnderPrefix_SetsImmutable,
HeadRequestUnderPrefix_SetsImmutable,
OptionsRequestUnderPrefix_DoesNotSetHeader,
PostRequestUnderPrefix_DoesNotSetHeader. All 10 tests pass.
2. Test namespace updated to Umbraco.Cms.Tests.Integration.* to match
the convention used by ~629 other files in Umbraco.Tests.Integration
(vs the 2 outliers I copied from).
3. Drop unused 'using Umbraco.Extensions;' from the test file.
* Backoffice: Extract conditional checks to satisfy CodeScene complexity gate
CodeScene flagged InvokeAsync with "Complex Conditional" (advisory rule,
code health impact 9.69) after the verb + 304 additions in the prior
commit. Extract the two checks into IsCacheableAssetRequest and
ShouldSetCacheControl helper methods. No behaviour change; tests still
green (10/10, 149 ms).
* Stabilise rollback E2E test by waiting for document reload before asserting.
* Condense rollback wait comment per code-review feedback.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Addressed code review feedback.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ensure the order from the search endpoints taking a collection of keys is preserved
* Align cosmetic changes to ensure later merge up doesn't run into conflicts.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Use direct imports in core manifests
* Extract theme aliases into constants file
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Add IgnoredDelayChanged event to allow updates during back-off
* Make Period and IgnoredDelay settable on RecurringBackgroundJobBase with auto-raising events
* Address PR review: handle CTS race, restore negative-IgnoredDelay guard, clarify setter remarks
- Swallow ObjectDisposedException in OnIgnoredDelayChanged for the shutdown race where an in-flight handler reads the to-be-disposed CTS via Interlocked.Exchange before Dispose disposes it.
- Restore "skip back-off when IgnoredDelay <= TimeSpan.Zero (and not Timeout.InfiniteTimeSpan)" guard in IgnoreAndWaitAsync to defend against direct IRecurringBackgroundJob implementations / property overrides returning a negative value that would otherwise tight-loop via ComputeNextDelay clamping to zero.
- Add regression test for the negative-IgnoredDelay skip path.
- Mirror the constructor "stored without raising" remark on the Period and IgnoredDelay setter doc comments.
* Dispose newly-installed CTS when shutdown race wins the rotate-and-cancel
* Clarify XML docs.
* Introduce helper for cancellation source rotate and cancel.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Support anchor fragments that are included in the data attribute but missing in the href when migrating local links.
* Addressed code review feedback.
* Support anchor fragments that are included in the data attribute but missing in the href when migrating local links.
* Addressed code review feedback.
* Workspace Actions: Restore waiting state for buttons with additional options
The waiting state was suppressed whenever a workspace action reported
hasAdditionalOptions() (e.g. Save and publish on multi-variant sites),
so users saw the button jump straight from idle to the success tick
with no in-flight feedback.
Always set 'waiting' on click (unless the action is a link). The
variant-picker modal still opens on top of the button, so the spinner
is effectively invisible during selection — but it becomes visible
as soon as the modal closes and the publish request is in flight.
Fixes#22551
* Workspace Actions: Spin button only while real work is in flight
Replace the eager always-set-waiting behaviour from the previous commit
with an opt-in `isPending` signal so the spinner appears only while
actual work (validation + HTTP) is happening - not while the variant
picker modal is open, and never as a spurious success tick when the
user cancels the modal.
Changes:
- Add optional `isPending: Observable<boolean>` to UmbWorkspaceAction
and a default UmbBooleanState + protected setPending() on the base
class. Optional + backwards compatible for external implementers.
- Add optional `onActionStarting` callback (via a shared
UmbWorkspaceActionExecutionOptions type) to
UmbPublishableWorkspaceContext.saveAndPublish and
UmbSaveableWorkspaceContext.requestSave. The document publishing
context and content detail workspace base invoke the callback at the
join point right after the variant picker resolves (or is skipped
for the single-variant case), so it never fires when the modal is
cancelled.
- Wire the document save and save-and-publish actions to clear pending
at the start of execute() and pass an onActionStarting callback that
flips it true when work begins.
- Update the workspace action element to observe api.isPending: when
the observable is present the waiting state is driven by the
observable (and the success tick is suppressed if the action
resolves without ever signalling pending - i.e. a cancellation).
When the observable is absent the element falls back to the legacy
eager-waiting behaviour. Failures always surface the failed tick.
Fixes#22551
* Reduce cyclomatic complexity of #onClick and _handleSave
CodeScene Code Health Review flagged two complexity issues:
- UmbWorkspaceActionElement.#onClick reached cyclomatic complexity 9
(threshold is < 9). Extracted the api-execution branch into a new
private #runApiAction helper so #onClick collapses to a simple
link-vs-action dispatch.
- _handleSave was already over the threshold (14); my optional-chain
callback invocation pushed it to 16. Moved the
`executionOptions?.onActionStarting?.()` call into a #notifyActionStarting
helper so the call site is a plain method call and contributes zero
cyclomatic complexity to _handleSave.
No behavioural change.
* Reduce cyclomatic complexity of #handleSaveAndPublish
Same fix as the previous commit's #notifyActionStarting extraction in
content-detail-workspace-base: move the optional-chain callback
invocation into a private helper so #handleSaveAndPublish stays at its
pre-PR cyclomatic complexity (15) instead of degrading to 17.
No behavioural change.
* DRY: extract notifyWorkspaceActionStarting into a shared utility
Both UmbDocumentPublishingWorkspaceContext.#handleSaveAndPublish and
UmbContentDetailWorkspaceContextBase._handleSave had identical private
optional-chain callback off the host method's cyclomatic complexity.
Replace both with a single exported notifyWorkspaceActionStarting()
utility co-located with UmbWorkspaceActionExecutionOptions. This:
- Removes a duplication point between the two contexts.
- Gives future workspace context implementations a ready-made way to
honour the optional callback without re-inventing the helper or
paying the cyclomatic-complexity cost at the call site.
No behavioural change.
* Rename isPending -> isExecuting to mirror the execute() method
Niels suggested correlating the observable's name with the action's
`execute()` method, so the symbol set is now:
- isExecuting (observable on UmbWorkspaceAction interface)
- _isExecuting / setExecuting (UmbWorkspaceActionBase)
- #observeIsExecuting / #executionStarted (workspace-action element)
- isExecutingObserver (observer alias)
Pure rename; no behavioural change.
* Address Copilot review: lazy isExecuting, observer scope, finally reset
Five Copilot findings on PR #22554. Three real regressions + two
contract violations, all addressed:
1. UmbWorkspaceActionBase always exposing `isExecuting` made every
existing subclass appear to opt in to the new modal-aware flow,
suppressing waiting/success states for actions that never call
setExecuting(true). Made `_isExecuting`/`isExecuting` lazy: only
created on the first setExecuting() call. Opt-in subclasses call
`setExecuting(false)` in their constructor so the observable is
exposed before the workspace-action element reads it. Subclasses
that don't opt in keep `isExecuting` undefined and the element
falls back to legacy eager waiting feedback.
2. Element observation of `isExecuting` now lives inside #runApiAction
so it tracks whichever api is actually invoked (`_actionApi ?? #api`),
correctly handling subclasses like UmbSaveAndPreviewWorkspaceActionElement
that swap in a different api at runtime. The shared observer alias
replaces any previous observation on re-clicks.
3. UmbSaveWorkspaceAction and UmbDocumentSaveAndPublishWorkspaceAction
now wrap their execute() body in try/finally and reset
setExecuting(false) on completion so the observable honours the
"true while execute() is performing real work, false otherwise"
contract instead of getting stuck at true between executions.
No behavioural change for actions that already worked correctly before
this PR; the regression-prone "always exposed" behaviour is gone.
* Address Claude review: Elements gap, type placement, tests + cleanup
Three follow-ups on top of c15eb2d0bc:
1. Elements gap — UmbElementSaveAndPublishWorkspaceAction +
UmbElementPublishingWorkspaceContext now wire through the same
onActionStarting/notifyWorkspaceActionStarting handshake as the
Document equivalents, so multi-variant Elements (Forms, Commerce, etc.)
get the spinner-after-modal behaviour rather than no spinner at all.
2. Type placement — moved UmbWorkspaceActionExecutionOptions out of
publishable-workspace-context.interface.ts into its own file so the
saveable interface no longer has a directional dependency on the
publishable one. Both peer contexts now import from the same neutral
location.
3. Unit tests — added blackbox coverage for notifyWorkspaceActionStarting
(no-op on undefined options/callback, invokes when present) and the
UmbWorkspaceActionBase.setExecuting lazy-opt-in contract (undefined
until first call, observable then exposed, value flips, sequential
emissions, stable reference across calls).
Code-review cleanup applied on the same pass:
- Dropped the redundant `setExecuting(false)` at the start of execute()
in the save and save-and-publish actions; the finally block plus
UmbBooleanState's value-dedup already cover idempotency on retries.
- Removed an overlong block comment on `_isExecuting`; the JSDoc on
setExecuting already documents the lazy/opt-in contract for subclasses.
- Trimmed an internal motivation comment from notify-workspace-action-
starting.function.ts that referenced cyclomatic complexity.
- Extracted a tiny makeAction() helper in the controller test to remove
the `{ meta: {} as never }` repetition.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Workspace Actions: Align Save button state with Save & Publish (Andy review feedback)
Two related fixes addressing the variant-Save inconsistency Andy reported:
- Element catch block now only sets `failed` once `#executionStarted` is
true. Pre-flight rejections (user cancelling a variant-picker modal,
context-missing throws, etc.) leave the button idle, matching the
silent-cancel path used by `#handleSaveAndPublish`. Legacy actions
that don't opt in to `isExecuting` are unaffected because they set
`#executionStarted = true` eagerly on click.
- `UmbDocumentWorkspaceContext._handleSave` and
`UmbElementWorkspaceContext._handleSave` now accept and forward the
`UmbWorkspaceActionExecutionOptions` argument to `super._handleSave`.
The previous overrides dropped the parameter, so the
`onActionStarting` callback supplied by `UmbSaveWorkspaceAction` never
fired - which is why Save showed no waiting/success indicator even
on a successful submit.
Result: Save and Save-and-publish now behave identically -
cancel = no indicator, submit = waiting then success - for both
invariant and multi-variant documents and elements.
* Docs: Document the modal-aware execution feedback contract for workspace actions
New 'Button state when the action opens a modal' subsection in
docs/workspaces.md explaining the three-piece contract:
UmbWorkspaceActionExecutionOptions + notifyWorkspaceActionStarting +
UmbWorkspaceActionBase.setExecuting. Covers third-party authoring of
modal-aware buttons, the cancel/pre-flight idle behaviour, and the
silent-parameter-drop pitfall on _handleSave overrides.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Backoffice: Coalesce small Rollup chunks across all workspaces (AB#67983)
Set experimentalMinChunkSize=10_000 as the default in the shared Vite
helper. Every workspace inherits the coalescing automatically; the
threshold can still be overridden per workspace (pass 0 to disable).
Impact on dist-cms output:
- packages/core .js files: 981 -> 272 (-72%)
- All workspaces combined .js files: 2194 -> 1401 (-36%)
- Welcome dashboard .js requests: 510 -> 497 (-2.5%)
- packages/ufm requests in particular: 23 -> 12 (-48%)
- Gzipped bundle total: -1.2%
- Raw bytes: +1.4% (small overhead from merged chunks; gzip wins it back)
All entry chunks are preserved, so every public
@umbraco-cms/backoffice/<sub> import keeps resolving without changes
to package.json exports or tsconfig paths.
Further consolidation (collapsing core's per-subpath entries into a
single bundle with stubs) was prototyped but hits a TDZ cycle between
the eager entry and its dynamic-import descendants. Tracked for v18,
not part of this change.
* Backoffice: Normalise umbraco-package + manifests shapes (AB#67983)
Aligns the two outliers with the conventions used by the other 38
first-party packages:
- documents/umbraco-package.ts now uses the lazy bundle pattern
(type: 'bundle', js: () => import('./manifests.js')) instead of
eagerly importing manifests at module evaluation. The bundle
initializer auto-loads the manifests at boot, so behaviour is
unchanged.
- umbraco-news/manifests.ts now exports `manifests: Array<...>`
instead of a bare `dashboard` object. The bundle initializer
enumerates exports regardless of name, so behaviour is unchanged.
Preparatory cleanup so future build-time manifest aggregation can
treat every workspace uniformly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Backoffice: Coalesce small Rollup chunks across all workspaces (AB#67983)
Set experimentalMinChunkSize=10_000 as the default in the shared Vite
helper. Every workspace inherits the coalescing automatically; the
threshold can still be overridden per workspace (pass 0 to disable).
Impact on dist-cms output:
- packages/core .js files: 981 -> 272 (-72%)
- All workspaces combined .js files: 2194 -> 1401 (-36%)
- Welcome dashboard .js requests: 510 -> 497 (-2.5%)
- packages/ufm requests in particular: 23 -> 12 (-48%)
- Gzipped bundle total: -1.2%
- Raw bytes: +1.4% (small overhead from merged chunks; gzip wins it back)
All entry chunks are preserved, so every public
@umbraco-cms/backoffice/<sub> import keeps resolving without changes
to package.json exports or tsconfig paths.
Further consolidation (collapsing core's per-subpath entries into a
single bundle with stubs) was prototyped but hits a TDZ cycle between
the eager entry and its dynamic-import descendants. Tracked for v18,
not part of this change.
* Backoffice: Normalise umbraco-package + manifests shapes (AB#67983)
Aligns the two outliers with the conventions used by the other 38
first-party packages:
- documents/umbraco-package.ts now uses the lazy bundle pattern
(type: 'bundle', js: () => import('./manifests.js')) instead of
eagerly importing manifests at module evaluation. The bundle
initializer auto-loads the manifests at boot, so behaviour is
unchanged.
- umbraco-news/manifests.ts now exports `manifests: Array<...>`
instead of a bare `dashboard` object. The bundle initializer
enumerates exports regardless of name, so behaviour is unchanged.
Preparatory cleanup so future build-time manifest aggregation can
treat every workspace uniformly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Compute next delay to compensate for time drift
* Use SemaphoreSlim to properly handle exceptions, cancellation tokens and triggering immediate executions
* Add RecurringBackgroundJobBase to contain default values and hide obsoleted method
* Add NextExecutionStrategy parameter to adjust the schedule after triggered executions
* Add TriggerExecution methods to RecurringBackgroundJobHostedServiceRunner
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Handle cancellation (application shutdown) and publish RecurringBackgroundJobCanceledNotification
* Match hosted services by Type instead of type name string
* Extract shared helper for TriggerExecution tests
* Clear trigger state when initial delay is interrupted
* Clear _nextExecutionSkipOnOvershoot unconditionally
* Combine ComputeNextDelay tests
* Consolidate trigger state into an immutable record for thread safety
* Use ConcurrentDictionary for thread-safe hosted service lookup
* Remove hosted services from dictionary on stop
* Fix API compatibility errors
* Removed unneeded using.
* Register RecurringBackgroundJobHostedServiceRunner as resolvable singleton
* Remove failed hosted service from dictionary when StartAsync throws
* Use semaphore signaling instead of Task.Delay in trigger tests
Use semaphore signaling instead of Task.Delay in trigger tests 2
* Inject TimeProvider into RecurringHostedServiceBase for deterministic testing
Fix timeprovider
* Use DelayCalculator.GetDelay instead of RecurringHostedServiceBase.GetDelay
* Fix Exception_In_PerformExecuteAsync_Does_Not_Kill_Loop test
* Avoid disposing period-change CTS while wait loop may still reference it
* Configure IEventMessagesFactory mock to return real EventMessages
* Clarify TriggerExecution(TimeSpan) docs and add ChangePeriod test
* Validate period is positive and use GetOrAdd to avoid creating unused hosted services
* Set up Period and Delay on mock job to satisfy constructor validation
* Ensure PeriodChanged event is unsubscribed again
* Fix trigger state race, simplify ReleaseSignal, and add canceled notification test
Fix trigger state
* Use Interlocked for _period reads/writes and implement thread-safe dispose pattern
* Remove hosted service from dictionary before stopping to prevent triggering during shutdown
* Replace Task.Yield with semaphore timeouts in negative assertions
* Tidy RecurringBackgroundJobBase docs and runner error handling
* Wait IgnoredDelay after ignored execution to prevent tight looping when Period is short or zero
* Add IRecurringBackgroundJobTrigger<TJob> for opt-in job triggering
* Register IRecurringBackgroundJobTrigger as open generic and drop AddTriggerableRecurringBackgroundJob
* Fix and add parameter validation
* Allow Timeout.InfiniteTimeSpan as Period for manual-trigger-only recurring jobs
* Migrate built-in jobs to RecurringBackgroundJobBase and require ITriggerableRecurringBackgroundJob in runner trigger overloads
* Support infinite Delay and honor TriggerExecution(TimeSpan) issued during the initial delay
* Handle edge case of backoff via InfiniteTimeSpan.
* Refactored large method.
* Added clarifying documentation.
* Suppress ExecutionContext flow when starting the recurring background loop, restoring previous timer behaviour.
* Relocate Suppress ExecutionContext flow to avoid package validation error.
* Align IRecurringBackgroundJobTrigger generic type constraint with AddRecurringBackgroundJob
* Rename ApplyTriggerState to ComputeNextDelayFromTriggerState
* Allow Timeout.InfiniteTimeSpan as IgnoredDelay to fully disable a job for the remaining application lifecycle
* Fix generic type constraint
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Compute next delay to compensate for time drift
* Use SemaphoreSlim to properly handle exceptions, cancellation tokens and triggering immediate executions
* Add RecurringBackgroundJobBase to contain default values and hide obsoleted method
* Add NextExecutionStrategy parameter to adjust the schedule after triggered executions
* Add TriggerExecution methods to RecurringBackgroundJobHostedServiceRunner
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Handle cancellation (application shutdown) and publish RecurringBackgroundJobCanceledNotification
* Match hosted services by Type instead of type name string
* Extract shared helper for TriggerExecution tests
* Clear trigger state when initial delay is interrupted
* Clear _nextExecutionSkipOnOvershoot unconditionally
* Combine ComputeNextDelay tests
* Consolidate trigger state into an immutable record for thread safety
* Use ConcurrentDictionary for thread-safe hosted service lookup
* Remove hosted services from dictionary on stop
* Fix API compatibility errors
* Removed unneeded using.
* Register RecurringBackgroundJobHostedServiceRunner as resolvable singleton
* Remove failed hosted service from dictionary when StartAsync throws
* Use semaphore signaling instead of Task.Delay in trigger tests
Use semaphore signaling instead of Task.Delay in trigger tests 2
* Inject TimeProvider into RecurringHostedServiceBase for deterministic testing
Fix timeprovider
* Use DelayCalculator.GetDelay instead of RecurringHostedServiceBase.GetDelay
* Fix Exception_In_PerformExecuteAsync_Does_Not_Kill_Loop test
* Avoid disposing period-change CTS while wait loop may still reference it
* Configure IEventMessagesFactory mock to return real EventMessages
* Clarify TriggerExecution(TimeSpan) docs and add ChangePeriod test
* Validate period is positive and use GetOrAdd to avoid creating unused hosted services
* Set up Period and Delay on mock job to satisfy constructor validation
* Ensure PeriodChanged event is unsubscribed again
* Fix trigger state race, simplify ReleaseSignal, and add canceled notification test
Fix trigger state
* Use Interlocked for _period reads/writes and implement thread-safe dispose pattern
* Remove hosted service from dictionary before stopping to prevent triggering during shutdown
* Replace Task.Yield with semaphore timeouts in negative assertions
* Tidy RecurringBackgroundJobBase docs and runner error handling
* Wait IgnoredDelay after ignored execution to prevent tight looping when Period is short or zero
* Add IRecurringBackgroundJobTrigger<TJob> for opt-in job triggering
* Register IRecurringBackgroundJobTrigger as open generic and drop AddTriggerableRecurringBackgroundJob
* Fix and add parameter validation
* Allow Timeout.InfiniteTimeSpan as Period for manual-trigger-only recurring jobs
* Migrate built-in jobs to RecurringBackgroundJobBase and require ITriggerableRecurringBackgroundJob in runner trigger overloads
* Support infinite Delay and honor TriggerExecution(TimeSpan) issued during the initial delay
* Handle edge case of backoff via InfiniteTimeSpan.
* Refactored large method.
* Added clarifying documentation.
* Suppress ExecutionContext flow when starting the recurring background loop, restoring previous timer behaviour.
* Relocate Suppress ExecutionContext flow to avoid package validation error.
* Align IRecurringBackgroundJobTrigger generic type constraint with AddRecurringBackgroundJob
* Rename ApplyTriggerState to ComputeNextDelayFromTriggerState
* Allow Timeout.InfiniteTimeSpan as IgnoredDelay to fully disable a job for the remaining application lifecycle
* Fix generic type constraint
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add item data resolver support to picker data sources
* add js docs
* remove duplicated fallback logic
* wip unit tests of requestItemName method
* Use DocumentVariantStateModel in mock documents to fix compiler
* Update input-entity-data.context.ts
* Update input-entity-data.context.test.ts
* Fix edit of a variant property composed to an invariant document.
* Collapse multi-line guard comment to a single line per project policy.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add unit test coverage for invariant content with a culture-variant composition property.
Adds a third mock document/document-type pair representing an invariant
content type whose flattened property list contains a culture-variant
property (the runtime shape produced when a variant composition is applied
to an invariant content type) and a setPropertyValue test asserting the
value is stored as a culture/segment-invariant entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Remove null guard for segment variant documents, as null segment is the default segment.
* update mock data and tests to include real compositions
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Fix edit of a variant property composed to an invariant document.
* Collapse multi-line guard comment to a single line per project policy.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add unit test coverage for invariant content with a culture-variant composition property.
Adds a third mock document/document-type pair representing an invariant
content type whose flattened property list contains a culture-variant
property (the runtime shape produced when a variant composition is applied
to an invariant content type) and a setPropertyValue test asserting the
value is stored as a culture/segment-invariant entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Remove null guard for segment variant documents, as null segment is the default segment.
* update mock data and tests to include real compositions
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* feat(components): adds `umb-entity-frame` component + Storybook stories
* fix(components): address review feedback for `umb-entity-frame`
- Remove `pointer-events: auto` from `.tab` so the overlay is truly passive
(was intercepting events above the parent and causing hover flicker when
toggled via opacity).
- Replace `--uui-color-surface` tab text with `--uui-color-selected-contrast`
(the proper paired contrast token) and expose
`--umb-entity-frame-contrast-color` so consumers can override when supplying
a non-default `--umb-entity-frame-color`. Fixes contrast in dark and
high-contrast themes.
- Add `aria-hidden="true"` to `.tab`; the frame is purely decorative and the
parent owns the real semantics.
- Add a unit test verifying slot content takes precedence over the `label`
property.
* Removed `aria-hidden` from the label tab
As will need to be used with assistive technologies.
* Defensively handle log file corruptions by amalgamating errors per file and reporting as warning.
* Addressed code review comments.
* Use local reference to Newtonsoft.Json so it's clear we are only using it for exception handling.
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Remove the ability to enable or disable the redirect tracker from the UI.
* Addressed code review feedback.
* Update OpenApi.json.
* Regenerate backend SDK from updated OpenApi.json
* Update UI to use lozenge status indicator rather than an imperative action.
* Further UX tweak.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Add auto upgrade coordination for load balanced setups
* Add tests
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix(infrastructure): move TryBecomeLeaderAsync inside try/catch in UnattendedUpgradeBackgroundService
Ensures DB exceptions thrown during migration coordination set BootFailed
rather than faulting the background service silently.
* Fix feedback
* Update src/Umbraco.Infrastructure/Install/MigrationCoordinator.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Recheck state
* fix(tests): update concurrent race test for post-claim DetermineRuntimeLevel check
The winner now calls DetermineRuntimeLevel() once from the post-claim check
and must see Upgrading; the loser polls twice before seeing Run. Transition
the mock on the second call instead of the first.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Cache cacheversion on scope
* Add tests
* Cache: Use ConcurrentDictionary for the inner per-scope version map
The inner Dictionary<string, Guid> was not thread-safe. Replacing it
with ConcurrentDictionary<string, Guid> removes the hidden assumption
that the root scope is only accessed from a single thread at a time.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Update src/Umbraco.Core/Cache/IRepositoryCacheVersionAccessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update tests/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Cache/RepositoryCacheVersionAccessorTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.Common/Cache/RepositoryCacheVersionAccessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Skips failing test so we can run nightly. THIS NEEDS TO BE REVERTED
* Revert "Skips failing test so we can run nightly. THIS NEEDS TO BE REVERTED"
This reverts commit c34d1736c336b3fcf7803b44e88f6018fa45c275.
* Only write version once pr. scope
* Add tests
* Remove unnececary locks
* Fix thread-safety: replace HashSet with ConcurrentHashSet and use GetOrAdd to eliminate TOCTOU races
* Add unit tests for RepositoryCacheVersionService
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* Add benchmark test for measuring improvements to children and descendant retrieval.
* Remove unnecessary sort from retrieval of children.
* Return the result of the filtered collection of children/decendants without materialising.
* Lazily build property wrappers when materializing IPublishedContent.
* Cache the ordered children list on NavigationNode.
* Cache descendants per parent on the navigation snapshot.
* Add synchronous fast path for retrieved of cached content.
* Additional unit tests.
* Add TODO to make UpdateSortOrder internal.
* Addressed code review feedback.
* Further unit tests.
* Future-proofed code comments.
* Add benchmark test for measuring improvements to children and descendant retrieval.
* Remove unnecessary sort from retrieval of children.
* Return the result of the filtered collection of children/decendants without materialising.
* Lazily build property wrappers when materializing IPublishedContent.
* Cache the ordered children list on NavigationNode.
* Cache descendants per parent on the navigation snapshot.
* Add synchronous fast path for retrieved of cached content.
* Additional unit tests.
* Add TODO to make UpdateSortOrder internal.
* Addressed code review feedback.
* Further unit tests.
* Future-proofed code comments.
Correct the gating of the call to UseOutputCache() to only proceed Umbraco managed caching via configuration is enabled, and not consider existing implementation specific registrations.
* Localization: Honor DefaultUILanguage on initial load (closes#22808)
Closes#22808.
Previously, the configured DefaultUILanguage was silently overridden to
'en' at startup because the UmbLocalizationRegistry constructor called
loadLanguage(UMB_DEFAULT_LOCALIZATION_CULTURE) unconditionally. The
configured locale rendered into <html lang="..."> by Razor never had a
chance to flow through to the active language.
Changes:
- localization.registry.ts: stop forcing the active language to 'en'
in the constructor. Initial state is canonicalised from
document.documentElement.lang, falling back to 'en' for empty or
malformed input. The extension filter now always includes the
default culture alongside the active locale so 'en' translations
remain available as a key-level fallback regardless of which
language is active. A synchronous tap mirrors the active locale to
document.lang and the manager when the state changes, so a fresh
element rendered between loadLanguage() and the async translation
load picks up the right language immediately.
- localization.manager.ts: drop the MutationObserver on
document.documentElement and rely on the registry as the single
channel for language changes. setActiveLanguage accepts a `silent`
option so the synchronous tap can update fields without firing a
consumer notification (translations may still be loading). A new
notifyLanguageChanged() method is fired by the registry once
translations are in place.
- app.element.ts: subscribe to umbLocalizationRegistry.currentLanguage
in connectedCallback and mirror it onto the host element's lang
attribute, so myApp.lang reflects the source of truth rather than a
stale snapshot of <html lang>.
- auth.element.ts (login app): same lang subscription, plus after the
slim backoffice controller registers extensions, prefer the
visitor's navigator.language if a matching localization extension
exists (falls through baseName -> language -> en automatically).
Tests: new initialization tests for the registry, manager
setActiveLanguage tests, and the controller tests refactored to use
the new explicit setActiveLanguage API instead of writing directly to
document.documentElement.lang.
* Login: Only override DefaultUILanguage with navigator.language when default has no translation
If the admin sets DefaultUILanguage to a language we have a translation for,
respect that choice over the visitor's browser language. Falling back to
navigator.language only when the configured default isn't available avoids
silently ignoring the admin's explicit setting (e.g., DefaultUILanguage='da-DK'
on a site whose visitor's browser is 'en-GB' should still show Danish).
* Simplify: split setActiveLanguage from notifyLanguageChanged
Drop the silent option in favor of two intent-revealing methods:
setActiveLanguage updates the active language and direction without
side-effects; notifyLanguageChanged tells all connected controllers
to re-render against the current state. Callers compose them based
on what they need (the registry's pipeline updates language sync
then flushes notifications after async translation load).
Also extracts baseLocaleOf() helper, simplifies the navigator.language
match logic in the login app's #applyPreferredLanguage, and removes
narration-style comments in the new code.
* Restore deprecated UmbLocalizationManager.updateAll for backward compat
The old MutationObserver-driven updateAll() field was technically part
of the manager's public surface. Restore it as a deprecated alias that
reads document.lang/dir and forwards to setActiveLanguage + notifyLanguageChanged,
with a runtime UmbDeprecation warning pointing consumers at the new API.
* Fix deprecation removal version to v20 + correct baseLocaleOf JSDoc
Per the deprecation policy in CLAUDE.md (current major + 2): a method
deprecated in v18 must remain through v19 before removal, so the
earliest removal is v20, not v19.
Also corrects the baseLocaleOf JSDoc — Intl.Locale.baseName can include
script subtags (e.g. 'zh-Hant-TW'), not just language and region.
* Scope the active language to the host element, drop navigator.language
- Razor now sets `lang` on `<umb-app>` and `<umb-auth>` from
DefaultUILanguage. The element passes its lang through on connect, so
the host owns its own scope — future multi-backoffice scenarios (e.g.
signing into two Umbraco Cloud sites in the same document) get their
own language without fighting over a global `<html lang>`.
- The registry no longer reads or writes `document.documentElement.lang`.
Host elements drive it via `loadLanguage()`; `<html lang>` stays as
whatever Razor rendered.
- Removed the navigator.language preference detection in the login app.
Not in scope for the bug fix and adds behavior the admin can't opt out
of. The existing current-user-locale flow already handles per-user
preference after login.
- Tests updated to assert on `umbLocalizationManager.documentLanguage`
instead of `document.documentElement.lang`.
* Set <html lang="en"> to match the static (noscript) text in the templates
The page's `<html lang>` should describe the language of the document's
own innate content. Both Index.cshtml files only contain English static
text (the noscript fallback), so the page-level lang is now "en".
The dynamic UI inside <umb-app> / <umb-auth> carries its own `lang`
attribute (from DefaultUILanguage), which overrides for that subtree —
correct per the HTML spec for language inheritance.
* Drop deprecated UmbLocalizationManager.updateAll
It was public as an artifact of being an arrow function so it could be
passed to a MutationObserver without binding — not because it was
intended as part of the public API. External usage is effectively
zero, and the new explicit setActiveLanguage + notifyLanguageChanged
covers anyone who did reach for it.
* Docs: document active-language-on-host pattern in package-development.md
After PR #22822, the active UI language is driven by the shell elements
(<umb-app>, <umb-auth>) via their own lang attribute, not by <html lang>.
Document that so future contributors don't reach for the global.
* Collapse setActiveLanguage + notifyLanguageChanged into one method
The silent-write path is just `manager.documentLanguage = ...` — no new
method needed; the field is already public and was always writable. The
notify path keeps setActiveLanguage, which now both sets and notifies.
Net: one new public method on the manager instead of two.
* Inline the active-language write in the registry, drop setActiveLanguage
The previous version added setActiveLanguage on the manager as
a 'cleaner API' than direct field writes. But the manager's fields
(documentLanguage, documentDirection, connectedControllers) have
always been public, the registry is the only caller, and the wrapper
was just more public surface to maintain through the eventual
manager/registry collapse.
Net: -70 lines across the test file, no new public methods on the
manager, the registry pipeline writes the fields and iterates the
controllers directly where it would have called setActiveLanguage.
* Document that documentLanguage/Direction are read-only for consumers
Note in JSDoc that the only supported way to change the active language
is umbLocalizationRegistry.loadLanguage(). The fields stay writable for
the registry pipeline (cross-module internal); the comment is here so
the next contributor doesn't reach for them as a shortcut and end up
with the manager state out of sync with what's actually loaded.
* Blueprints: Fix UdiEntityTypeHelper.ToUmbracoObjectType() for document blueprint containers
Adds the missing DocumentBlueprintContainer case so the conversion is
symmetric with FromUmbracoObjectType().
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add missing case for MemberTypeContainer.
* Use reflection to ensure other future missed cases are surfaced without having to explicitly extend the tests.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Blueprints: Fix UdiEntityTypeHelper.ToUmbracoObjectType() for document blueprint containers
Adds the missing DocumentBlueprintContainer case so the conversion is
symmetric with FromUmbracoObjectType().
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add missing case for MemberTypeContainer.
* Use reflection to ensure other future missed cases are surfaced without having to explicitly extend the tests.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add auto upgrade coordination for load balanced setups
* Add tests
* Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix(infrastructure): move TryBecomeLeaderAsync inside try/catch in UnattendedUpgradeBackgroundService
Ensures DB exceptions thrown during migration coordination set BootFailed
rather than faulting the background service silently.
* Fix feedback
* Update src/Umbraco.Infrastructure/Install/MigrationCoordinator.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Recheck state
* fix(tests): update concurrent race test for post-claim DetermineRuntimeLevel check
The winner now calls DetermineRuntimeLevel() once from the post-claim check
and must see Upgrading; the loser polls twice before seeing Run. Transition
the mock on the second call instead of the first.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* migrate relation type table collection view to table kind
* update page locator
* Request relations when workspace unique is set
* fix types
* split models
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Use constant for relation type collection alias + remove redundant fields
* Add observer keys in relation-type workspace view
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Cache cacheversion on scope
* Add tests
* Cache: Use ConcurrentDictionary for the inner per-scope version map
The inner Dictionary<string, Guid> was not thread-safe. Replacing it
with ConcurrentDictionary<string, Guid> removes the hidden assumption
that the root scope is only accessed from a single thread at a time.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Update src/Umbraco.Core/Cache/IRepositoryCacheVersionAccessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update tests/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Cache/RepositoryCacheVersionAccessorTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.Common/Cache/RepositoryCacheVersionAccessor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Skips failing test so we can run nightly. THIS NEEDS TO BE REVERTED
* Revert "Skips failing test so we can run nightly. THIS NEEDS TO BE REVERTED"
This reverts commit c34d1736c336b3fcf7803b44e88f6018fa45c275.
* Only write version once pr. scope
* Add tests
* Remove unnececary locks
* Fix thread-safety: replace HashSet with ConcurrentHashSet and use GetOrAdd to eliminate TOCTOU races
* Add unit tests for RepositoryCacheVersionService
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Mocks: Add missing signalR property to mock server configuration response
The GetServerConfigurationResponse type was updated in #22700 to require
a signalR.skipNegotiation property, but the MSW mock handler was not
updated to match, causing a tsc compilation error.
Mocks: Add missing signalR property to mock server configuration response
The GetServerConfigurationResponse type was updated in #22700 to require
a signalR.skipNegotiation property, but the MSW mock handler was not
updated to match, causing a tsc compilation error.
* Core: Preserve path case in ShadowFileSystem
ShadowFileSystem stored staged files at their original case via _sfs.AddFile
but tracked them under a lowercased key (NormPath calling ToLowerInvariant).
On Complete(), Inner.AddFile(kvp.Key, _sfs.GetFullPath(kvp.Key)) reconstructed
the staged file's path from the lowercased key, so on case-sensitive file
systems (Linux) File.Move failed with FileNotFoundException whenever a path
contained any uppercase character.
Drop the ToLowerInvariant from NormPath and switch the tracking dictionary
to StringComparer.OrdinalIgnoreCase. Lookups remain case-insensitive
(matching Windows semantics) while the stored key now matches what was
written to disk. IsChild/IsDescendant updated to OrdinalIgnoreCase
StartsWith for consistency.
Added regression test reproducing the original FileNotFoundException with
Views/PageNotFound.cshtml.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Rename regression test to follow Can_ naming convention
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Track canonical staged path per shadow node
The case-insensitive node dictionary preserved only the first inserted
key, so re-staging a logical path with a different case (e.g. AddFile
"Views/Foo.cshtml" then "views/foo.cshtml") wrote a phantom second file
to _sfs on Linux while Complete still resolved the original key — leaving
orphaned shadow files and committing stale content.
Track the original-case staged path on each ShadowNode and route all
_sfs operations (AddFile, OpenFile, GetFullPath, GetLastModified,
GetCreated, GetSize, MoveFile, Complete) through that canonical path.
Inner.AddFile on commit still uses the stored dictionary key, so the
destination case in the inner file system is unchanged.
Expanded the regression test to also exercise OpenFile, GetSize and
AddFile against a different-cased path, and to assert that the staged
file is written exactly once.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Make ShadowNode.CanonicalPath non-nullable
Every node now carries the original-case path it tracks, set at construction.
This removes the defensive 'sf.CanonicalPath ?? path' fallbacks at the read
sites (OpenFile, GetFullPath, GetLastModified, GetCreated, GetSize, Complete)
which were unreachable but noise.
The GetCanonicalPath helper is gone; AddFile and MoveFile now use the existing
node variable inline ('sf?.CanonicalPath ?? path' — node can legitimately be
null when staging a path for the first time).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Address Copilot review: normalize delete key, cross-platform test
DeleteDirectory(recursive=false) stored the deletion marker under the
caller-supplied path (which can contain backslashes) instead of the
normalized key, so a follow-up NormPath-based lookup could miss the
deletion and IsChild scans could become inconsistent. Use normPath.
The shadow-second-file assertion in the regression test used
File.Exists on a different-cased path; that returns true on
case-insensitive file systems (Windows / default macOS) regardless of
the actual stored case, so the assertion was platform-dependent.
Replaced it with a directory-count check that's cross-platform.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add cross-platform regression test so any reversion would be caught on a non-case sensitive file system.
* Cleaned up warnings, obsoletions and comments in the existing tests.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
(cherry picked from commit abfa8cb144)
* Core: Preserve path case in ShadowFileSystem
ShadowFileSystem stored staged files at their original case via _sfs.AddFile
but tracked them under a lowercased key (NormPath calling ToLowerInvariant).
On Complete(), Inner.AddFile(kvp.Key, _sfs.GetFullPath(kvp.Key)) reconstructed
the staged file's path from the lowercased key, so on case-sensitive file
systems (Linux) File.Move failed with FileNotFoundException whenever a path
contained any uppercase character.
Drop the ToLowerInvariant from NormPath and switch the tracking dictionary
to StringComparer.OrdinalIgnoreCase. Lookups remain case-insensitive
(matching Windows semantics) while the stored key now matches what was
written to disk. IsChild/IsDescendant updated to OrdinalIgnoreCase
StartsWith for consistency.
Added regression test reproducing the original FileNotFoundException with
Views/PageNotFound.cshtml.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Rename regression test to follow Can_ naming convention
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Track canonical staged path per shadow node
The case-insensitive node dictionary preserved only the first inserted
key, so re-staging a logical path with a different case (e.g. AddFile
"Views/Foo.cshtml" then "views/foo.cshtml") wrote a phantom second file
to _sfs on Linux while Complete still resolved the original key — leaving
orphaned shadow files and committing stale content.
Track the original-case staged path on each ShadowNode and route all
_sfs operations (AddFile, OpenFile, GetFullPath, GetLastModified,
GetCreated, GetSize, MoveFile, Complete) through that canonical path.
Inner.AddFile on commit still uses the stored dictionary key, so the
destination case in the inner file system is unchanged.
Expanded the regression test to also exercise OpenFile, GetSize and
AddFile against a different-cased path, and to assert that the staged
file is written exactly once.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Make ShadowNode.CanonicalPath non-nullable
Every node now carries the original-case path it tracks, set at construction.
This removes the defensive 'sf.CanonicalPath ?? path' fallbacks at the read
sites (OpenFile, GetFullPath, GetLastModified, GetCreated, GetSize, Complete)
which were unreachable but noise.
The GetCanonicalPath helper is gone; AddFile and MoveFile now use the existing
node variable inline ('sf?.CanonicalPath ?? path' — node can legitimately be
null when staging a path for the first time).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Address Copilot review: normalize delete key, cross-platform test
DeleteDirectory(recursive=false) stored the deletion marker under the
caller-supplied path (which can contain backslashes) instead of the
normalized key, so a follow-up NormPath-based lookup could miss the
deletion and IsChild scans could become inconsistent. Use normPath.
The shadow-second-file assertion in the regression test used
File.Exists on a different-cased path; that returns true on
case-insensitive file systems (Windows / default macOS) regardless of
the actual stored case, so the assertion was platform-dependent.
Replaced it with a directory-count check that's cross-platform.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add cross-platform regression test so any reversion would be caught on a non-case sensitive file system.
* Cleaned up warnings, obsoletions and comments in the existing tests.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Preserve user-supplied property editor UI group names.
* Add support for localised property editor groups, and use localised values for all core property editors.
* Fixed check to look for '#' as the first character of the provided group name.
* danish translation
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Mark ServerEventSender as distributed cache notification handler
* Batch and deduplicate notifications in ServerEventSender
* Introduce IDistributedCacheAsyncNotificationHandler<T> and use it in ServerEventSender
* Add ServerEventSender unit tests and address PR review feedback
* Mark ServerEventSender as distributed cache notification handler
* Batch and deduplicate notifications in ServerEventSender
* Introduce IDistributedCacheAsyncNotificationHandler<T> and use it in ServerEventSender
* Add ServerEventSender unit tests and address PR review feedback
* Add submit button state to sort dialog.
* Guard against re-entrant submit in sort-children-of modal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Set failed button state when sort-children-of submit throws.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit dfe93c5639)
* Add submit button state to sort dialog.
* Guard against re-entrant submit in sort-children-of modal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Set failed button state when sort-children-of submit throws.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Dont fail silently on missing ambientscope
This makes it in line with other methods in the repo
* Pass on Cancellationtoken to the job to support gracefull job shutdown
(cherry picked from commit 5ae17ace6a)
* Dont fail silently on missing ambientscope
This makes it in line with other methods in the repo
* Pass on Cancellationtoken to the job to support gracefull job shutdown
* Auth: un-deprecates getLatestToken and routes per-request fetches through it
getLatestToken is the only public API for "wait for any in-flight refresh,
trigger one if the access token has expired, then return". External and
internal consumers were warned off it without an equivalent replacement:
configureClient only helps @hey-api/openapi-ts clients, and consumers using
axios/ky/native fetch had no other gate.
- Removes the @deprecated JSDoc + UmbDeprecation.warn() call so the public
surface no longer prints a console warning per call.
- Uses getLatestToken.bind(this) for the auth callback inside configureClient
and the token callback inside getOpenApiConfiguration so both paths share
the same #ensureTokenReady gate.
- Replaces the hard-coded `Authorization: Bearer [redacted]` in unlinkLogin
and #makeLinkTokenRequest with `Bearer ${await getLatestToken()}` so those
fetches participate in the refresh coordination rather than firing with a
potentially-revoked cookie.
Also wires the UmbracoExtension template's entrypoint to call
authContext.configureClient(client), matching the v18 template change. The
framework awaits onInit, so this guarantees the API client is fully
configured before any element in the extension can use it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Auth: tightens UmbAuthContext correctness and accepts any hey-api client
Pulls in a batch of non-breaking improvements to UmbAuthContext that came
out of an audit on the back of the un-deprecation work in this PR:
Public surface:
- configureClient(client) now accepts a new structural UmbApiClient type
(exported from @umbraco-cms/backoffice/http-client). Each @hey-api/openapi-ts
generation produces a fully-bound Client<…>; the backoffice's umbHttpClient
and an extension's regenerated client are structurally identical but TS
treats them as distinct generic instantiations. The widened parameter lets
extensions wire their own client without `as never` casts at call sites.
bindDefaultInterceptors keeps its strict typeof umbHttpClient parameter
(preserving autocomplete inside interceptor callbacks); the cast happens
once, internally.
Correctness:
- The auth context now holds a single UmbApiInterceptorController, lazy-
initialised on first configureClient() call. Previously each call
instantiated a new controller, which re-provided the UmbAuthSignalerContext
on the host and stacked listeners — visible the moment an extension also
called configureClient. One controller for the lifetime of the host, all
configured clients share it.
- completeAuthorizationRequest checks sessionStorage before asking
window.opener for the PKCE verifier. The previous order hung for the full
postMessage timeout whenever oauth_complete loaded with a non-OAuth
window.opener (which is set for ANY window.open target). The opener
postMessage timeout is also dropped from 5s to 1.5s — a real popup parent
responds within milliseconds; longer is just wait time for the unrelated-
opener case.
- The cross-tab 'authorized' BroadcastChannel handler now routes through
#setSessionLocally so the timestamp math stays in one place. The
'sessionUpdate' handler still applies pre-computed timestamps directly
(peer broadcast already did the math) but does so inside the
#inSessionUpdateCallback guard, so a synchronous session$ observer can no
longer trigger a spurious /token refresh on top of a peer's update.
- #ensureTokenReady drops its query-then-request pattern. Now always queues
behind the umb:token-refresh lock with a no-op callback — if the lock is
free it acquires immediately, if held it waits. Eliminates the race window
between query() and request().
- destroy() invokes #popupCleanup before tearing down so an in-flight popup
flow's window-level message listener and closed-poll interval don't leak
past the context's lifetime. The cleanup helper itself now resolves the
popup-flow Promise — every termination path (authorized, popup closed,
superseded by a new flow, context destroyed) is observable to the awaiter
instead of hanging forever.
Cleanup:
- makeAuthorizationRequest is annotated Promise<void> so the redirect and
popup branches share an explicit return type.
- unlinkLogin wraps the parsed problem-details payload in a real Error (with
the original payload exposed on `.cause`) so callers using `instanceof
Error` or expecting a stack trace get sane behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Auth: un-deprecates getLatestToken and routes per-request fetches through it
getLatestToken is the only public API for "wait for any in-flight refresh,
trigger one if the access token has expired, then return". External and
internal consumers were warned off it without an equivalent replacement:
configureClient only helps @hey-api/openapi-ts clients, and consumers using
axios/ky/native fetch had no other gate.
- Removes the @deprecated JSDoc + UmbDeprecation.warn() call so the public
surface no longer prints a console warning per call.
- Uses getLatestToken.bind(this) for the auth callback inside configureClient
and the token callback inside getOpenApiConfiguration so both paths share
the same #ensureTokenReady gate.
- Replaces the hard-coded `Authorization: Bearer [redacted]` in unlinkLogin
and #makeLinkTokenRequest with `Bearer ${await getLatestToken()}` so those
fetches participate in the refresh coordination rather than firing with a
potentially-revoked cookie.
Also wires the UmbracoExtension template's entrypoint to call
authContext.configureClient(client), matching the v18 template change. The
framework awaits onInit, so this guarantees the API client is fully
configured before any element in the extension can use it.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Auth: tightens UmbAuthContext correctness and accepts any hey-api client
Pulls in a batch of non-breaking improvements to UmbAuthContext that came
out of an audit on the back of the un-deprecation work in this PR:
Public surface:
- configureClient(client) now accepts a new structural UmbApiClient type
(exported from @umbraco-cms/backoffice/http-client). Each @hey-api/openapi-ts
generation produces a fully-bound Client<…>; the backoffice's umbHttpClient
and an extension's regenerated client are structurally identical but TS
treats them as distinct generic instantiations. The widened parameter lets
extensions wire their own client without `as never` casts at call sites.
bindDefaultInterceptors keeps its strict typeof umbHttpClient parameter
(preserving autocomplete inside interceptor callbacks); the cast happens
once, internally.
Correctness:
- The auth context now holds a single UmbApiInterceptorController, lazy-
initialised on first configureClient() call. Previously each call
instantiated a new controller, which re-provided the UmbAuthSignalerContext
on the host and stacked listeners — visible the moment an extension also
called configureClient. One controller for the lifetime of the host, all
configured clients share it.
- completeAuthorizationRequest checks sessionStorage before asking
window.opener for the PKCE verifier. The previous order hung for the full
postMessage timeout whenever oauth_complete loaded with a non-OAuth
window.opener (which is set for ANY window.open target). The opener
postMessage timeout is also dropped from 5s to 1.5s — a real popup parent
responds within milliseconds; longer is just wait time for the unrelated-
opener case.
- The cross-tab 'authorized' BroadcastChannel handler now routes through
#setSessionLocally so the timestamp math stays in one place. The
'sessionUpdate' handler still applies pre-computed timestamps directly
(peer broadcast already did the math) but does so inside the
#inSessionUpdateCallback guard, so a synchronous session$ observer can no
longer trigger a spurious /token refresh on top of a peer's update.
- #ensureTokenReady drops its query-then-request pattern. Now always queues
behind the umb:token-refresh lock with a no-op callback — if the lock is
free it acquires immediately, if held it waits. Eliminates the race window
between query() and request().
- destroy() invokes #popupCleanup before tearing down so an in-flight popup
flow's window-level message listener and closed-poll interval don't leak
past the context's lifetime. The cleanup helper itself now resolves the
popup-flow Promise — every termination path (authorized, popup closed,
superseded by a new flow, context destroyed) is observable to the awaiter
instead of hanging forever.
Cleanup:
- makeAuthorizationRequest is annotated Promise<void> so the redirect and
popup branches share an explicit return type.
- unlinkLogin wraps the parsed problem-details payload in a real Error (with
the original payload exposed on `.cause`) so callers using `instanceof
Error` or expecting a stack trace get sane behaviour.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Client: Aliased `DocumentVariantStateModel` for documents and document-blueprints packages
Hoist `UmbDocumentVariantState` and `UmbDocumentBlueprintVariantState` aliases (re-exporting `DocumentVariantStateModel`) into dedicated `variant-state.ts` leaf files. Internal package modules, mocks and the core split-view selector now consume the alias instead of referencing `DocumentVariantStateModel` directly, mirroring the structure on `v18/dev` to reduce upstream-merge conflicts.
* Revert mock data changes
to prevent importing the whole "document" module.
* Tweaked the `DocumentVariantStateModel` import for mock data
Otherwise this is problematic for cherry-picked commits for v18.0.
* Missed one!
* Update stored color label if changed on save of document with color picker.
* Clarify intent of change event dispatch in label sync
* Make comparison case insensitive.
* Added unit tests for new behaviour.
* Update stored color label if changed on save of document with color picker.
* Clarify intent of change event dispatch in label sync
* Make comparison case insensitive.
* Added unit tests for new behaviour.
* Order SQL before FetchOneToMany in dictionary entry retrieval to prevent duplicate items in collection view.
* Used PrimaryKey instead of UniqueId to take advantage of the clustered index.
* extend icons with information from theseaurus
* implement new icon search logic
* clean-up data
* icon manager
* sorting with a backup of the name
* refactor into a controller
* improve multi word group search
* embed lucide data
* rename tech into technology
* remove paper from dollar
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* improve search
* related should not show up in search
* update threshold
* separate name words
* also consider full icon name match
* better comment
* other approach for full name matches
* full icon name search if query contains a -
* fix test
* remove related code
* updates to related
* make its own package
* revert changes
* update tsconfig
* package-lock
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* temp mock set
* test getPropertyValue
* Extend document workspace context tests to cover read/write property values
* move context files into context folder
* Add document CRUD tests, mock handler & interceptor
* temp mock error interceptor
* Return 404 when document not found
* Use undefined for entity unique state until initialized
* Fix import paths for document workspace editor
* Add test utils and extend document workspace tests
* Update document-workspace-context.test-utils.ts
* Match invariant variant when variantId missing
* Ensure finishPropertyValueChange runs on exit
Wrap setPropertyValue implementation in a try/finally and move finishPropertyValueChange into the finally block so cleanup always runs even if an error is thrown. No other functional changes — code was re-indented and organized but behavior remains the same except for guaranteed cleanup on error.
* Require variantId for culture/segment-variant props
* fix types
* fix mock modal typescript error
* Distinguish unloaded vs root entity unique
* use the real current user context
* hide mock set in UI
* rename mock set
* Move initiatePropertyValueChange into try
* Use 'satisfies' for UmbMockDataSet assertions
* Preserve requested unique on failed load
* Treat missing variantId as invariant
* Reset update lock on destroy
* remove unused group + user
* Guard _current.unmute and remove destroy override
* Add tests for element data manager
* Guard subject access and add destroy test
* Throw when calling methods after destroy
* docs(claude): document how unsafeHTML should be used together with escapeHTML()
* fix: adds escapeHTML where appropriate in order not to render html directly
* chore: removes small nitpick fallback
* docs(claude): fixes incorrect using of unsafeHTML
* feat(localization): add localize.htmlString() and convert call sites
Adds a new `htmlString()` method on UmbLocalizationController that escapes
interpolated args via escapeHTML and returns a Lit unsafeHTML directive.
This is the safe replacement for the manual `unsafeHTML(this.localize.string(...))`
pattern, which leaves user-controlled args un-escaped (XSS hazard).
Converts all direct `unsafeHTML(localize.string|term(...))` call sites
across modals, rollback views, packager, property editors, and entity
actions. Also fixes the latent XSS in `trash.action.ts` (sibling of the
previously-fixed `delete.action.ts`).
Updates docs/security.md with guidance on `string()` vs `htmlString()`
and the modal-content wrapping pattern.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(eslint): add no-unsafe-localize rule to flag unsafeHTML(localize.string|term(...))
Catches the XSS pattern this PR's helper replaces, so future regressions
are caught at lint time instead of in review (or in a security advisory).
Suggests `localize.htmlString(...)` as the safe replacement.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(localization): stringify htmlString args before escaping
Addresses review feedback on PR #22731. escapeHTML() short-circuits on
non-strings (returns the value unchanged), so an arg like
{ toString: () => '<script>...</script>' } would bypass the escape and
render unescaped via unsafeHTML.
Stringifies args before escaping while preserving `undefined` so
string()'s placeholder semantics are unchanged. Adds a regression test
covering the toString() bypass.
Also adds the missing html/unsafeHTML imports to the security.md
example so the snippet is self-contained.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(installer-consent-element): sanitise content before rendering it
* fix(dashboard-telem-element): sanitise html before rendering
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: LLaverty <liamlaverty@gmail.com>
* docs(claude): document how unsafeHTML should be used together with escapeHTML()
* fix: adds escapeHTML where appropriate in order not to render html directly
* chore: removes small nitpick fallback
* docs(claude): fixes incorrect using of unsafeHTML
* feat(localization): add localize.htmlString() and convert call sites
Adds a new `htmlString()` method on UmbLocalizationController that escapes
interpolated args via escapeHTML and returns a Lit unsafeHTML directive.
This is the safe replacement for the manual `unsafeHTML(this.localize.string(...))`
pattern, which leaves user-controlled args un-escaped (XSS hazard).
Converts all direct `unsafeHTML(localize.string|term(...))` call sites
across modals, rollback views, packager, property editors, and entity
actions. Also fixes the latent XSS in `trash.action.ts` (sibling of the
previously-fixed `delete.action.ts`).
Updates docs/security.md with guidance on `string()` vs `htmlString()`
and the modal-content wrapping pattern.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore(eslint): add no-unsafe-localize rule to flag unsafeHTML(localize.string|term(...))
Catches the XSS pattern this PR's helper replaces, so future regressions
are caught at lint time instead of in review (or in a security advisory).
Suggests `localize.htmlString(...)` as the safe replacement.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(localization): stringify htmlString args before escaping
Addresses review feedback on PR #22731. escapeHTML() short-circuits on
non-strings (returns the value unchanged), so an arg like
{ toString: () => '<script>...</script>' } would bypass the escape and
render unescaped via unsafeHTML.
Stringifies args before escaping while preserving `undefined` so
string()'s placeholder semantics are unchanged. Adds a regression test
covering the toString() bypass.
Also adds the missing html/unsafeHTML imports to the security.md
example so the snippet is self-contained.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(installer-consent-element): sanitise content before rendering it
* fix(dashboard-telem-element): sanitise html before rendering
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: LLaverty <liamlaverty@gmail.com>
* Revert "MD files for Design knowledge (#22725)"
This reverts commit 212f3183c1.
* Revert "Backoffice Mocks: Derive user language access from user groups (#22721)"
This reverts commit 9671fec9ad.
* Revert "File-system Services: Complete child scopes on read-miss and validation-failure paths (#22717)"
This reverts commit 489d9ebc2e.
* Revert "manual revert of merge gone wrong"
This reverts commit a443f8ba08.
* Revert "fix(installer-user): added min length message for installer user elem… (#21829)"
This reverts commit 6789d7e757.
* Reapply "Merge branch 'main' of https://github.com/umbraco/Umbraco-CMS into claude/keen-nightingale-5ef5bd"
This reverts commit daecbd02b8.
* fix(installer-user): added min length message for installer user elem… (#21829)
* fix(installer-user): added min length message for installer user element.
* Update src/Umbraco.Web.UI.Client/src/apps/installer/user/installer-user.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix password minlength message binding syntax
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Emma L Garland <1649855+emmagarland@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* File-system Services: Complete child scopes on read-miss and validation-failure paths (#22717)
* Ensure scopes in FolderServiceOperationBase are completed.
* Added integration tests to verify the fixes.
* Backoffice Mocks: Derive user language access from user groups (#22721)
fix(mocks): derive user language access from user groups
Previously hasAccessToAllLanguages was hardcoded to true and languages to
an empty array. Now both are derived from the user's user group memberships.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* MD files for Design knowledge (#22725)
* Fix issues following merge.
* Fixed linting errors.
* Fix linter errors (2).
* Restore current-user.context.ts
* Restore block-list-entry.element.ts.
* Removed failing webhook repository test files.
---------
Co-authored-by: Yari Mariën <75362020+Yinzy00@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Emma L Garland <1649855+emmagarland@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(mocks): derive user language access from user groups
Previously hasAccessToAllLanguages was hardcoded to true and languages to
an empty array. Now both are derived from the user's user group memberships.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* View Contexts for Dashboards + Section Views to support Browser Title and Hints
* fix code
* use alias for observe ctrl alias
* remove test code
* Position badge in section icon slot
---------
Co-authored-by: engjlr <enl@umbraco.dk>
* WIP
* Cleanup and type generation
* Improve obsoletions
* Fix removed constructor
* Simplify logic because of SignalR's JS limitations
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add SignalRSettings to Schema
* Abstrack SignalRRoutes class
* Fix bool to observable<bool>
* Refactor base class: pull down common service property, make abstract with protected constructor.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Ensure content type cache is correctly invalidated for element types.
* Clear key to Id map on clear all.
* Refactor and update tests for additional coverage and naming alignment.
* Updates from code review.
* Close suggestion dropdown on blur and escape, fix suggestion selection
* Fix code complex
* Fix to tab and complexity
* Fix to tab and complexity
* Fix to tab and complexity
* Clear matches on add/escape and remove focus rule
---------
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* unit test for boolean state
* improve umb class state set value identical check
* consistent ability to make a observablePart
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Copilot <copilot@github.com>
* Add table collection view and manifests
* Use table kind in collection example
* Update entity-name-table-column-layout.element.ts
* Recompute table rows when item hrefs change
* define and render columns from manifest
* wip language implementation
* map to unique field
* rename to label
* test implementation for users table
* experiment: value minimal display extension
* register as workspace context
* add boolean display
* clean up
* add example entity actions
* add example description
* Update table-collection-view.element.ts
* Omit base 'meta' and relax table meta type
* Hardcode description column when present
* localize column names
* Update table-collection-view.element.ts
* Type manifest on collection view elements
* Use UmbLitElement instead of LitElement
* fix types
* Update entity-name-table-column-layout.element.ts
* provide entity context for each table row
* fix breaking change and introduce a deprecation warning
* Add status column to example collection view + localize column labels
* implement the UmbTableColumnLayoutElement interface
* add tests for the table collection view
* Make host element optional; add table docs/types
* Update controller-host.mixin.ts
* Update src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add language collection context
* introduction of value type and rename to value summary
* Add core DateTime value summary; migrate user last-login
* remove unused
* Rename user group value type to References
* Remove the component's standalone resolution path
* Add start-node value summaries & sections for user group table
* Guard resolver and render when start node missing
* refactor value-summary resolver, coordinator, and API
* introduce default kind
* remove $ in variable name
* make extension element name more specific to not collide with interface name
* add element base
* move to section module
* return as observable from resolver
* use extension item repository
* prefix start node feature with user
* add value type and value summary for date-time-with-time-zone property editor
* render timezone
* Add fallback render if no extensions can be found
* Add color-picker value summary and types
* add summary for slider + align types
* make manifest prop name more explicit
* align element name with class name
* reorganize
* manually combine imports to decrease the number of dynamic imports
* export as valueResolver instead of api
* Inline default value-summary kind manifest
* Use single raw value in value-summary coordinator
* Render summaries on Document Collection cards
* format date the same way as the property editor
* first iteration of docs and skills
* updates to docs + skills
* render icon for language collection items
* remove test collection manifest
* delete local language table collection view implementation
* implement the get hrefs method in the user group collection context
* Update controller-host.mixin.ts
* Update entity-name-table-column-layout.element.ts
* Update entity-actions-table-column-view.element.ts
* Handle undefined row element in table rendering
Allow onRowRendered to accept an undefined element and clean up row contexts when a row is unmounted. Update the callback signature in table.element.ts and handle the undefined case in table-collection-view.element.ts by destroying the host and removing the stored context for the item to avoid memory leaks when rows are removed.
* Update controller-host.mixin.ts
* remove test registration
* Prefix type in value key generation
* Skip render when boolean value is undefined
* Add JSDoc and reorder imports in coordinator
* fix lint errors
* Update icons.ts
* valueResolver to class in tests
* Update index.ts
* Add value-summary and value-type Vite entries
* Cache table config and column cell elements
* Use localization for user state labels
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
The manual approval gates added for the duplicate-version rerun were
single-use scaffolding for that specific release. Remove them and
tighten Deploy_Npm and Upload_API_Docs to require Deploy_NuGet to
have actually succeeded (Succeeded or SucceededWithIssues) — so a
NuGet failure deliberately blocks the npm release and docs upload.
Keep the structural change to inspect dependencies.Deploy_NuGet.result
directly rather than rely on the transitive succeeded(). That fix is
permanent: it's what protects npm and docs from cascade-skipping
whenever MyGet has another upstream outage.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Both stages used implicit succeeded(), which is transitive across the
full ancestor graph. A MyGet failure (or a NuGet failure on a re-run
where the version is already published) would therefore cascade-skip
both stages even though their own work is independent of those feeds.
Switch them to inspect dependencies.Deploy_NuGet.result directly so
they remain eligible when NuGet ran and either succeeded or failed,
while still being skipped when Deploy_NuGet itself was Skipped (e.g.
non-release runs). Upload_API_Docs additionally requires Build_Docs
to have produced artifacts.
Add a manual approval gate (ManualValidation@0 server job) to each
stage so a NuGet failure caused by something genuinely unrecoverable
(e.g. expired API key) doesn't auto-promote npm or docs publishes -
the operator must explicitly approve each downstream stage.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Add manual deploy to NuGet for when MyGet publish fails.
* Simplified instructions for manual approval.
* Gate NuGet release on MyGet's direct result, not transitive succeeded/failed.
succeeded() and failed() are transitive across the full ancestor graph,
so a failure in Unit/Integration/E2E (which skips Deploy_MyGet) still made
or(succeeded(), failed()) evaluate to true and opened the approval gate
on a broken build. Inspect dependencies.Deploy_MyGet.result instead so
Deploy_NuGet only becomes eligible when MyGet itself actually ran.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* extend icons with information from theseaurus
* implement new icon search logic
* clean-up data
* sorting with a backup of the name
* refactor into a controller
* improve multi word group search
* embed lucide data
* rename tech into technology
* remove paper from dollar
* implement fuzzy search for property editor UIs
* minor style update
* improve property editor UI search
* improve search
* improve search data for Property Editor UIs
* remove alias search from property editor ui search
* add usage keywords
* Property editor Suggestions based on Property Label
* related should not show up in search
* rename to suggestionQuery
* update threshold
* separate name words
* also consider full icon name match
* better comment
* other approach for full name matches
* full icon name search if query contains a -
* fix test
* cache all tokens as well
* catch rejection
* resolve feedback
* handle rejected promise
* cancel debounce on disconnect
Co-authored-by: Copilot <copilot@github.com>
* declare voids
* corrections
Co-authored-by: Copilot <copilot@github.com>
* back out if no tokens
---------
Co-authored-by: Copilot <copilot@github.com>
* Adding a more detailed error message when deleting a logged in user
* Fixing overlooked integration test
* Fixing enum binary mistake. Appending enum to the end rather than in the middle.
* Introducing better naming for the enum
* Added api helper for reset auth state
* Added more constant variables for login and forgot password message
* Added ui helper for login page
* Added api helper for smtp
* Added tests for backoffice login
* Added tests for backoffice logout
* Added tests for forgot password
* Added api helper for user
* Make tests run in the pipeline
* Updated appsetting to enable reset password
* Added more waits
* Added waits
* Updated locator
* Fix flaky tests
* Updated confirmation message
* Fixed comments
* Removed unused code
* Reverted npm command
* Add ModelState.IsValid validation in controller action
* Update method documentation and return simple BadRequest response (aligns with other usages, e.g. BackOfficeController.Verify2FACode).
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* remove inheritance of readonly state
* keep rendering edit in read-only mode
* INVARIANT variant id as static
* parse readonly state, without variant ids as origin is the property read-only state
* stop inheriting read only
* no need for async
* setup read only state based on user permissions
* simplify document-block-property-level-permissions
* make isPermittedForObservableVariant return undefined in bad case
* revert
* improve life cycle for extension initializer
* fix and clean-up
* clean up
* unit test for the actual problem
* clean up
* clean up
* revert logic
* transform access context into local controller
* re-introduce submit create button
* simplify match
* update js docs
* strict compare on config object level, to cover multiple conditions of the same alias.
* Revert "transform access context into local controller"
This reverts commit 1a83d9586b.
* rename file in manifest
* RTE: set manager readOnly
* set fallback on readOnly
* inherit readOnly state when block workspace is invariant
* read-only tag for Block Workspace
* make guard fallback reactive
* observe readOnly languages
* no if sentence
* observe fallback for property + name guards
* prevent cancelled context get to cause problems
* revert removal of || this._isReadOnly check for component rendering
* add comment for clarification
* remove style import
* mark as readonly and make js-const
* remove `as const`
* unit test for reactive fallback feature
* more guard unit tests
* more variantId tests
* move block language access controller to block package
* Update base-extension-initializer.controller.ts
* fix test
* improve switch condition
* offset condition
* Block Workspace: Add data-mark for acceptance test locator
* apply entity-type to the workspace data-mark
* layout-headline
* Updated locator to use new data-mark
* Updated tests to make them less fragile
* null ctrl alias for constructor initiated observations
* import directly
* do not react to not existing user-data or missing context
* add comment
* refactor package registration logic
* package name for code editor
* leave unregistere out
* await load all bundles
Co-authored-by: Copilot <copilot@github.com>
* move initializer to app element
* Batch register extensions with validation
* remove await on load for extension initializers
* Debounce extension updates and set loaded flag
* remove unused imports
* refactor backoffice -> app
* clean up imports
* rename comment
Co-authored-by: Copilot <copilot@github.com>
* base extension initializer is loaded update
* app loader
Co-authored-by: Copilot <copilot@github.com>
* embed umbraco-packages
* remove lazy loads from dataSourceDataMapper
* revert
* enable routes to be undefined
Co-authored-by: Copilot <copilot@github.com>
* comment
Co-authored-by: Copilot <copilot@github.com>
* make sure load only calls once
Co-authored-by: Copilot <copilot@github.com>
* comments and todos
* destroy consumer if existing
* block language access tests
* load user at the end of loading all package modules
* assign symbol for is-trashed observer
* revert language readonly rules
Co-authored-by: Copilot <copilot@github.com>
* is-trashed context + observation
Co-authored-by: Copilot <copilot@github.com>
* read-only as view prop for block list
Co-authored-by: Copilot <copilot@github.com>
* readonly as view prop
* readonly prop for grid,rte,single
Co-authored-by: Copilot <copilot@github.com>
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Copilot <copilot@github.com>
* Avoid render structure view when element type is active
* Avoid render history clean up when is an element type
* Replace hidden sections with inline "not applicable" message for Element Types
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Mark HttpClient IgnoreCertificateErrors as obsolete due to security risk and add TODO to remove in a future release
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
* feat(block): add blockAction extension type for extensible block entry actions
Introduce a new `blockAction` extension type that allows both internal and
3rd-party extensions to register actions on block items. This replaces the
hardcoded Delete button on Block List entries with an extension-registered
action, while keeping Edit Content, Edit Settings, and Copy to Clipboard
as slotted content for incremental migration.
The new `<umb-block-action-list>` element owns the `<uui-action-bar>` and
renders a `<slot>` for hardcoded actions followed by extension-registered
`blockAction` extensions, enabling one-by-one migration of actions.
* feat(block): apply blockAction extension to grid, rte, and single block editors
Extend the blockAction pattern to all remaining block entry elements.
Each editor now uses <umb-block-action-list> with slotted hardcoded
actions and the Delete action registered via the extension registry.
* fix(block): render blockAction extensions directly in uui-action-bar
Replace umb-extension-with-api-slot with UmbExtensionsElementAndApiInitializer
to render blockAction elements as direct children of uui-action-bar. This fixes
the border-radius issue where the wrapper element broke :first-child/:last-child
structural selectors used by uui-action-bar for button styling.
* refactor(block): replace showOnReadOnly meta with BlockEntryIsReadOnly condition
Add a new Umb.Condition.BlockEntryIsReadOnly condition that checks the
read-only state from UMB_BLOCK_ENTRY_CONTEXT. This replaces the inline
read-only guard and showOnReadOnly meta flag on the default kind element.
Delete action uses the condition with match: false (hidden when read-only).
Copy to Clipboard has no condition (always visible). 3rd-party actions
opt in to read-only gating by adding the condition to their manifest.
* feat(block): migrate clipboard copy to blockAction extension
Move the Copy to Clipboard action from hardcoded buttons to a registered
blockAction extension across all four block editors. The copy logic is
moved from each entry element into its respective entry context, with a
base copyToClipboard() method on UmbBlockEntryContext.
* docs(block): add plan for migrating Edit Content and Edit Settings to blockAction
* feat(block): migrate Edit Settings to blockAction extension
Replace the hardcoded Edit Settings button with a blockAction extension
using the default kind. The API class provides getHref() for workspace
navigation and getValidationDataPath() for the invalid badge.
Adds getValidationDataPath() to the UmbBlockAction interface and default
kind element, enabling any blockAction to display a validation badge.
Introduces Umb.Condition.BlockEntryHasSettings condition to control
visibility based on whether the block has a settings element type.
* feat(block): migrate Edit Content to blockAction extensions
Split the hardcoded Edit Content button into two blockAction extensions
controlled by manifest conditions:
- Umb.BlockAction.EditContent — navigates to workspace content view,
shows validation badge via getValidationDataPath()
- Umb.BlockAction.ExposeContent — calls context.expose() when block
is not yet exposed and content edit is hidden
Adds match support to BlockEntryShowContentEdit condition and creates
a new BlockEntryIsExposed condition at the entry level.
Removes the <slot> from umb-block-action-list — all block entry actions
are now fully driven by the extension registry.
* Removes plan/spec files
* chore(block): address review findings for blockAction feature
- Add TODO comment for stale getHref/getValidationDataPath (I-1)
- Remove orphaned @state() properties from all four entry elements (I-2)
- Add UMB_BLOCK_ENTRY_SHOW_CONTENT_EDIT_CONDITION_ALIAS constant and
replace string literals in edit-content/expose-content manifests (I-3)
- Change Expose Content weight from 400 to 399 (S-1)
- Add JSDoc to exported types and classes (S-2)
- Fix condition import alias — rename workspace-level to
UmbBlockWorkspaceIsExposedCondition (S-3)
* fix(block): revert CSS custom property rename to preserve backwards compatibility
Restore the original per-editor CSS custom property names:
--umb-block-list-entry-actions-opacity, --umb-block-grid-entry-actions-opacity,
--umb-block-single-entry-actions-opacity. The action bar opacity styles are
now back in each entry element (using #actions selector), so the unified
property name is no longer needed.
* fix(block): address PR review feedback from Copilot and Claude bots
- Fix Expose button label regression — replace dynamic
'#blockEditor_createThisFor' (function key) with static '#actions_create'
so the button no longer renders "Create undefined"
- Guard empty-string href in EditContent and EditSettings actions —
'workspaceEdit{Content,Settings}Path' emits '' before ready; return
undefined instead of '' so the button doesn't get href="" (which would
navigate to the base URL on click)
- Clear _href in default kind api setter — prevents stale href when the
api is replaced or set to undefined
- Fix barrel imports in 3 block entry conditions — import
UMB_BLOCK_ENTRY_CONTEXT directly from context-token.js rather than via
the ../index.js barrel, reducing circular dependency risk
- Make block-action-list reactive to contentTypeAlias changes — the
extensions initializer is now re-created when unique or
contentTypeAlias changes, so forContentTypeAlias filters apply
correctly when contentTypeAlias resolves asynchronously
- Throw in base copyToClipboard() — the default no-op on
UmbBlockEntryContext now throws rather than logging a warning, so any
future subclass that fails to override fails visibly
Tests for the new conditions were attempted but deferred to follow-up;
context observable mocking semantics need more investigation.
* fix(block): restore uui-action-bar styling on block-action buttons
Remove the `compact` attribute from the inner `<uui-button>` and bridge
the CSS custom properties set by `uui-action-bar::slotted(*:first-child)`
etc. through `<umb-block-action>`'s shadow DOM via intermediate
`--umb-button-*` variables. Without this bridge, `uui-button`'s own
`:host` declarations shadow the inherited values and the first/last
button border-radius + padding don't apply.
* fix(block): address second-pass PR review feedback
- Throw when RTE editor manifest is missing so clipboard entries are
never written with an empty propertyEditorUiAlias (would silently
fail to match on paste)
- Replace bare `return` with `return nothing` in default kind element
render() for type-level clarity
- Add class-level JSDoc to exported block action classes
(UmbEditContentBlockAction, UmbEditSettingsBlockAction,
UmbDeleteBlockAction, UmbCopyToClipboardBlockAction,
UmbExposeContentBlockAction) and UmbBlockActionDefaultElement
* refactor(block): reduce copyToClipboard complexity per CodeScene feedback
Extract `#buildPropertyValue()` helper in List, RTE, and Single entry
contexts to move the four content/layout/settings/expose ternaries out
of copyToClipboard, lowering its cyclomatic complexity.
Split the compound `||` context guards into sequential early-return
checks so each missing context throws with a specific error message,
and the "Complex Conditional" smell is removed.
* refactor(block): further reduce RTE copyToClipboard complexity
Consolidate three sequential `await getContext(...)` calls into a single
`Promise.all`, dropping the cyclomatic complexity below CodeScene's
threshold of 9.
* refactor(block): extract RTE clipboard write into helper method
Split the post-guard write phase into `#writeClipboardEntry` to bring
both methods well under CodeScene's cyclomatic complexity threshold.
* clean up action
Co-authored-by: Copilot <copilot@github.com>
* show edit content / settings despite read-only state
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
* Use InvariantCulture when parsing node paths.
* Add suggested validation of setup to integration test.
* Add more explicit tests for negative sign handling
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Prevent creation of redirects when the old route is unroutable.
* Addressed code review feedback.
* Extend fix to handle case where a second, child page is "redirected" after preview was left open.
(cherry picked from commit 728789aaf6)
* Ensure published querying parity between V13 and V17
* Add unit tests for published ancestor path querying
* Fix Claude review comments
* Make Unfiltered() public on the interface
* Explicitly evaluate "unfiltered" items
* A little clean-up
* Add integration tests
* Addressed code review feedback.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Prevent creation of redirects when the old route is unroutable.
* Addressed code review feedback.
* Extend fix to handle case where a second, child page is "redirected" after preview was left open.
* Extends `UmbContentRollbackModalValue` with `UmbEntityModel`
so that the Rollback modal can return the entity-type,
to display the correct notification message.
* Housekeeping
* Added localized fallback key
* Fixed typecasting issue for deprecated Document rollback
* Reverted logic, introduced `rollbackNotificationMessage` meta prop
* Added constant variables for audit trail
* Added ui helper for audit trail
* Added tests for audit trails in content
* Added test for audit trail when trash content
* Added tests for audit trail when sort. move and rollback content
* Added tests for audit trail when bulk actions
* Updated tests for creating content
* Fixed comment
* bug(#22607) Add Directory.Packages.props and update restore command
Updated Dockerfile to include Directory.Packages.props and modified restore command to resolve docker build errors during dotnet restore step. Resolves issue #22607
* fix(template): conditionally copy Directory.Packages.props in Dockerfile
Only copy Directory.Packages.props when CPM is enabled, as per-project
package management users won't have this file in their build context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit df3cd50e7f)
* Generate random guid for cert pass
* Changes from review
* Move cert generation and add script to trust cert on host machine
* Generate simple hmac key
(cherry picked from commit fcf5af3d16)
* bug(#22607) Add Directory.Packages.props and update restore command
Updated Dockerfile to include Directory.Packages.props and modified restore command to resolve docker build errors during dotnet restore step. Resolves issue #22607
* fix(template): conditionally copy Directory.Packages.props in Dockerfile
Only copy Directory.Packages.props when CPM is enabled, as per-project
package management users won't have this file in their build context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* add redirect tracking workspace
* change weight to match v13 order
* add missing alignment and text colour
* Align closer with referency by element
* Ad repository pattern from review
* remove obsolete
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/redirect-management/info-app/document-redirect-management-workspace-info-app.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds JSDocs
* Removed unused `created` and `documentUnique` from `UmbDocumentRedirectUrlModel`
* Align `setStatus` and `delete` return shape with other data source methods
* Align workspace context observer with sibling info-app pattern
* Polish dashboard and info-app: localize hardcoded strings, tidy templates and imports
* Apply review simplifications
- Drop duplicate `unique` guards from data source (kept at repository boundary)
- Drop unnecessary `?? []` fallbacks (`items` is non-nullable in the API type)
- Localize hardcoded zero-results strings in dashboard
- Simplify redundant length check in info-app `#getTargetUrl`
- Drop unused `userIsAdmin` from `UmbDocumentRedirectStatusModel`
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Mark RTE as supports read only
* RTE: Address read-only review feedback
- Remove `pointer-events: none` from `:host([readonly])` so users can select and copy text in read-only mode
- Make the editor's editable state reactive to the `readonly` property via `setEditable`
- Skip rendering the statusbar in read-only mode (mirrors the toolbar) to avoid the missing border-radius regression
- Remove the now-unused `readonly` property from `umb-tiptap-toolbar` and `umb-tiptap-statusbar`
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* init current user workspace
* adding current user workspace and their apis
* add new controllers
* add default implementation
* Update src/Umbraco.Core/Services/UserService.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Cms.Api.Management/ViewModels/User/UpdateCurrentUserRequestModel.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update tests/Umbraco.Tests.Integration/Umbraco.Core/Services/UserServiceCrudTests.Update.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Core/Models/CurrentUserUpdateModel.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* update openApi.json, remove userKey from model, remove redundant authentication check from controllers
* update localize
* allow blob: URLs in img-src CSP for avatar
* save image change later
* Remove references to "current" user from service layer.
Align validation for user profile update with update user service method.
Controller tidy-up of dependencies.
* Add missing controller from last commit.
* resolve conflicts 2
* Renamed/relocated "current-user-workspace" to "profile/edit"
Refactored the "Edit" (profile) button logic,
to handle the check whether the user has access to the Users section.
* Removed the "Section User No Permission" condition
as no longer used.
* UI tweaks + streamlining
* Profile edit: surface save errors and avoid blob URL leak
- Show danger notification when avatar upload/delete or profile update fails
- Refresh current user after avatar upload so the store holds server URLs, not a leaking local blob
- Element save() methods now return boolean; modal keeps itself open when a save fails and no longer double-submits
* Refactored to use `asPromise()`
* Current User: Adapt edit-profile modal into a workspace extension
Replaces Umb.Modal.CurrentUserEditProfile with a workspace registered
against entityType 'current-user'. The UmbSubmittableWorkspaceContextBase
subclass owns the editable user model and pending avatar state; submit()
coordinates uploadAvatar / deleteAvatar / updateProfile and throws on
failure so the workspace stays open, relying on the repository's existing
danger notifications.
The current-user "Edit" action now opens UMB_WORKSPACE_MODAL (sidebar,
small) instead of the bespoke modal. Avatar and settings children become
presentational views wired to the workspace context.
* Current User workspace: Address review findings
- Await initial load promise in submit() to prevent a race where the save
action fires before the first requestCurrentUser() resolves.
- Guard the avatar element's async observer setup against post-disconnect
attachment.
- Document the split between #data (editable persisted state) and
#pendingAvatar (transient UI state) in the workspace context.
- Remove stray JSDoc whitespace in current-user.server.data-source.ts.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* fix raw sql with ISqlSyntaxProvider name escaping
* reduce hard coded strings
* Fix Raw Sql in MemberFilterRepository
* fix formating
* restore MemberFilterRepository
* Correct usage of field name constant.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix raw sql with ISqlSyntaxProvider name escaping
* reduce hard coded strings
* Fix Raw Sql in MemberFilterRepository
* fix formating
* restore MemberFilterRepository
* Correct usage of field name constant.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Prevent Concurrent_Save_Same_Login_Should_Not_Throw_Duplicate_Key_Exception from failing when exceptions other than what is being guarded against are triggered.
* Addressed code review feedback.
* Generate random guid for cert pass
* Changes from review
* Move cert generation and add script to trust cert on host machine
* Generate simple hmac key
* Add table collection view and manifests
* Use table kind in collection example
* Update entity-name-table-column-layout.element.ts
* Recompute table rows when item hrefs change
* define and render columns from manifest
* wip language implementation
* map to unique field
* rename to label
* test implementation for users table
* clean up
* add example entity actions
* add example description
* Update table-collection-view.element.ts
* Omit base 'meta' and relax table meta type
* Hardcode description column when present
* localize column names
* Update table-collection-view.element.ts
* Type manifest on collection view elements
* Use UmbLitElement instead of LitElement
* fix types
* Update entity-name-table-column-layout.element.ts
* provide entity context for each table row
* fix breaking change and introduce a deprecation warning
* Add status column to example collection view + localize column labels
* implement the UmbTableColumnLayoutElement interface
* add tests for the table collection view
* Make host element optional; add table docs/types
* Update controller-host.mixin.ts
* Update src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update controller-host.mixin.ts
* Update entity-name-table-column-layout.element.ts
* Update entity-actions-table-column-view.element.ts
* Handle undefined row element in table rendering
Allow onRowRendered to accept an undefined element and clean up row contexts when a row is unmounted. Update the callback signature in table.element.ts and handle the undefined case in table-collection-view.element.ts by destroying the host and removing the stored context for the item to avoid memory leaks when rows are removed.
* Update controller-host.mixin.ts
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Align GUID-via-UDI and integer locallink sources in migration to consistent type attribute casing.
* Handle Pascal cased type attributes from local links.
* Preserve segment-specific property values after save and publish.
* Addressed feedback from code review.
* Moved fix to a projection in UmbPropertyValuePresetVariantBuilderController.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Preserve segment-specific property values after save and publish.
* Addressed feedback from code review.
* Moved fix to a projection in UmbPropertyValuePresetVariantBuilderController.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Add XML header comments and unit tests for member operation surface controllers.
* Addressed code review feedback.
* Further code review feedback.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Add a constant for the "unroutable content" route
* Add one more constant for URL provider exceptions
* Update src/Umbraco.Core/Routing/UrlProviderExtensions.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Core/Constants-Routing.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Core/DeliveryApi/ApiContentRouteBuilder.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Definition and validation of minimum range for slide property editor.
* Address code review feedback.
* Treat an incorrectly configured negative minimum range as zero.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Ensure that DocumentUrlService and DocumentUrlAliasService will respect read-only, subscriber databases.
* Fixed breaking change in constructor.
* Clarified comment.
* Use pattern matching in SkipDatabaseWrites() check.
* Ensure that DocumentUrlService and DocumentUrlAliasService will respect read-only, subscriber databases.
* Fixed breaking change in constructor.
* Clarified comment.
* Use pattern matching in SkipDatabaseWrites() check.
* fix(frontend): use keyed repeat for umb-table columns to fix Firefox rendering (#22411)
Column rendering used .map() without keys, causing Firefox's CSS
table-* layout to break when columns changed after initial render.
Switch to repeat() with column.alias keys so Lit properly inserts/removes
DOM nodes. Also removes a stray </uui-table-cell> closing tag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(frontend): wrap umb-table in Lit `keyed` so Firefox rebuilds the table when columns change
The `repeat()` + alias key change alone did not fix the Firefox issue: Firefox's
`display: table-*` layout engine fails to relayout when cells are inserted into
existing rows, even when Lit's keyed reconciliation does the right thing.
Wrap the `<uui-table>` render in `keyed(columnKey, ...)` so that whenever the
column set changes (keyed on the joined column aliases), Lit discards the entire
subtree and builds a fresh one. Firefox then paints a brand-new table and its
buggy incremental relayout path never runs.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs(frontend): document UmbTableColumn.alias uniqueness constraint
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(frontend): reattach sorter on column rebuild and harden column key
Address two review comments on the keyed() rebuild:
- UmbSorterController caches its container element on first
initialization, so when keyed() replaces <uui-table> the sorter stays
attached to the detached node. Toggle disable()/enable() in updated()
when the column signature changes and the table is sortable, so the
sorter reattaches to the fresh table.
- Build the column key via JSON.stringify instead of a pipe-joined
string, so aliases containing '|' can't collide and defeat the rebuild.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Content: Clear per-culture published flags when copying a document (closes#22540)
When copying a published culture-variant document, the document-level
published flag was cleared on the copy, but the per-culture published
info (mapped to umbracoDocumentCultureVariation.published) was carried
over from the source. This left the database in an inconsistent state
where the document was unpublished overall but each culture row
reported published=1.
Clear PublishCultureInfos on both the root copy and its descendants
alongside the existing Published=false assignment so no culture
variations are persisted as published on the copy.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Address review feedback: use ClearPublishInfos() helper + add recursive test
- Replace direct property assignment with the existing ClearPublishInfos()
extension method for semantic clarity and consistency with UnpublishCulture.
- Rename test to match the Can_Copy_* convention used by neighbouring tests.
- Add a second test that exercises the recursive descendant path, confirming
per-culture published flags are also cleared on descendants.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* Updates integration tests to explicitly verify the fix.
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix: prevent open redirect in public surface controllers by validating RedirectUrl with Url.IsLocalUrl
* Update src/Umbraco.Web.Website/Controllers/UmbLoginStatusController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Web.Website/Controllers/UmbProfileController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Web.Website/Controllers/UmbRegisterController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Correct logging and swallowing of exceptions when retrieving references with changed property types.
* Addressed code review feedback.
* Change multi URL picker to fall back to returning an empty collection if the links JSON could not be deserialised.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Defensively handle case where published status in databse is corrupt.
* Addressed code review feedback.
* Further code review feedback.
* Similar fix for NRE in rebuild of document URLs.
* Add option for rebuild following content type update in the background.
* Add integration test for deferred rebuild.
* Addressed code review feedback.
* add retry and graceful shutdown to deferred cache rebuild.
* Prevent shared DB connection in deferred rebuild background task.
* Move deferred rebuild trigger to post-scope notification.
* Introduce similar deferred behaviour for Examine reindexing.
* Prevent background cache rebuild from blocking foreground content saves.
* Handle potential case of primary key constraint violation when deferred rebuilding content cache and a content item is saved.
* Improved variable naming.
* Add migration to fix data type storage for labels configured with a long string value type.
* Fixed class name and added additional test from code review feedback.
* Further code review feedback.
* Add further test.
* Support separate database DbContexts in AddUmbracoDbContext.
* update internal callers to use new non-obsolete AddUmbracoDbContext overload
- UmbracoEFCoreComposer now calls the new overload with explicit shareUmbracoConnection: true
- Add #pragma CS0618 suppression for v18-obsolete overloads delegating to v19-obsolete overloads
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update further internal caller to use non-obsolete method.
* Addressed code review feedback.
* Updates after merge/final local review.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Optimize ContentTypeRepository to avoid unnecessary deep-cloning on cache reads.
* Used lightweight benchmark and addressed code review comments.
* Optimize TemplateRepository to avoid unnecessary deep-cloning on cache reads.
* Optimize DomainRepository to avoid unnecessary deep-cloning on cache reads.
* Optimize remaining repositories to avoid unnecessary deep-cloning on cache reads.
* Present dialog for further action after creating an API user.
* Addressed code review feedback.
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
The allowlist referenced mcp__github__create_issue_comment, which
doesn't exist in github-mcp-server v0.17.1 (the tool is
add_issue_comment). Claude's attempts to comment were denied, so
duplicates were labelled but no explanation comment was posted.
Also adds a workflow_dispatch trigger with an issue_number input and
enables show_full_output so future denials are visible in logs.
* eslint rule for Manifest Aliases
* update to handle propertyEditorSchema aliases
* make typescript check
* support localization alias
* Make consts for theme manifests
* no rules for themes
* fix not used, double media-type-root manifest, clean up.
* Improve pascal cases test
* Models, service, repository and migration for external members.
* Integrate identity for external members in MemberUserStore.
* When autolinking external member, skip member type.
* Populate profile.
* Revoke member tokens for delivery API for external members.
* Audit notification handling.
* Management API updates for external members.
* Added IMemberFilterService for combined member queries from management API.
* Referenced by member controller with external members.
* Guard password reset for external members.
* Remove ExternalMemberSettings.
* Convert between content and external members.
* Fixed ambiguous constructor.
* Update OpenApi.json.
* Update client SDK.
* Backoffice ui for external members.
* Refactor member collection retrievel to use presentation factory.
Fixes in testing.
* Fixes from testing.
* Fix icon display on member picker.
* Add external member support to member picker value converter.
* Delete fix, sync data fix, Examine indexing, member collection default icon.
* Add cache refreshers for external members.
* Remove unused "fast path" for just updating login properties.
* Addresed code review feedback.
* Further integration tests.
* Fixed failing unit test.
* Update typed client.
* Addressed code review feedback.
* Early return to reduce nesting in ReferencedByMemberController.
* Introduce MemberPresentationService and MemberReferenceService to move logic out of controllers.
* Test for and fix SQLite deadlock related to cross-store uniqueness checks.
* Additional fix for the "content" member creation.
* Defer external member Examine indexing via the background task queue.
* Add update date to external member record (aligning with content members).
* Add TreatLoginAsMemberUpdate config so member re-index can be skipped on login.
* Add logging to help verify the indexing path chosen on login and register.
* Move ExternalMemberService into Core to align with MemberService.
* Fix deserialization issue with Json payloads.
* Display of external member profile data in backoffice.
* Fixed breaking change.
* Consider existing behaviour of bumping update date on login to be a bug, so no need for configuration and backward compatibility efforts.
* Reduce user start node tree filtering code duplication
Extract shared start node filtering logic from UserStartNodeTreeControllerBase
into a dedicated service hierarchy (IUserStartNodeTreeFilterService and
domain-specific implementations for documents and media).
Existing constructor signatures and protected members are preserved as
obsolete to maintain backward compatibility for external consumers.
* Disambiguate DI constructor resolution for tree controllers
Adds obsolete constructors accepting both the legacy dependencies and the new IDocument/IMediaStartNodeTreeFilterService to the eight concrete tree controllers and to MediaTreeControllerBase. These serve as a superset constructor that lets the DI container unambiguously resolve a single constructor, since the new and existing obsolete constructors have non-subset parameter sets and [ActivatorUtilitiesConstructor] is not honoured by CallSiteFactory at ServiceProvider validation time.
* Address review feedback
- Change constructors on DocumentStartNodeTreeFilterService and
MediaStartNodeTreeFilterService from public to internal (classes are
already internal).
- Add [EditorBrowsable(Never)] to the disambiguation constructors so
IDEs hide them from autocomplete.
- Add inline comments explaining the empty-array fallback in the
obsolete GetUserStartNodeIds/GetUserStartNodePaths overrides.
* Revert filter service constructors to public
DI container requires public constructors for activation, even on
internal classes. Reverts the internal change from the previous commit.
* Add unit tests for UserStartNodeTreeFilterService
Tests ShouldBypassStartNodeFiltering (root access, data type ignore,
no access), MapWithAccessFiltering (access/no-access/missing entities),
and delegation to IUserStartNodeEntitiesService for root, child and
sibling filtering including mixed access scenarios.
* Simplify obsolete-ctor path on document and media tree controllers (#22546)
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Removed line clamp for data type picker
* Removed line clamp on additional labels
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* add users section into user group
* fix test failed
* fix unchange issue
* add notification
* add remainging count
* update take 100
* split user list into separate element
* add localization for text
* add repository for user list in user group
* update key message
* remove remainingCount from user-input
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added early steps of member auth
* Cleaned up
* Cleaned up again
* Cleaned up
* Fixes based on comments
* Updated name of helper
* Reverted to old smokeTest command
* Emit relation saved and deleted notification when automatic relations are added and removed during content updates.
* Addressed code review feedback.
* swapping from column to row
* adds same look for when you upload image on a content node
* Remove duplicated css property
---------
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Avoid requirement for IBackOfficeStore registrations for non-backoffice configured setups.
* Apply same update to other read method potentially called from non backoffice setups.
* Remove comment.
* Preserve GetUserById upgrade fallback; strengthen test assertions
- Add IRuntimeState to UserService and mirror the DbException catch
from BackOfficeUserStore.GetAsync(int) in GetUserById, so the
upgrade-time fallback to GetForUpgrade is preserved.
- Use non-empty arguments in the delivery-only integration test so
the repository-backed code paths are actually exercised, not just
the early-return guards.
- Update UserServiceCrudTests to pass IRuntimeState to the new
constructor parameter.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Introduce IBackOfficeUserReader to avoid code duplication for user read methods between UserService and BackOfficeUserStore.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix branch authorization from requiring recycle bin permission.
* Use named parameters.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* fix(api): resolve correct old version on upgrade screen (closes#20980)
The upgrade screen always showed the first version of the current major
(e.g. 17.0.0) regardless of the actual database state. This was because
UpgradeSettingsFactory constructed OldVersion from just the running
app's major version number.
The fix adds UmbracoPlan.GetVersionForState() which walks the migration
transition chain and extracts version numbers from migration type
namespaces (V_{major}_{minor}_{patch} convention). RuntimeState calls
this during startup and exposes the result via a new
IRuntimeState.CurrentMigrationVersion property (with a default null
implementation to avoid breaking changes). UpgradeSettingsFactory uses
this resolved version with a fallback to the previous behaviour.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(api): return 9.4.0 for InitialState in GetVersionForState
InitialState is the final migration state of 9.4 (the lowest supported
upgrade). Returning null caused the fallback to show <major>.0.0 for
databases at that state. Now correctly resolves to 9.4.0.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* chore(infrastructure): add TODO (V18) to update initialVersion when InitialState changes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Added TODO for 18.
* Addressed code review feedback.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Allow packages and hosted services to set an ambient backoffice identity via AsyncLocal for scenarios where no HttpContext is available.
* Addressed code review feedback.
* Avoid allocating a string if _publishedContentCache has a cached version & removed preview param, it was always false
* Clarified comment, used GetCacheKey method from location where string was being created.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Use GeneratedRegex instead of generating at runtime
* Add unit tests to verify refactored code.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* update npm dependencies for v17.4.0 minor release
* update dependencies package
* fix lint errors
* remove Dribbble from lucide to simple icons
* revert @hey-api/openapi-ts bump
* chore: regenerate sdk.gen.ts
* chore: regenerate msw sw
* chore: regenerate icons
* build: excludes "mocks/tools" from being compiled
it is an isolated project and so can be used independent of the backoffice
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Propagate tree context's additional request args to tree item children, ensuring tree item children respect the "ignore user start nodes" data type setting for content pickers.
* Add unit tests for additional request args forwarding to tree item children manager.
Covers requestCollection with shape validation and pagination behaviour
(take, skip, consistent total) using the kitchen sink mock set.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers createScaffold, requestByUnique, create, save, and delete using
the kitchen sink mock set and MSW-intercepted webhook endpoints.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Uses the kitchen sink mock set to test requestItems and items against
the MSW-intercepted webhook item endpoint.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* extend icons with information from theseaurus
* implement new icon search logic
* clean-up data
* sorting with a backup of the name
* refactor into a controller
* improve multi word group search
* embed lucide data
* rename tech into technology
* remove paper from dollar
* upgrade msw, migrate all interceptors, and update backoffice integration
* Fix msw test runner integration
* wip mock sets
* align news mock data
* clean up
* add interface for mock sets
* Refactor mock DBs to use dataSet directly
* export as data
* align exports
* Update index.ts
* simplify
* remove createTemplateScaffold from data set
* remove getGroupByName from mock set
* remove getGroupWithResultsByName from mock set
* remove getIndexByName from mock set
* remove unused getSearchResultsMockData function
* Add kenn mock data set with SQLite transformation scripts
Introduces a new "kenn" mock data set generated from an Umbraco SQLite database export.
Transformation scripts (devops/sqlite-to-mock/):
- Database connection helper using sql.js
- Transform scripts for data-types, document-types, media-types, documents, media, users, templates, languages, and dictionary
Generated kenn data set includes:
- 156 data types
- 48 document types with properties, containers, and compositions
- 11 media types
- 41 documents with property values and variants
- 75 media items
- 4 users and 6 user groups
- 10 templates, 2 languages, 5 dictionary items
Usage: VITE_MOCK_SET=kenn npm run dev
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix Tab/Group container type mapping in document types
The PropertyGroupType enum in Umbraco.Core defines:
- Group = 0
- Tab = 1
The transformer had this inverted. Fixed the mapping and regenerated
document-type.data.ts with correct container types.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix user group fallbackPermissions in transformer
Read permissions from umbracoUserGroup2Permission table instead of
the empty userGroupDefaultPermissions column. Also handles mapping
legacy single-letter permission codes to new Umb.Document.* format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove deprecated createTemplateScaffold from template transformer
This function was removed from the UmbMockDataSet interface.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Move sqlite-to-mock script to main package.json
Consolidate the SQLite transformation tooling into the main package by:
- Adding sql.js, @types/sql.js, and tsx as devDependencies
- Adding sqlite-to-mock script that runs transformations and lints output
- Removing the separate devops/sqlite-to-mock/package.json and lock file
This allows the transformation scripts to reuse the main node_modules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* add url manager and url handlers
* Add CLI parameters to sqlite-to-mock script
The script now requires db-path and set-alias arguments:
npm run sqlite-to-mock -- <db-path> <set-alias>
Changes:
- Add configure(), getDatabase(), getOutputDir(), closeDatabase() for lazy init
- Add CLI argument parsing with validation
- Remove direct execution calls from transform scripts
- Move eslint formatting into the script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Generate complete mock data sets and auto-discover sets
- Add generate-supporting-files.ts to create index.ts and all
placeholder/static files needed for a complete mock data set
- Use import.meta.glob for dynamic mock set discovery instead
of hardcoded switch statement
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add mock handler for document type configuration
Introduces a new mock handler to serve document type configuration data, updates the mock database to provide configuration, and integrates the handler into the document type mock handlers.
* make all mock data optional
* Add custom service worker to bypass static asset requests
Introduces umbServiceWorker.js to intercept and bypass static asset requests before reaching MSW, improving startup performance in Vite development.
* fix type errors
* Update template-query.manager.ts
* change to runtime load of mock data
* Update package-lock.json
* wip mock set switcher
* Use umbMockManager.availableSetNames in mock header
* remove the test set
* clean up
* move mock files to the client project root
* rename folder
* move sqllite tool into mocks folder
* clean up
* rename folder
* update the correct tsconfig file
* Update README.md
* fix path
* mock search
* add mocks for tree siblings endpoint
* add mocks for document type and media type allowed parents
* split user permissions mock data into its own mock set
* Initialize localization registry in date test
* don't use consts. Inits too much from the modules
* Update property-editor-ui-user-picker.test.ts
* Update property-value-cloner-block-grid.cloner.test.ts
* add custom permission
* make test check for custom permission in specific mock set
* use specific mock set with specific user id
* Update document-user-permission.condition.test.ts
* Update section-user-permission.condition.test.ts
* add mock manager util to internal utils
* add import map to test runner
* Move mock-data-set.types and update imports
* Exclude internal consts in export test
* Rename mock key to userPermissions
* Register mock manifests only in development
* manual merge
* Add labels and alias/label list for mock sets
* Add visibility flag for mock sets
* delete kenn mock set
* Update mock-manager.ts
* fix(mocks): correct document type composition generation in sqlite-to-mock
The compositions were reversed - grouped by parentContentTypeId instead
of childContentTypeId. In cmsContentType2ContentType, the parent is the
composed type and the child is the type using it. Also adds inheritance
vs composition detection based on umbracoNode parentId matching.
* Update src/Umbraco.Web.UI.Client/mocks/msw-handlers/member-type/structure.handlers.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/tools/sqlite-to-mock/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/db/template-detail.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix mock DB slice and add safety checks
* Adds "Kitchen Sink" mock data set
* Updates to sqlite-to-mock tool
* Default mock data set tweaks
Replaces "loremflickr.com" images with local placeholders
* "Kitchen Sink" mock data updates
* feat(mocks): add member support to sqlite-to-mock tool
Add transformers for members, member types, and member groups to replace
the empty placeholder arrays. Queries cmsMember, cmsMemberType, and
cmsMember2MemberGroup tables for auth data, property visibility, and
group relationships.
* Updated "Kitchen Sink" mock data with Members
* fix(mocks): type rawData in composition-mapped files to avoid never[] inference
When all compositions arrays are empty, TypeScript infers the element
type as never, causing a type error on the .map() callback. Adding an
explicit type annotation for rawData resolves this. Also fixed in both
generators so future runs produce correctly typed output.
* feat(mocks): implement imaging resize URLs handler
Extract the umbracoFile src from media items and build resize URLs with
width, height, mode, and format query parameters. Replaces the empty
urlInfos placeholder.
* Updated placeholder images
* fix(mocks): return actual media file URLs and add missing folders endpoint
The /media/urls handler was returning ancestor-based slug paths instead
of the umbracoFile source path, causing the image cropper modal to
render a generic file preview instead of an image preview.
Also adds the missing /item/media-type/folders handler that was causing
a crash when opening the media picker.
* fix(mocks): parse JSON values stored in varcharValue column
Short JSON values like Color Picker data are stored in varcharValue
rather than textValue in SQLite. The transformers only attempted
JSON.parse on textValue, leaving varcharValue as raw strings. Now also
parses varcharValue when it starts with { or [.
Also fixes the kitchen-sink Color Picker mock data to use parsed objects.
* fix(mocks): add missing document audit log handler
Adds a handler for GET /document/{id}/audit-log that returns the shared
audit log data from the mock data set. Prevents crash in the document
workspace info view history component.
* Mock data tweaks
* move logic from msw handlers to mock services
* remove debugger
* introduce an audit log db class
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* adds same drag styling as when dragging item in the content sectin
* remove unused loader css
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Pass `github_token` and set `allowed_non_write_users: "*"` so the action
bypasses the OIDC actor check, which rejects non-maintainers with
"User does not have write access on this repository". Safe here because
`permissions:` and `--allowedTools` are tightly scoped to issue ops.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* upgrade msw, migrate all interceptors, and update backoffice integration
* Fix msw test runner integration
* wip mock sets
* align news mock data
* clean up
* add interface for mock sets
* Refactor mock DBs to use dataSet directly
* export as data
* align exports
* Update index.ts
* simplify
* remove createTemplateScaffold from data set
* remove getGroupByName from mock set
* remove getGroupWithResultsByName from mock set
* remove getIndexByName from mock set
* remove unused getSearchResultsMockData function
* Add kenn mock data set with SQLite transformation scripts
Introduces a new "kenn" mock data set generated from an Umbraco SQLite database export.
Transformation scripts (devops/sqlite-to-mock/):
- Database connection helper using sql.js
- Transform scripts for data-types, document-types, media-types, documents, media, users, templates, languages, and dictionary
Generated kenn data set includes:
- 156 data types
- 48 document types with properties, containers, and compositions
- 11 media types
- 41 documents with property values and variants
- 75 media items
- 4 users and 6 user groups
- 10 templates, 2 languages, 5 dictionary items
Usage: VITE_MOCK_SET=kenn npm run dev
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix Tab/Group container type mapping in document types
The PropertyGroupType enum in Umbraco.Core defines:
- Group = 0
- Tab = 1
The transformer had this inverted. Fixed the mapping and regenerated
document-type.data.ts with correct container types.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix user group fallbackPermissions in transformer
Read permissions from umbracoUserGroup2Permission table instead of
the empty userGroupDefaultPermissions column. Also handles mapping
legacy single-letter permission codes to new Umb.Document.* format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove deprecated createTemplateScaffold from template transformer
This function was removed from the UmbMockDataSet interface.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Move sqlite-to-mock script to main package.json
Consolidate the SQLite transformation tooling into the main package by:
- Adding sql.js, @types/sql.js, and tsx as devDependencies
- Adding sqlite-to-mock script that runs transformations and lints output
- Removing the separate devops/sqlite-to-mock/package.json and lock file
This allows the transformation scripts to reuse the main node_modules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* add url manager and url handlers
* Add CLI parameters to sqlite-to-mock script
The script now requires db-path and set-alias arguments:
npm run sqlite-to-mock -- <db-path> <set-alias>
Changes:
- Add configure(), getDatabase(), getOutputDir(), closeDatabase() for lazy init
- Add CLI argument parsing with validation
- Remove direct execution calls from transform scripts
- Move eslint formatting into the script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Generate complete mock data sets and auto-discover sets
- Add generate-supporting-files.ts to create index.ts and all
placeholder/static files needed for a complete mock data set
- Use import.meta.glob for dynamic mock set discovery instead
of hardcoded switch statement
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add mock handler for document type configuration
Introduces a new mock handler to serve document type configuration data, updates the mock database to provide configuration, and integrates the handler into the document type mock handlers.
* make all mock data optional
* Add custom service worker to bypass static asset requests
Introduces umbServiceWorker.js to intercept and bypass static asset requests before reaching MSW, improving startup performance in Vite development.
* fix type errors
* Update template-query.manager.ts
* change to runtime load of mock data
* Update package-lock.json
* wip mock set switcher
* Use umbMockManager.availableSetNames in mock header
* remove the test set
* clean up
* move mock files to the client project root
* rename folder
* move sqllite tool into mocks folder
* clean up
* rename folder
* update the correct tsconfig file
* Update README.md
* fix path
* mock search
* add mocks for tree siblings endpoint
* add mocks for document type and media type allowed parents
* split user permissions mock data into its own mock set
* Initialize localization registry in date test
* don't use consts. Inits too much from the modules
* Update property-editor-ui-user-picker.test.ts
* Update property-value-cloner-block-grid.cloner.test.ts
* add custom permission
* make test check for custom permission in specific mock set
* use specific mock set with specific user id
* Update document-user-permission.condition.test.ts
* Update section-user-permission.condition.test.ts
* add mock manager util to internal utils
* add import map to test runner
* Move mock-data-set.types and update imports
* Exclude internal consts in export test
* Rename mock key to userPermissions
* Register mock manifests only in development
* manual merge
* Add labels and alias/label list for mock sets
* Add visibility flag for mock sets
* delete kenn mock set
* Update mock-manager.ts
* fix(mocks): correct document type composition generation in sqlite-to-mock
The compositions were reversed - grouped by parentContentTypeId instead
of childContentTypeId. In cmsContentType2ContentType, the parent is the
composed type and the child is the type using it. Also adds inheritance
vs composition detection based on umbracoNode parentId matching.
* Update src/Umbraco.Web.UI.Client/mocks/msw-handlers/member-type/structure.handlers.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/tools/sqlite-to-mock/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/db/template-detail.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix mock DB slice and add safety checks
* webhook mock plan
* init webhook mock set + handlers
* Adds "Kitchen Sink" mock data set
* Updates to sqlite-to-mock tool
* Default mock data set tweaks
Replaces "loremflickr.com" images with local placeholders
* "Kitchen Sink" mock data updates
* Add paginated list and remove collection handler
* feat(mocks): add member support to sqlite-to-mock tool
Add transformers for members, member types, and member groups to replace
the empty placeholder arrays. Queries cmsMember, cmsMemberType, and
cmsMember2MemberGroup tables for auth data, property visibility, and
group relationships.
* Updated "Kitchen Sink" mock data with Members
* fix(mocks): type rawData in composition-mapped files to avoid never[] inference
When all compositions arrays are empty, TypeScript infers the element
type as never, causing a type error on the .map() callback. Adding an
explicit type annotation for rawData resolves this. Also fixed in both
generators so future runs produce correctly typed output.
* Add webhook delivery mock data and handlers
* Add webhook event mock data and handlers
* include webhooks in kitchen sink data set
* Add flags to webhook mock; fix item response
* Support pagination in webhook events handler
* Update src/Umbraco.Web.UI.Client/mocks/db/webhook-delivery.db.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update detail.handlers.ts
* Map webhook event aliases to event objects
* remove note about being created from SQL db
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* TipTap: Declare Clear Formatting toolbar button's extension dependencies
* Reworked to have a loose dependency
on the `class` and `style` attribute extensions
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Eliminate closure, fix naming & formatting of exceptions
* Added unit tests around the changed code.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Use configured or detected application URL as request URL fallback in background tasks when constructing absolute URLs.
* Addresed code review feedback.
* upgrade msw, migrate all interceptors, and update backoffice integration
* Fix msw test runner integration
* wip mock sets
* align news mock data
* clean up
* add interface for mock sets
* Refactor mock DBs to use dataSet directly
* export as data
* align exports
* Update index.ts
* simplify
* remove createTemplateScaffold from data set
* remove getGroupByName from mock set
* remove getGroupWithResultsByName from mock set
* remove getIndexByName from mock set
* remove unused getSearchResultsMockData function
* Add kenn mock data set with SQLite transformation scripts
Introduces a new "kenn" mock data set generated from an Umbraco SQLite database export.
Transformation scripts (devops/sqlite-to-mock/):
- Database connection helper using sql.js
- Transform scripts for data-types, document-types, media-types, documents, media, users, templates, languages, and dictionary
Generated kenn data set includes:
- 156 data types
- 48 document types with properties, containers, and compositions
- 11 media types
- 41 documents with property values and variants
- 75 media items
- 4 users and 6 user groups
- 10 templates, 2 languages, 5 dictionary items
Usage: VITE_MOCK_SET=kenn npm run dev
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix Tab/Group container type mapping in document types
The PropertyGroupType enum in Umbraco.Core defines:
- Group = 0
- Tab = 1
The transformer had this inverted. Fixed the mapping and regenerated
document-type.data.ts with correct container types.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix user group fallbackPermissions in transformer
Read permissions from umbracoUserGroup2Permission table instead of
the empty userGroupDefaultPermissions column. Also handles mapping
legacy single-letter permission codes to new Umb.Document.* format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove deprecated createTemplateScaffold from template transformer
This function was removed from the UmbMockDataSet interface.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Move sqlite-to-mock script to main package.json
Consolidate the SQLite transformation tooling into the main package by:
- Adding sql.js, @types/sql.js, and tsx as devDependencies
- Adding sqlite-to-mock script that runs transformations and lints output
- Removing the separate devops/sqlite-to-mock/package.json and lock file
This allows the transformation scripts to reuse the main node_modules.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* add url manager and url handlers
* Add CLI parameters to sqlite-to-mock script
The script now requires db-path and set-alias arguments:
npm run sqlite-to-mock -- <db-path> <set-alias>
Changes:
- Add configure(), getDatabase(), getOutputDir(), closeDatabase() for lazy init
- Add CLI argument parsing with validation
- Remove direct execution calls from transform scripts
- Move eslint formatting into the script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Generate complete mock data sets and auto-discover sets
- Add generate-supporting-files.ts to create index.ts and all
placeholder/static files needed for a complete mock data set
- Use import.meta.glob for dynamic mock set discovery instead
of hardcoded switch statement
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add mock handler for document type configuration
Introduces a new mock handler to serve document type configuration data, updates the mock database to provide configuration, and integrates the handler into the document type mock handlers.
* make all mock data optional
* Add custom service worker to bypass static asset requests
Introduces umbServiceWorker.js to intercept and bypass static asset requests before reaching MSW, improving startup performance in Vite development.
* fix type errors
* Update template-query.manager.ts
* change to runtime load of mock data
* Update package-lock.json
* wip mock set switcher
* Use umbMockManager.availableSetNames in mock header
* remove the test set
* clean up
* move mock files to the client project root
* rename folder
* move sqllite tool into mocks folder
* clean up
* rename folder
* update the correct tsconfig file
* Update README.md
* fix path
* mock search
* add mocks for tree siblings endpoint
* add mocks for document type and media type allowed parents
* split user permissions mock data into its own mock set
* Initialize localization registry in date test
* don't use consts. Inits too much from the modules
* Update property-editor-ui-user-picker.test.ts
* Update property-value-cloner-block-grid.cloner.test.ts
* add custom permission
* make test check for custom permission in specific mock set
* use specific mock set with specific user id
* Update document-user-permission.condition.test.ts
* Update section-user-permission.condition.test.ts
* add mock manager util to internal utils
* add import map to test runner
* Move mock-data-set.types and update imports
* Exclude internal consts in export test
* Rename mock key to userPermissions
* Register mock manifests only in development
* manual merge
* Add labels and alias/label list for mock sets
* Add visibility flag for mock sets
* delete kenn mock set
* Update mock-manager.ts
* fix(mocks): correct document type composition generation in sqlite-to-mock
The compositions were reversed - grouped by parentContentTypeId instead
of childContentTypeId. In cmsContentType2ContentType, the parent is the
composed type and the child is the type using it. Also adds inheritance
vs composition detection based on umbracoNode parentId matching.
* Update src/Umbraco.Web.UI.Client/mocks/msw-handlers/member-type/structure.handlers.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/tools/sqlite-to-mock/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/mocks/db/template-detail.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix mock DB slice and add safety checks
* Adds "Kitchen Sink" mock data set
* Updates to sqlite-to-mock tool
* Default mock data set tweaks
Replaces "loremflickr.com" images with local placeholders
* "Kitchen Sink" mock data updates
* feat(mocks): add member support to sqlite-to-mock tool
Add transformers for members, member types, and member groups to replace
the empty placeholder arrays. Queries cmsMember, cmsMemberType, and
cmsMember2MemberGroup tables for auth data, property visibility, and
group relationships.
* Updated "Kitchen Sink" mock data with Members
* fix(mocks): type rawData in composition-mapped files to avoid never[] inference
When all compositions arrays are empty, TypeScript infers the element
type as never, causing a type error on the .map() callback. Adding an
explicit type annotation for rawData resolves this. Also fixed in both
generators so future runs produce correctly typed output.
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(SqliteSyntaxProvider.cs): parameterises the `tableName` variable when passing into `DoesPrimaryKeyExist` method
* fix(SqlServerSyntaxProvider.cs): parameterises the `tableName` variable when passing into the `DoesPrimaryKeyExist` sql statement
* test(DoesPrimaryKeyExist-test): Add test file for DoesPrimaryKeyExist
Co-authored-by: LLaverty <liamlaverty@gmail.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Align output cache extension points for the delivery API with those for the website.
* Fix issue running output cache on website and delivery API at the same time.
* Updates from testing.
* Align website default implementation with naming used for delivery API equivalents.
* Addressed code review feedback.
* Updates from self-review.
* Allow removal of template on a document, and indicate when the selected template is no longer allowed.
* Addressed code review feedback.
* remove duplicate inline color style on template icon
---------
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Group get all paths to avoid exceeding SQL Server's max parameter count.
* Move GetAllPaths batching tests to dedicated test class
Move the explicit SQL Server parameter limit tests into their own
class (EntityServiceGetAllPathsTests) with NewSchemaPerTest so the
raw SqlException surfaces instead of being masked by scope disposal.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* use currentColor as color fallback
* clean up necessary prop
* Add test color behavior coverage for umb-icon
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
Co-authored-by: engjlr <enl@umbraco.dk>
Fork PRs on the `pull_request` event don't have access to repository
secrets, so the action fails and surfaces a red check on the PR. Guard
the job with a head-repo equality check so the workflow simply doesn't
run for fork PRs. Remove once upstream fork support lands
(anthropics/claude-code-action#939) and `pull_request_target` can be
re-enabled.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pull_request_target fails at OIDC token exchange ("401 Unauthorized -
Invalid OIDC token") against Anthropic's backend, even though the
action itself supports the event (PR #579). Fork PRs will not be
auto-reviewed until the upstream issue is resolved. Kept the
pull_request_target block commented with a pointer to the issues
for when re-enabling becomes viable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Docs require actions:read at the workflow permissions level in addition
to additional_permissions on the action, so Claude's CI-reading MCP
tools can actually function. See anthropics/claude-code-action
docs/configuration.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(core): add member sign-in/sign-out notifications
Add MemberLoginSuccessNotification, MemberLoginFailedNotification,
and MemberLogoutSuccessNotification to achieve parity with the
existing backoffice user authentication notifications.
Override HandleSignIn in MemberSignInManager to publish login
success/failure notifications, and override SignOutAsync to publish
logout notifications. This follows the same pattern used by
BackOfficeSignInManager for backoffice users.
Closes#22461
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* docs(core): add remarks to member auth notification classes
Add <remarks> XML documentation to MemberLoginSuccessNotification,
MemberLoginFailedNotification, and MemberLogoutSuccessNotification
describing intended usage, consistent with the backoffice user
notification equivalents.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat(web): use IIpResolver for member auth notification IP addresses
Use IIpResolver.GetCurrentRequestIpAddress() for consistent IP
resolution in member auth notifications, matching the pattern used
by BackOfficeUserManager.
Introduces IIpResolver as a new constructor parameter with the
existing constructor marked obsolete (removal in Umbraco 19) using
StaticServiceProvider fallback for backwards compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fixed filing unit tests.
* Added tests for new functionality.
* Ensure MemberFailedNotification is fired on invalid credentials as well as member not found.
Add the reason for the failure to the notification.
* Add tests for other failed notification publishing states.
* Clarified comments.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
The client CLAUDE.md's action-to-doc table already maps deprecation
to docs/deprecation.md, and the root's callout directs agents to read
the client CLAUDE.md for backoffice work. Having the pattern in both
places is redundant.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agents working from the repo root now see an explicit instruction to
read the client's CLAUDE.md before touching backoffice code. Prevents
missing project-specific conventions (like UmbDeprecation) that are
documented in the client project but not the root.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Maps specific actions (deprecate, create element, add tests, etc.) to
the docs that MUST be read first. Ensures developers opening only the
client folder see the requirements in their Claude context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The backoffice client requires both @deprecated JSDoc AND a runtime
UmbDeprecation warning for every deprecation. This was documented in
the client's docs/deprecation.md but not referenced in the root
CLAUDE.md, causing AI agents to miss the runtime warning requirement.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Broadens the .claude gitignore to ignore everything except skills/
(committed for CI workflows) and settings.json (shared config).
Previously only settings.local.json was ignored, leaving lock files,
worktrees, and scheduled_tasks artifacts untracked but visible.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Cache: Invalidate published cache entries when content or media is trashed
Trashed content and media were remaining in the published cache because
ContentRefreshNotification/MediaRefreshNotification wrote the trashed
entities back into the cache, and ContentCacheRefresher.HandleMemoryCache
could not resolve the branch descendants after HandleNavigation had moved
them to the recycle bin.
- DocumentCacheService.RefreshContentAsync / MediaCacheService.RefreshMediaAsync:
early-return for trashed entities, deleting from the database cache and
removing from the local memory cache.
- DocumentCacheService.RefreshMemoryCacheAsync / MediaCacheService.RefreshMemoryCacheAsync:
added symmetric else branches so memory cache entries are removed when the
database cache has no corresponding draft or published node (self-healing).
- ContentCacheRefresher.HandleMemoryCache: added a bin fallback to
TryGetDescendantsKeys so broadcasted RefreshBranch payloads can resolve
descendants moved to the recycle bin on load-balanced servers.
- Integration tests covering trashed content and media cache invalidation.
* Cache: Add tests for restoring trashed content and media
Verifies that restored content is back in the draft cache (but not the
published cache, since restore does not republish) and that restored
media is back in the cache.
* Address PR review feedback
- Add bin fallback to MediaCacheRefresher.HandleMemoryCache for
consistency with ContentCacheRefresher.
- Remove redundant [Test] attributes alongside [TestCase].
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Backoffice: Add explicit controller aliases to observe() calls in tree item and default tree elements
Without explicit aliases, observe() falls back to hashing the callback's
source string on every invocation. The api setter on tree-item-element-base
and the #observeData() method on default-tree.element are called each time
the api property changes, making the hash cost and implicit deduplication
behaviour visible in hot render paths.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
pull_request events from forks cannot access OIDC tokens, causing the
job to fail. pull_request_target runs in the base repo context and has
access to secrets/OIDC while still reading the PR diff via the API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Ensure MigrationBase formats Guids consistently with NPoco for SQLite
SQLite is case sensitive and doesn't have the concept of uniqueidentifier - Guids are stored as uppercase strings
Add FormatGuid method to SqlSyntaxProvider to centralize the logic
* (Optional) Include default FormatGuid implementation in ISqlSyntaxProvider to make this change non-breaking
* Use ToUpperInvariant for Guids in SQLite
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Tidy up comments, fix existing indentation and add unit tests for GUID formatting.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Updated tipTapSettings to match the recent changes
* Updated ui helper for insert value/dictionary/partial view button
* Updated api helper for media delivery
* Fixed api helper for verify width and height in vector graphic media
* localize rte block clipboard entry label
* RTE Block Clipboard: reuse existing localization controller
Avoids alias collision from creating a new UmbLocalizationController on
hosts that already have one. Exposes the base class controller as
protected so subclasses can reuse it.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add login for basic authentication without backoffice.
* Add 2FA to basic authentication flow.
* Accessibility improvements.
* Add tests for BasicAuthLoginController.
* Gate controller so only used when basic authentication is enabled.
Use 2FA view even when login page is not configured.
* Add tests for BasicAuthenticationMiddleware.
* Add support for external login providers.
* Addressed code review feedback.
* Applied suggestions from code review.
* Disable and change text on submit button when logging in.
* Add custom view support.
* Configuration for website output cache settings.
* Interfaces and default implementation for extension points.
* Configure the output cache policy.
* Evict cached documents through updates to related documents, media and members.
* Feedback from code review.
* Update description of service registration in IWebsiteOutputCacheDurationProvider header comment.
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* Use output cache over service provider.
* Optimise and DRY-up eviction handlers.
* Only register IWebsiteOutputCacheManager when the feature is enabled.
* Remove unnecessary check on applying output cache to Umbraco pipeline.
* Add extension point for determining if requests should be cached.
* Broken up large method in DocumentOutputCacheEvictionHandler, put enabled checks around debug logging, further unit test.
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* User Service: Prevent fetching all permissions when no IDs are provided
Ensures that the UserService does not attempt to fetch permissions when the provided ID collection is empty, avoiding potentially expensive database queries that could return permissions for all nodes.
* Move guard into the shared private method and add an integration test to verify the fix.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fixes modal text styling in Insert and Sections in Templates
* fixed review issues and added accesability for the cards so you can use keyboard
* fixing formatting changes
* fixed unused css and fixed accessability to match the card select & deselect
* fixed redundant key and click events
* fixed accessability for button and small bug with not being able to click it
* Apply language fallback to block element expose filtering.
* Handle code review feedback.
* Use builder instead of mocks in tests.
* Fixed failing unit tests.
* Revert previous approach and move fallback handling to the block property value creator.
* Include fallback policy in published property cache key
* Recreate block elements with resolved fallback culture.
* Use correct pattern for dispose.
* Introduce and use PropertyRenderingContext.
* Tidy up Fallback.
* Use core extensions for string comparison
* Less allocations
* Avoid fallback handling when no fallback policies are provided
---------
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Reflects the two-workflow split, trigger phrase stripping behavior,
allowed tools, labeling for both PRs and issues, and implementation
gotchas discovered during setup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude couldn't find the PR because checkout is on main and
gh pr view with no args returns nothing. Now the PR number is
injected directly into the prompt from the GitHub event context.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude discovered and invoked the umb-review skill which uses git diff
against origin/main — but checkout is on main so the diff was empty.
Prompt now explicitly says to use gh pr diff, not git diff or skills.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The sandbox blocks multi-command Bash operations without approval.
Allow gh and git commands so Claude can read diffs, post comments,
and apply labels without permission errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The action strips @claude from the comment before passing to Claude,
so commands arrive as just 'review', 'fix', etc. Updated prompt to
match. Also default empty messages to review (PR) or help (issue).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prompt now reads the user's message and acts accordingly instead of
prescribing behavior. Common patterns like review/help/fix/label
are listed as examples.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude was treating @claude review as a greeting instead of acting
on the PR. Made prompt explicit about reviewing immediately.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
With only opened/ready_for_review triggers, volume is low enough to
let Claude run without a turn limit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
25 turns was insufficient — the umb-review skill needs many turns to
read docs, references, changed files, and write the review.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- claude-review.yml: Auto PR review on open/push/ready (no trigger needed)
- claude.yml: Interactive — @claude comments, issue assignment/labeling
Follows anthropics/claude-code-action official examples pattern.
Full Option B gating on the interactive workflow.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Only spin up a runner for issue_comment events that mention @claude.
All other event types pass through to the action for internal filtering.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge auto and on-demand review workflows into claude-review.yml.
Add issue support via assignee_trigger and label_trigger.
Let claude-code-action handle permission gating and trigger matching.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude-code-action gates on write permission by default — the manual
getCollaboratorPermissionLevel check was redundant.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Avoids collision with the claude-code-action bot's own @claude trigger.
Re-enables job-level filter to skip non-matching comments early.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* DevOps: Add Claude automated PR review action (closes #AB66809)
Adds two GitHub Actions workflows that run the umb-review Claude skill on every non-draft PR and on demand via `@claude review` comments. Reviews are advisory-only and post inline comments per finding plus one summary comment per review run.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* DevOps: Disable auto/on-demand triggers for initial testing
Remove pull_request_target trigger from auto workflow (workflow_dispatch only).
Disable on-demand job until auto workflow is validated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* enables task
* adds more categories
* DevOps: Address Copilot review feedback
- Checkout PR head ref (not base) so git diff works correctly
- Use fetch-depth: 0 for triple-dot diff merge base
- Fix SHA dedup: use full SHA and paginate comment listing
- Include 'maintain' permission in on-demand gate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Docs: Document Claude automated PR review workflows in CLAUDE.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
MediaBreadthFirstSeedCount was initialized with StaticDocumentBreadthFirstSeedCount
instead of StaticMediaBreadthFirstSeedCount, mismatching its [DefaultValue] attribute.
* Revert production mode validation for templates and partial views at the service layer, and move to management API.
* Remove unused ConfigureProductionMode helper from PartialViewServiceTests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add integration tests for UpdateTemplateController production mode behavior
Tests verify that the Management API correctly blocks template content
changes while allowing metadata-only updates in production mode.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Restore partial view service checks.
Add integration tests for template controllers with production mode.
* Align delete with create/update for file system changes in production mode.
* Restore partial view service tests.
* Add test for update to delete template repository.
* Refactored to use single test setup method.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Revert production mode validation for templates and partial views at the service layer, and move to management API.
* Remove unused ConfigureProductionMode helper from PartialViewServiceTests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add integration tests for UpdateTemplateController production mode behavior
Tests verify that the Management API correctly blocks template content
changes while allowing metadata-only updates in production mode.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Restore partial view service checks.
Add integration tests for template controllers with production mode.
* Align delete with create/update for file system changes in production mode.
* Restore partial view service tests.
* Add test for update to delete template repository.
* Refactored to use single test setup method.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Exclude invariant culture from culture list endpoint
The Invariant Culture (CultureInfo.InvariantCulture) has an empty Name
property which is not a valid ISO code for Umbraco content. Filter it
out in IsoCodeValidator to prevent it appearing in the culture list.
Fixes#22380
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add unit tests for IsoCodeValidator.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Remove flex-shrink=0 from umb-body-layout
* Avoid collapsing tabs into the dropdown
* Add arrows left and right and bind a scroll
* Add a resizeObserver to keep track when the tabs container change
* Make the sort mode scrollable
* Move the add tab button inside the tabs list container
* Restore tab scrolling and detect hidden overflow
* Create a reusable scrollable container component
* Remove unused import
* Clean up
* Add HTMLElementTagNameMap to the scrollable container
* Always render the add tab button
* Observe slot children on slotchange
* Remove unused variable
* Document patch, variant name only
* Multi variant tests
* Change to json-patch instead of merge to target nested properties
* Fix ManagementApiTest following PR 20820
* Segment suport for properties
* Verify non existing and trashed document patch behaviour
* Mostly working approuch for nested properties
* Fix endpoint route collision (Somehow...)
* Trying a custom way of doing things
* add escape support, more tests and cleanup
* remove unnecesary using
* Cleanup
* Restore things that are breaking
* cleanup
* Namespace cleanup
* Order cleanup
* More comment updates
* Add default implementations
* Improve modelbinding validation
* all string comparison
* Cleanup unused statuses
* Fix PatchPathResolver Filtering not accepting non string values
* Optimize path parsing
* Improve cookie token rework
* more cleanup
* Put AllowedValues on the correct property 🙈
* One more default implementation
* Add link to docs on endpoint swagger info
* PR review corrections
- Removed leftover affectedCultures & affectedSegments
- Extracted IDocumentPatcher interface
- Optimized serialization in patchEngine by moving it 1 level higher
* Update documentation urls
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Removed affected variance tracking that is nog longer being used
* Extract shared data class
* update claude patching namespace
* Remove no longer valid xml comment
* Fix unittests after refactoring patchengine.ApplyOperation(string,...) to patchengine.ApplyOperation(JsonNode,...)
* Refactor base classes
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Optimizations and refactoring of the patcher/engine/parser
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Allows save of a relation type without a child and/or parent object type.
* Addressed code review feedback and code health warnings.
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Updated ui helper for select content card
* Updated ui helper for select media card
* Added ui helper for clear selection button
* Added tests for bulk action in list view content
* Added more tests for clear selection button in list view media
* Make tests run in the pipeline
* Reverted npm command
* Batch thumbnail URL requests to avoid N+1 API calls.
* Handle code review feedback.
* Remove extra newlines.
* chore: formats code
* Use @consumeContext decorator and remove await #init from imaging repository.
Replaces the blocking `await this.#init` pattern with the `@consumeContext`
decorator so the store is consumed opportunistically. This removes the async
gap before batchImagingRequest calls, allowing all thumbnails mounting in the
same Lit render pass to be collected into a single batched API request.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Move imaging URL cache into the request batcher and deprecate UmbImagingStore.
The batcher now owns a module-level URL cache, eliminating the need for the
context-based UmbImagingStore. This removes all context-request events from
the imaging repository and thumbnail hot path. The repository delegates
entirely to the batcher for caching and fetching. UmbMediaDetailRepository
uses the new clearImagingCache() export directly instead of instantiating an
imaging repository. Items with no URL (non-image media) are cached as empty
strings to prevent unnecessary re-fetching.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Remove extra newlines.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Fixes "files/folders/files or folders" selections for the various media picker components, re-allowing folder selection from a media picker.
* Import and use enim instead of hardcoded enum value
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Fixes "files/folders/files or folders" selections for the various media picker components, re-allowing folder selection from a media picker.
* Import and use enim instead of hardcoded enum value
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Show ancestor path in document search results.
* show ancestor breadcrumb path in media search results
* Show the document ancestors name by culture variant
* Extract ancestor fetching to reduce cyclomatic complexity
* Add early return inside #fetchAncestors
* Handle errors from the api call.
* Add fallback title when the name doesn't exist
* Use full item models for search ancestor types
* Batch delete in DocumentUrlRepository and DocumentUrlAliasRepository to avoid exceeding SQL Server's 2100 parameter limit.
* Address code review feedback.
* Remove the unnecessary trigger rebuild on startup statement in the SQL Server migration path.
* Batch delete in DocumentUrlRepository and DocumentUrlAliasRepository to avoid exceeding SQL Server's 2100 parameter limit.
* Address code review feedback.
* Remove the unnecessary trigger rebuild on startup statement in the SQL Server migration path.
* Compute next delay to compensate for time drift
* Addressed case flagged on code review following stopped service.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added instructions for maintaining the `OpenApi.json` file
* Updated client-side instruction docs
for clean code and style guide.
* Updated "Full API surface" point
* Update CLAUDE.md
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Handle invalid redirect routes without slash in GetUrlFromRoute
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Handle fragment-only routes before parsing node id
* Add unit tests verifying the fix (as well as expanding the test coverage of the URL provider in general).
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* feat: surface ProblemDetails detail in error notifications
Pass the ProblemDetails detail field through to error notifications.
Short details (≤250 chars) are shown inline with CSS line-clamp.
Long details (>250 chars) are shown via a "See error" button that
opens the error viewer modal.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address PR review — rename detail/details ambiguity and remove as any cast
Rename local `details` variable to `errors` to avoid confusion with `detail`.
Change UmbErrorViewerModalData to a union type (UmbPeekErrorArgs | string)
matching what the modal actually handles at runtime, eliminating the as any cast.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: tighten types and overload _peekError with UmbPeekErrorArgs
- Document UmbPeekErrorArgs interface and its properties
- Add `errors` property to UmbPeekErrorArgs, deprecate `details`
- New _peekError overload: accepts UmbPeekErrorArgs directly
- Old _peekError overload: positional args, deprecated for removal in v19
- Update notification element and interceptor to use `errors`
- Widen UmbErrorViewerModalData to also accept Record<string, unknown>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: extract duplicate errors fallback to #validationErrors getter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: remove unnecessary null handling in interceptor #peekError
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve tsc errors from type tightening
- UmbErrorViewerModalData: use Record<string, unknown> interface to
satisfy UmbModalToken's object constraint (string not allowed)
- Cast detail string through unknown when opening error viewer
(modal handles strings at runtime, token type doesn't allow it)
- Fix interceptor errors Record to use string[] values
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: resolve eslint errors — unused import, prettier, jsdoc link
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: renames 'See error' button to 'Full Error Message'
* feat: renames Danish button 'Undtagelsesdetaljer' to 'Fejldetaljer'
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add workspaces docs, CLAUDE link, and skill
* Export workspace elements as element
* consolidate information
* adjust skill to make use of generic name component
* try to force the agent to follow docs and use skills
* Update SKILL.md
* clean up create package skill
* use data type package as reference
* add initial repository doc + skill
* Update src/Umbraco.Web.UI.Client/docs/workspaces.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/docs/workspaces.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update workspaces.md
* clean up
* Update SKILL.md
* Delete Repositories.md
* Create repositories.md
* Update repositories.md
* Normalize repositories doc links to lowercase
* Update src/Umbraco.Web.UI.Client/.claude/skills/general-create-repository/SKILL.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix data flow link path casing
* fix casing
* export as api + inline store in manifest
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Prevent Host header poisoning of ApplicationMainUrl.
* Introduce options for Umbraco application URL detection and handle situations where it can be undefined.
* Prevent email operations if the application URL is not detected or configured.
Improve log warnings.
* Addressed feedback from code review.
* Move startup application URL logging to a handler.
* Clean up ambiguous log message
---------
Co-authored-by: kjac <kja@umbraco.dk>
* add info workspace view into document blueprint
* Add history panel
* update document type route
* remove comment
* move time options format to ultils
* add blueprint auditlog model
* save move action and add authorization for audit log request
* add default implement
* update open api json
* Reused the `workspaceInfoApp: auditLog` kind
Added the manifest for the repository.
Removed the duplicated/unused code.
* UI tweaks + linting
* Renamed "Document Blueprint Workspace View Info Element" file/tag
* Restored the "UmbDocumentBlueprintAuditLog" types
* Add JSDoc to document blueprint audit log repository
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Export audit-log module from document-blueprints index
Adds the missing re-export so UMB_DOCUMENT_BLUEPRINT_AUDIT_LOG_REPOSITORY_ALIAS
is reachable from @umbraco-cms/backoffice/document-blueprint.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
* claude review md files
* rename to review
* auto-detect target-branch via GH CLI
* Verify GH CLI is Available
* update table to fit github markdown format
* condensed the output to the essense
* State if the PR is too bad
* using the word `and´
* only relevant suggestions
* clean up
* narrow the scope for large PRs
* diff-first approach with selective reads
* specify that the header_only are amount of file where the only extra loaded is the header
* Complexity detection
* Classification of the PR
* improve other changes
* Ensure Types are kept intact in their type Hierarchy
* align test naming with project, and clean up instructions
* remove hardcoded Claude.md file table for a pattern
* improve skill description
* improved breaking change detection for front-end
* do not suggest breaking changes for PRs targeting main
* rename skill to umb-review
* less nit picky
* first version of skill evals
* Update .claude/skills/umb-review/references/coding-preferences.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update .claude/skills/umb-review/references/impact-analysis.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* remove mentioning the skill action it self
* split out GH CLI guideline
* improve file loading strategy
* make feedback extremely concise
* improve skipped files output
* latests eval
* added further evals
* move summaries into references
* separate Complexity Assessment into a reference file
* Complexity Assessment: secure mixed is still check despite other rules it out
* dont include gen.ts files
* iter 9 evals
* latests eval of 4
* keep only one test for complexity-advisory
* adjusted skill and Evals to match expectations
* improve sibling lookups
* improve skill regarding nit picks and C# patterns
* remove insecure manifest check
* final eval run
* eval grading
* remove review workspace
* remove umb review workspace part 2
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add workspaces docs, CLAUDE link, and skill
* Export workspace elements as element
* consolidate information
* adjust skill to make use of generic name component
* try to force the agent to follow docs and use skills
* Update SKILL.md
* clean up create package skill
* use data type package as reference
* Update src/Umbraco.Web.UI.Client/docs/workspaces.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/docs/workspaces.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update workspaces.md
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Present only changed variants as selected by default when saving and publishing.
* Detect pending changes on document load to ensure language selector variant status reports correctly.
* Avoid concurrent loads.
* Fix issue where with two variants changed but only one saved, both would display with pending changes.
* Addressed code review feedback.
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* TipTap: Add width/height to edit image properties (AB#65981)
Add width and height input fields with aspect-ratio lock toggle to the
media caption/alt-text modal. Thread dimensions through the toolbar
action so existing image dimensions are preserved when editing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* TipTap: Add double-click to open edit modals for images and embeds
Move double-click detection into node extensions via addProseMirrorPlugins
(tiptap-native). Extensions dispatch a generic DOM event, input-tiptap
delegates to the toolbar, and the toolbar executes the active action.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* TipTap: Improve edit image properties, unify embed dimensions, fix figcaption bug (AB#65981)
- Add width/height fields with aspect-ratio lock and maxImageSize cap to image modal
- Unify embed modal dimensions UI with image modal (inline row, lock button, px postfix)
- Fix figcaption cursor bug: editing from inside caption no longer opens new image picker
- Pass user dimensions to imaging endpoint for valid HMAC-signed URLs
- Preview image updates aspect-ratio when dimensions change
- Slim down toolbar API: inline pass-through methods, remove dead code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add missing width: 100% to image modal dimension inputs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use display:block instead of width:100% on dimension inputs
Prevents the right border of the px affix from being clipped.
Applied to both image and embed modals for consistency.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove explicit sizing on dimension inputs, let flex handle it
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use @input instead of @change on embed dimension fields
Aligns with image modal behavior so constrained dimensions update
on keystroke. Preview fetch is debounced at 500ms to avoid spam.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address Copilot review feedback
- Wrap imageSize() in try/catch so modal remains usable on broken URLs
- Recalculate aspect ratio on re-lock in image modal (matches embed)
- Change min="0" to min="1" on dimension inputs (both modals)
- Fix constrain truthiness check to use !== undefined
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* TipTap: Use maxImageSize config for embed defaults, update ratio to 16:9
Replaces hard-coded 360x240 (3:2) embed defaults with maxImageSize from
RTE config and a 16:9 aspect ratio matching modern video embeds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: select figure before replacing when editing from figcaption
When cursor was inside a figcaption, insertContent would insert a new
figure at the cursor instead of replacing the parent figure. Now selects
the figure node via setNodeSelection before proceeding.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: export UMB_TIPTAP_NODE_DBLCLICK_EVENT from tiptap constants
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: removes double-click handling (to be implemented later on)
* Apply suggestion from @AndyButland
Co-authored-by: Andy Butland <abutland73@gmail.com>
* feat: adds constants for default width and height and guards against 0-values
* feat: validates that width and height are larger than 1px
* refactor: Extract shared <umb-input-dimensions> component
Deduplicates the width/height dimension input logic that was repeated
in both the media caption/alt-text modal and the embedded media modal.
The new component supports aspect ratio locking, proportional resize,
disabled state, and an optional reset-to-natural-dimensions button.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: embeds should be constrained by default
* feat: defaults embed constrain to true
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: always fetch natural dimensions so reset button appears when editing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: move reset button below dimensions and cap natural size to maxImageSize
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: cleanup
* fix: use general_clear localization key for reset button
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: constrain embed preview to sidebar width using aspect-ratio
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: target any first-child element in embed preview, not just iframe
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add comment explaining generic selector for oEmbed markup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use height auto to let embed scale naturally from width
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use !important on width to override inline oEmbed attributes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use height 100% so iframe fills the aspect-ratio container
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: smooth embed preview aspect-ratio changes with CSS transition
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: smooth image preview aspect-ratio changes with CSS transition
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: show Clear button on embed dimensions using default size as natural
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: use maxImageSize for embed natural dimensions and Clear button
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: media-with-caption modal should be 'medium'
* feat: address review feedback on dimensions and preview
- Rename reset button label from general_clear to general_reset (new key)
- Fix embed preview: use pixel width + aspect-ratio + max-width for
accurate proportional preview at any dimension
- Apply same width+aspect-ratio approach to image preview
- Add uui-box to media caption modal for consistent sidebar background
- Center image and embed previews in their containers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: simplify embed modal — honest dimensions, responsive iframe preview
Remove maxImageSize and naturalWidth/naturalHeight from embed modal since
oEmbed dimensions are hints (maxwidth/maxheight), not guarantees. Add
localized description explaining this to the user. Fix iframe preview
collapsing to 150px by reading width/height attributes and applying
aspect-ratio via JS (iframes lack intrinsic dimensions unlike images).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: recalculate aspect ratio when dimensions are set externally
When width/height properties are set from outside (e.g. after async
imageSize() resolves), the ratio was not recalculated — leaving it
undefined from connectedCallback. This caused locked mode to silently
fail on first appearance of the media caption/alt-text modal.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* RichTextEditor: Filter media picker to allowed media types (closes#21824)
Add allowedMediaTypes config to the RTE data type, filtering the media
picker tree to only show selectable media types. Also applies type-aware
validation to drag-and-drop uploads using UmbMediaTypeStructureRepository,
with a modal picker when multiple types match a dropped file.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Review fixes: cache media type lookups, remove unnecessary localization keys, fix lint
- Cache requestMediaTypesOf results per extension to avoid redundant API calls
when dropping multiple files with the same extension
- Add try/catch around API call to prevent unhandled rejections from crashing
the upload loop
- Remove custom localization keys, reuse same plain strings as MNTP config
- Fix prettier formatting warnings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: Auto-Pick in media type picker modal no longer silently fails
The modal returns `{ mediaTypeUnique: undefined }` for auto-pick, which
was treated as a cancellation. Now distinguished from cancel (rejected
promise) and falls back to the server's preferred type.
Fixed in both the media dropzone manager and TipTap drag-drop upload.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: Add localization keys for allowedMediaTypes config, reorder weight
Move allowedMediaTypes next to mediaParentId (weight 91) as they are
related media config options. Use #rte_config_* localization pattern
matching other RTE config properties.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: Show notification when pasting disallowed file types into RTE
The MIME-type pre-filter silently dropped non-image files on paste
(and drag-drop). Now shows the same disallowed file type notification
as the media type validation path.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: Add server-side validation for RTE AllowedMediaTypes config
Validates that media items referenced via data-udi in RTE markup are of
an allowed media type. Follows the same pattern as MNTP's
AllowedTypeValidator. Includes unit tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Clean up validator tests: remove unused param and region markers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Use splitStringToArray for config parsing consistency
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Include media name in validation error for disallowed media types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test: Fix and add acceptance tests for RTE allowedMediaTypes config
* feat: Default RTE to Image and SVG allowed media types
Set allowedMediaTypes to Image and Vector Graphics (SVG) in the
default Rich Text Editor data type seed for new installs. Also
update the Vite mock data to match.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: Address Copilot review feedback
Fix test helper that swallowed null allowedMediaTypes parameter,
masking the "no filter configured" test case.
Remove redundant upload failure toast that showed a misleading
"disallowed media type" message for non-validation failures
(the upload manager already handles its own error notifications).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: Use constants for seed GUIDs, normalize file extension casing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Refactored media type checks into helper shared across RTE and media picker.
Resolved case insensitivity edge case.
Removed unnecessary obsolete constructor.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fixed label in account menu button
The account menu button in the backoffice header was displaying user initials
visually (e.g., "AB") but the accessible name only showed "Profile options",
violating WCAG 2.5.3 which requires that when a UI component has visible text,
the accessible name must contain that visible text.
This fix ensures voice navigation software (e.g., Dragon NaturallySpeaking) can
properly recognize commands using the visible initials.
Changes:
- Added getInitials() utility function to extract first and last initial from user names
- Updated current-user-header-app component to include user name and initials in the
button's accessible label (aria-label)
- Updated profileOptions localization term in all 15 language files to include
placeholders for user name and initials using %0% and %1% format
Result:
- Visual display: "AB"
- Accessible label: "User profile for Andreas Lykke Borg (AB)"
The visible initials are now included in the accessible name, providing a
consistent experience for all users including those using assistive technologies.
Fixes#21942
* Update src/Umbraco.Web.UI.Client/src/packages/user/current-user/utils/get-initials.function.ts
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added a fallback profile options label if name is null or empty
* Added test for get-initials function
* Added note about duplicate get-initials function
* Replicated the logic from the UUI avatar
* Add TODO to use utility exposed from UUI library for extracting the initials.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Fixes#22291
In order to show the right validation message:
- the repository code always notifies the validation failure message
(or a default failure message if none is received)
- in the data-source code, tryExecute is called with the option
to disable the default notification
Return the original error instead of faking success
* Allow copying of system media types.
* feat: Improve error message for system media type alias change
Replace the generic "Operation not permitted" error with a specific
"Alias change not permitted" message that explains the constraint and
suggests using the duplicate operation instead.
Also adds an ordering comment in DeepCloneWithResetIdentities and
a test assertion verifying the copy's alias is mutable.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* add frontend claude context for architecture, deprecation, package-development
* update with developer roles
* tighten up for llm consumption
* add information about localization
* add section about kinds
* include test priority
* add llm docs for core primitives and data flow
* add info about caching
* add skills
* organize in folders
* flat list of skills
* Update src/Umbraco.Web.UI.Client/docs/architecture.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/docs/package-development.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* update skill name
* format tech stack based on claude recommendations
* add context about entities
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update Microsoft.Extensions.Caching.Hybrid to latest minor, and other Microsoft dependencies to latest patch.
* Align test and local web project dependency versions.
chore(tests): remove dead KeepAlive config remnants
The KeepAlive feature was removed in b619399edb (#15891) but references
to the config remained in 8 acceptance test appsettings.json files and
2 CI pipeline env var definitions. These are no-ops since the setting
no longer exists — remove them.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
* Update Microsoft.Extensions.Caching.Hybrid to latest minor, and other Microsoft dependencies to latest patch.
* Align test and local web project dependency versions.
* Added migration for SVG width/height
* #22114 worked on SVG width height implementation
* #22244 Code style fixes
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 XmlReaderSettings and using
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Cleanup
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Correction if statement
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Refactor log message
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Correction if statment
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Cleanup
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Cleanup
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Code style adjustments
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Adjust if statement
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Adjust documentation comments
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #22244 Fix log comment
* #22244 Fallback to viewbox if width height attribute has other unit than numeric or px.
* #22244 Refactoring SVG parser, no support for decimals
* #22244 Migration, consistent logging
* #22244 Create vector umbracoWidth and umbracoHeight during clean install
* #22244 Remove SupportedImageType from ISvgDimensionsExtractor
* #22244 pass culture and segment to SetValue
* Add DtdProcessing.Prohibit security hardening to SvgDimensionExtractor.
* Addressed some code styling and robustness of the migration and extractor classes.
* Add further unit tests.
* Add logging to notification handler. Skip when properties don't exist to avoid unnecessary processing.
* Add unit tests for media saving handler.
* Move the dimensions extractor implementation into infrastructure.
---------
Co-authored-by: Markus Johansson <markus@obviuse.se>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix(core): append SiteName to machine identifier for same-host load balancing
When multiple Umbraco instances run on the same machine (e.g. IIS AAR load
balancing or local LB simulation), they shared the same machineId key in the
umbracoLastSynced table, causing cache sync interference. If Umbraco:CMS:Hosting:SiteName
is configured, it is now appended to the machine name to produce a unique
identifier per instance.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/Factories/MachineInfoFactoryTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Validate length
* Refactor to enable us to have a validator
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added api helper for block grid area
* Updated ui helper for block grid area
* Updated tests for block grid area
* Updated json builder for blockGridSpecifiedAllowance
* Formatted code
* Updated ui helper for specifiedAllowance
* Updated tests
* Fixed ui helper for enterSpecifiedAllowanceMinByIndex
* Added ui helper for create content with a block area with specified allowance
* Added tests for create content with ablock grid area with specified allowance
* Format code
* Make tests run in the pipeline
* Fixed tests
* Fixed comments
* Reverted npm command
* Extend and tidy up unit and integration test coverage.
* Add MaxVersionsToDeletePerRun configuration setting.
* Added overload to GetDocumentVersionsEligibleForCleanup to allow restricting results to older than a given date and with a maximum count.
* Use SQL date filter and per-run cap in content version cleanup.
* Handle deletes using optimised process using temp tables.
* Make maxCount nullable and add per-run cap integration test.
* Addressed code review feedback.
* Fix to reporting of cap reached.
* Additional unit tests for max date cut-off logic.
* Add TODOs for removal of default implementations from interfaces.
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Revert timing for ContentVersionCleanupJob.
* Add index to versionDate on umbracoContentVersion.
* Ensure long command timeout for upgrade.
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Close readline before starting dev server
Close the readline interface before launching the Vite dev server so Ctrl+C can properly terminate the process.
* Added more constant variable for validation message
* Added api helper for creating multi url picker data type with min number
* Renamed
* Updated api helper for creating document with multi url picker
* Added tests for mandatory multi url picker
* Split out tests for content with a multi URL picker.
* Refactor and added tests for publish a block with empty mandatory multi url picker
* Make tests run in the pipeline
* Fixed comments
* Update MFA label to 2FA in English language file
* Changed MFA to 2FA in all other language files.
* Revert "Changed MFA to 2FA in all other language files."
This reverts commit 203294e287.
* Changed MFA to 2FA in all other language files.
---------
Co-authored-by: Marc Love <marc@madebycrunch.com>
* Handle API and surface controllers with correct status code and behaviour when a member isn't logged in.
* Addressed code review feedback.
* Further code review feedback.
* utilize the member type structure repo to get member create options
* align member collection create action with other content types
* remove hardcoded icon
* Update constants.ts
* register as create options
* restore label
* Remove ellipsis from document blueprint label
* Add collection create actions for tree item children
* Show ellipsis for labels with additional options
* Enable additional options for create actions
* Refactor language and member group create actions into create option actions
* Update UiBaseLocators.ts
* Add additionalOptions to create manifests
* Add ellipsis to names in create content modals
* Update DataTypeUiHelper.ts
* Update DocumentTypeUiHelper.ts
* Update creation action locators and tests
* Update LanguageUiHelper.ts
* Adds optional `requestStartNode`
to Entity Data Picker tree source confguration
* Changes the example Document data-source
to use a Document Picker for the start node,
instead of the Content Picker source.
As that is targeted across Documents, Media or Members.
* Example Documents data-source: implemented "start node"
* Renamed `requestStartNode` to `requestTreeStartNode`
* Code tidy-up
* Fix issue where dynamic node query based from current node does not resolve for new documents.
* Add tests verifying the fix. General cleanup of code warnings in dynamic node implementations and tests.
* Addressed failing integration test and code review feedback.
* Allow saving document blueprints with partial variant names.
* Address code review feedback.
* Use shallow copies instead of in-place mutation when filtering unnamed variants before delegating to base class validation.
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* preserve connectionString befor disposing EfCoreDatabase during dispose of EfCoreScope. Fixed by Claude Sonnet 4.6
* Add details of integration tests to memory files.
* Ensure original connection string is captured and remove unnecessary guard.
* Add further test verifying the fixed behaviour.
* Test clean-up.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Updated helpers
* Moved to specific test files
* Added tests with compositions
* Updated helper
* Run tests on pipeline
* Fixed
* Updated helpers
* Added tests for variants
* Added tests
* Updated smoke
* Fixed
* Cleaned up
* Moved to before each
* Reverted test command
* Added ui helper for copy button
* Updated tests since the duplicate button is replaced by the copy button
* Update tests/Umbraco.Tests.AcceptanceTest/lib/helpers/UiBaseLocators.ts
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
---------
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
* Added constant variables for public access notification message
* Added ui helper for public access
* Added api helper for setup and delete public access
* Added api helper for create default member group
* Updated tests to use createDefaultMemberGroup instead of the directly create api
* Added tests for setting public access on content
* Added api helper for verify public access
* Updated ui helper for verify public access
* Updated tests for public access
* Make tests run in the pipeline
* Fixed comment
* Reverted npm command
* Added constant variable for healthCheckMessage
* Added appsetting file for imaging setting config tests
* Updates name
* Added project for imagingSettingConfig
* Added ui helper for verify health check of Imaging HMAC Secret Key
* Updated tests for HMAC secret key health check with default settings
* Added tests for HMAC secret key health check is not configured
* Makes test run in the pipeline
* Fixed comment
* Clean code
* Reverted npm command
* Clear stale connection on pooled DbContext before returning to pool.
* style: apply linter comment punctuation fix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Removed unnessary test.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Add to backoffice hosts
Add to backoffice hosts, rather than completely replacing the array
* Add unit tests verifying fix.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Extract shared culture-resolution logic from ConvertBlockEditorPropertiesBase, ConvertLocalLinks, FixConvertLocalLinks, and MigrateSingleBlockList into PropertyDataCultureResolver, fixing a bug where NULL languageId (legitimate invariant data) was incorrectly treated as a deleted language reference.
Add unit tests covering all resolution paths including the bug scenario.
* Remove obsoletion on helper.
* Address code review feedback.
* Handle SetValue variation mismatch for invariant data on culture-varying compositions
* Fixed build error in tests.
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* init implementation
* Add template tree item-children collection and views
* add base class
* Use Settings section for document blueprint paths
* Inline customElement names and update typings
* Make table collection view buttons compact
* remove collection action again as they require create options to be registered first
* move file
* fix export
* fix const exports
* Extract template tree repository alias to constants
* Extract shared culture-resolution logic from ConvertBlockEditorPropertiesBase, ConvertLocalLinks, FixConvertLocalLinks, and MigrateSingleBlockList into PropertyDataCultureResolver, fixing a bug where NULL languageId (legitimate invariant data) was incorrectly treated as a deleted language reference.
Add unit tests covering all resolution paths including the bug scenario.
* Remove obsoletion on helper.
* Address code review feedback.
* Handle SetValue variation mismatch for invariant data on culture-varying compositions
* Fixed build error in tests.
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* Add to backoffice hosts
Add to backoffice hosts, rather than completely replacing the array
* Add unit tests verifying fix.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Adding a file system approach to subscriber servers
* Adding tests
* Alternative lazy injection
* Adding delegate unit tests and making classes internal sealed.
* Adding a check to see if database is readonly
* Modifying DatabaseReadOnlyAccessor.cs
* Add table view to media picker modal
* Use unique id in media picker selection handlers
* Add dateTime formatter and use in media picker
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Add dateTime localization tests
* localize view labels
* Persist media picker view in interaction memory
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* fix(media): prevent upload field image from overflowing content container
The image element used `height: 100%` which resolved to a definite value
when rendered in the old flex-row layout (parent's stretch gave it a height).
After #21887 restructured the wrapper to flex-column, the parent no longer
provides a definite height, so `height: 100%` falls back to `height: auto`
and the image renders at its natural (potentially huge) dimensions.
Fix by giving `img` direct constraints (`max-width: 100%`, `max-height: 400px`,
`height: auto`) so it constrains itself regardless of the parent layout context.
Closes#22106
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style(media): remove redundant max-height from :host, keep on img
The max-height: 400px is now on the img directly, so the :host constraint
is redundant.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(media): apply same image overflow fix to SVG upload preview
Same root cause as #22106: img relied on height: 100% resolving via
parent flex-stretch, which breaks in the flex-column layout from #21887.
Move constraints to img directly (max-width: 100%, max-height: 400px,
height: auto) and remove redundant/ineffective host properties.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style(media): move min-height from :host to img in image and SVG previews
With height: auto on img, min-height on :host left an empty gap when the
image was shorter than the minimum. Moving min-height to img ensures the
checkerboard background fills the full minimum preview area consistently.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(media): prevent image cropper focus setter from blinking on upload
The #image element had no CSS size constraints, causing it to render at
its natural dimensions briefly before the onload handler applied
width/height: 100% via inline styles. Adding max-width/max-height: 100%
ensures the image is already constrained on first paint, eliminating the
reflow blink when uploading a new image.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(media): use File object name for extension in file upload preview
When a file is dragged in before saving, the path is a blob URL
(blob:http://...) which produces a garbage extension when split on '.'.
The File object is already passed as a prop via the interface but was
unused. Prefer file.name for extension extraction when available.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Routing: Resolve URL segment collision for siblings differing only in punctuation (closes#22070)
When sibling documents have names that differ only in punctuation
(e.g. "Title" vs "Title."), the URL segment provider strips punctuation
and produces identical segments, causing routing conflicts.
Add collision detection in DocumentUrlService.CreateOrUpdateUrlSegmentsAsync
that checks sibling segments (from both the in-memory cache and the current
batch) and appends a numeric suffix (-2, -3, etc.) when a collision is found.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Routing: Move URL segment collision detection to DocumentRepository name uniqueness (closes#22070)
Reverts the DocumentUrlService approach (URL-level `-2` suffixes) in favour of
detecting collisions at the document name level. When two sibling names produce
the same URL segment (e.g. "Title" and "Title." both clean to "title"), the
existing `(1)` naming convention is applied to the name itself, which then
yields a distinct URL segment.
Changes:
- Revert DocumentUrlService collision resolution logic
- Override EnsureUniqueNodeName in DocumentRepository to augment sibling names
with phantom entries for URL segment collisions (via IShortStringHelper)
- Apply same augmentation in EnsureVariantNamesAreUnique for variant content
- Add IShortStringHelper constructor dependency (with obsolete compat pattern)
- Add unit tests verifying the phantom entry approach
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Routing: Refactor URL segment collision to direct segment comparison
Replace the indirect "phantom entries" approach with a clearer two-step
strategy as suggested in review:
1. Call base.EnsureUniqueNodeName() to handle literal name duplicates
2. Fetch siblings, compute URL segments, and increment (N) suffix until
the resulting segment is unique
This is easier to reason about and avoids manipulating the SimilarNodeName
algorithm. The trade-off is a second sibling fetch (same indexed query),
which only runs on save.
- Replace AugmentNamesForUrlSegmentCollisions with EnsureUniqueUrlSegment
- Apply same pattern in EnsureVariantNamesAreUnique
- Remove phantom entry unit tests from SimilarNodeNameTests
- Add integration tests on ContentService for both invariant and
culture-varying content with punctuation-only name differences
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Updated usages of obsolete constructors.
* Avoid second look-up of siblings data.
* Make EnsureUniqueUrlSegment unit testable, and add tests.
* Pass content.Id rather than 0 in variant unique name check.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Optimise redirect tracker by avoiding re-producing of descendant nodes and avoiding descendant traversal when there has been no change to the node's URL segment.
* Delete inadvertently added file
* Allow URL segment providers to ensure descendent traversal if needed.
* Pushed missing files.
* Refactors to reduce large method code smells.
* Optimise redirect tracker by avoiding re-producing of descendant nodes and avoiding descendant traversal when there has been no change to the node's URL segment.
* Delete inadvertently added file
* Allow URL segment providers to ensure descendent traversal if needed.
* Pushed missing files.
* Refactors to reduce large method code smells.
Change setOneContent to setOneSettings for initialSettings
Line 661 calls setOneContent() with settings data instead of setOneSettings(). This pushes the settings element into the contentData array.
* Updated naming
* Updated path to test files
* created tests
* Reverted retries change
* Updated imports
* Added step
* updates based on comments and clean up
* Added vars
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Adding code comments to Umbraco.Cms.Api.Management
* Update src/Umbraco.Cms.Api.Management/Controllers/MemberGroup/UpdateMemberGroupController.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Cms.Api.Management/Controllers/DocumentBlueprint/MoveDocumentBlueprintController.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Cms.Api.Management/Controllers/DataType/CopyDataTypeController.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Cms.Api.Management/Controllers/DocumentType/CopyDocumentTypeController.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Cms.Api.Management/Controllers/DataType/IsUsedDataTypeController.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixing a missing closing brace on return docs.
* Fixing issue raised by copilot.
Issue was:
Inconsistent use of T: prefix in cref attribute. Other parameters in this PR use the interface name directly without the T: prefix (e.g., <see cref=\"IContentTypeService\"/>). Remove the T: prefix for consistency.
* Fix broken <returns> tags.
* Fixed incorrect descriptions.
* Added missing description.
* Fix positioning of comments.
* Fixed indentation.
* Use standard text for view model properties.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Emma L Garland <1649855+emmagarland@users.noreply.github.com>
* fix(core): lowercase file extension before validating against allowed/disallowed lists
Fixes case-sensitive comparison in UmbTemporaryFileManager where uploading a
file with an uppercase extension (e.g. .PDF) would be incorrectly rejected
even when the lowercase extension (pdf) was in AllowedUploadedFileExtensions.
Closes#22096
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(media): lowercase SVG extension check in media links info app
Fixes case-sensitive .svg check so that media files with uppercase
extensions (e.g. .SVG) correctly use the SVG viewer link.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(core): also lowercase config extension lists before comparison
The server may return extensions in any case (config is stored as-is).
Lowercase both sides to ensure the comparison is truly case-insensitive.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Ensure server-side checks for file extensions are case insensitive.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Updated multiURLPickerSettings as there is a new setting for Culture-specific document links
* Updated tests for verify the default configuration of multi url picker data type
* Increased time for waiting the loader icon disappears to avoid the flaky tests
* Updated tests for reset manual URL using remove button due to locator changes
* Added ui helper for card collection view in content
* Updated tests to reflect that grid view is now the default instead of list view.
* Updated ui helper for public access saving button due to UI changes
* Removed unused code
* Fixed comments
* Removed unused test folder
* Updated auth to clear storage
---------
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* Basic implementaion
* Tests and schema validation
* Attemp refactor
* Fix json single parent bug
* Surface doctype schema validation to management api
* Improve block schema and make validation errors less verbose
* fix validation error cleanup
* Improved GUID handling | added schema for all propertyEditors
* Add ContentTypeInputSchema
* move contenttype schemas to be actual jsonschemas
* Fix block limit on blocklist and grid
* add datatype schema batch
* Refactoring blocks json schema generation and add to richtext
* Package version update and more tests!
* ConvertToJsonNode optimization
* async refactor
* Add editorUiAlias to x-umbraco-properties and make DataType ref route dynamic
* Removed JsonSchema.net due to possible license issues
* Use void editor in the noop schema test
* Cleanup leftovers from Schema validation removal
* Move batch logic into batchcontroller
* Update src/Umbraco.Infrastructure/PropertyEditors/BlockJsonSchemaHelper.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Cms.Api.Management/Services/ContentTypeJsonSchemaService.cs
Improve lookup on building propertymetadata
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fixed build error.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Provide more descriptive management API responses for invariant with variant composition.
* Improved messaging and fixed integration tests.
* Fixed ordering of new ContentEditingOperationStatus values so existing values retain their integer equivalent.
* Suppress breaking changes in integration tests.
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Prevent move to recycle bin for documents and media when disable delete when referenced is configured.
* Addressed code review feedback and fixed failing client-side test.
* Add suppression for renamed integration test.
* Simplified solution by moving disableDeleteWhenReferenced setting to modal.
* Fix flicker.
* Apply disable on delete handling to bulk trash dialog.
* Add additional translations.
* Move disableDeleteWhenReferenced resolution to document and media action classes, so the value is passed as modal data rather than being resolved in the modal itself.
* Update OpenApi.json.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Allow "File" media type as fallback when no specific extension match is available at the upload location
* Added regression test.
* Addressed test feedback.
* Fix after merge.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Move #inSessionUpdateCallback guard into #setSessionLocally() so all
callers are protected, not just makeRefreshTokenRequest()'s lock callback.
Previously, completeAuthorizationRequest() called #setSessionLocally()
directly without setting the flag. With keepUserLoggedIn=true and a short
TimeOut, session$ observers fired synchronously inside #setSessionLocally,
triggering #onSessionExpiring → validateToken() → makeRefreshTokenRequest()
before #inSessionUpdateCallback was ever set — causing a second /token call
immediately after the initial code exchange 200.
The no-Web-Locks fallback path in makeRefreshTokenRequest() had the same
gap. Moving the flag into #setSessionLocally() covers all call sites.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Auth: Skip /token refresh when access token is still valid
Guard the per-request validateToken() call sites with #isAccessTokenValid()
in configureClient() and getLatestToken(). Previously, every API request
triggered a /token call even when the access token had not expired, causing
unnecessary token churn and OpenIddict ID2019 errors for in-flight requests.
Proactive refresh via UmbAuthSessionTimeoutController and startup validation
in app-auth.controller.ts are unaffected — those call validateToken() directly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Auth: Remove redundant first-check validateToken() on app startup
setInitialState() already handles server verification before the router
evaluates guards — either via a direct /token call (makeRefreshTokenRequest)
or via peer session adoption (BroadcastChannel). The #isFirstCheck guard in
UmbAppAuthController was a leftover from the AppAuth/localStorage era, where
token state was restored from storage and needed a server round-trip to confirm
validity. That assumption no longer holds: if getIsAuthorized() is true after
setInitialState(), the session came directly from the server or from a peer
whose timing is still valid. Stale/revoked peer sessions are handled lazily
by the 401 interceptor, which triggers re-auth as needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Auth: Wait for ongoing cross-tab refresh before sending requests
Restores the cross-tab lock serialization that was implicitly provided by
the old unconditional validateToken() call. When another tab holds the
umb:token-refresh lock (keepUserLoggedIn proactive refresh), API requests
in this tab now wait for it to complete before proceeding. This prevents
sending requests with an access token that is about to be revoked, which
caused OpenIddict ID2019 errors on in-flight requests.
The fast path (token valid, no refresh in progress) remains: navigator.locks.query()
is a cheap browser-internal call, and the lock.request() no-op is only
incurred when a cross-tab refresh is actually happening.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Auth: Extract #ensureTokenReady(), improve naming and JSDoc
- Extract duplicate guard logic from configureClient() and getLatestToken()
into a single #ensureTokenReady() private method
- Rename from #ensureValidToken() → #ensureTokenReady() to distinguish from
the validate/valid naming cluster (validateToken, isAccessTokenValid)
- Add JSDoc to #isAccessTokenValid() clarifying it is a local timestamp check
with no network call
- Improve JSDoc on validateToken() to make clear it forces a network refresh
(unconditional /token call), distinct from the per-request #ensureTokenReady()
gate which skips the call when the access token is still live
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(auth): prevent re-entrant /token call when session$ fires synchronously inside lock
With keepUserLoggedIn=true and a short access token lifetime (e.g. expiresIn ≤ buffer),
#updateSession() triggers session$ synchronously inside the lock callback. The observer
fires #scheduleCheck → #onSessionExpiring → validateToken() before the lock is released.
This re-entrant call captures sessionBefore = newSession (already updated), so the
reference guard cannot detect it, resulting in a duplicate /token request.
Fix by tracking #inSessionUpdateCallback around the #updateSession() call. Re-entrant
callers return true immediately; concurrent non-re-entrant callers are unaffected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
The window.opener guard in #setAuthStatus() was too broad — it skipped
setInitialState() for ANY window opened via window.open(), including the
preview window. This left isAuthorized stuck at false in the preview window,
causing the loading spinner to never resolve.
The guard is only needed for the OAuth code exchange popup (oauth_complete),
where calling setInitialState() could silently refresh the session, set
isAuthorized=true, and cause the popup to redirect to the backoffice instead
of completing the code exchange.
Fix: narrow the guard to window.opener + pathname === '/oauth_complete'.
The preview window (at path /preview) now correctly calls setInitialState(),
which restores the session from a peer tab via BroadcastChannel.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
security.md:
- Expand auth section with v17 httpOnly cookie model, [redacted] pattern,
configureClient() usage, and explicit warning against calling validateToken()
per request (causes token churn and ID2019 errors)
edge-cases.md:
- window.opener is set for any window.open() target, not just OAuth popups —
must check pathname too (root cause of #22083 preview regression)
- BroadcastChannel does not deliver to the sender — use local-only setters
inside handlers to avoid N² broadcast storms
- sessionRequest must guard with isSessionValid() before responding
- Web Lock umb:token-refresh pattern for cross-tab refresh deduplication
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Updated ui helper to verify the image cropper is rendered
* Added .skip for the failing tests due to the actual issue
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Add bulk fetch endpoints for retrieving full details for multiple entities by provided IDs, for data, document, media and member types.
* Switch to GET endpoints.
* generate new managment api types + sdk
* Update to use "batch" over "fetch".
* Update OpenApi.json and client-side types/sdk.
* Add endpoint summaries and descriptions.
* Align controller method signatures with use of HashSet<Guid> over Guid[].
* Backoffice Performance: Client-side bulk fetch of Element Types for Blocks, Content Type Compositions, and Data Types to reduce API requests (#21610)
* Add readMany for document type details
* Add batch read methods to detail interfaces
* Pre-register content-type structures and bulk load
* Add readMany support to detail request managers
* Simplify loadType and delegate to setType
* add js docs to detail data request manager
* add unit tests for detail data request manager
* Add byUniques support to detail store/repository
* implement readMany for data types
* fix typescript errors
* Preload and pass data type details to properties
* Update content-type-structure-manager.class.ts
* Replace per-property UmbDataTypeDetailRepository requests with the structure manager's bulk-loaded data type details
* Deduplicate inflight detail read/readMany requests
* Use 'read:' inflight cache key prefix
* Add bulk detail requests & status helpers
* Add management API request/cache for media/member types + requestByUniques support
* use observe controller instead of rxjs
* adjust to new apis
* rename prop to make it easier to read
* throw on error
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* remove unused import
* Fixes to failing E2E tests.
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Fixed link in notification to editable document.
* Update translations using legacy mail format.
* Delete inadvertently added file
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Allowed for easier public access management.
* Revert the update controller as that is being handled by the frontend.
* Cleaning up pull request
* Preserving obsolete function, updating controller to pass optional parameter.
* pass in the includeAncestors parameter
* Added in an alert message for when the permissions are being inhereited.
* Complete resolution of breaking changes on IPublicAccessPresentationFactory.
* Update call to controller from integration tests.
* Fixed variable name typo and whitespace.
* Added clarifying comment to client-side behaviour.
* Supressed the breaking change on the controller with the additional parameter.
* Added unit tests for PublicAccessPresentationFactory.
* Added localisation for ancestor label.
* Typo and whitespace.
* Updating the model to allow for switching between methods while still preserving ancestor selections.
* update locatlizations
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Auth: Fix popup flow showing backoffice after session timeout re-auth
When a session times out client-side, the parent tab's #session was still
non-null (the timeout signal fires without clearing the session). When the
re-auth popup opened and called setInitialState(), it sent a sessionRequest
via BroadcastChannel. The parent responded with the expired session because
the handler only checked `if (session)` — not if the session was still valid.
The popup's auth context then thought it was already authorized, causing the
oauth_complete handler to hit the early-return `redirectToStoredPath` instead
of completing the authorization code exchange. The popup navigated to the
backoffice instead of exchanging the code and closing.
Fix: only share the session in response to sessionRequest if isSessionValid()
returns true (i.e. session.expiresAt > now).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Auth: Fix re-auth popup not opening on session timeout
Two issues:
1. When the countdown modal timer reached 0, it called onLogout() -> signOut()
which performed a full page redirect to /logout before timeoutSignal could
fire. The re-auth popup (makeAuthorizationRequest('timedOut') in
UmbAppAuthController) was never triggered. Fix: reject the modal on timer
expiry instead of calling onLogout(). The catch block in #openTimeoutModal
then calls #tryValidateToken(); if the refresh token is still valid the
session is silently renewed, otherwise timeOut() fires -> timeoutSignal ->
re-auth popup opens.
2. Only the Web Lock leader tab was showing the timeout countdown modal.
All tabs should show the warning so the user can respond from any active
tab. Remove the lock-leader election logic — show the modal on every tab.
When any tab successfully refreshes (Continue button or silent refresh), the
session$ observer fires in all tabs, closing the modal everywhere.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Auth: Show re-auth popup when timeout countdown expires
When the countdown reaches zero the user was away and the session has
effectively expired — silently refreshing is the wrong behaviour. Instead:
- Add onExpired callback to UmbModalAuthTimeoutConfig, called (instead of
onLogout) when the countdown hits 0.
- The controller sets onExpired -> timeOut(), which clears the session and
fires timeoutSignal. UmbAppAuthController picks this up and calls
makeAuthorizationRequest('timedOut'), opening the re-auth popup so the
user can sign back in without losing their work.
- The modal uses submit() (not reject()) on expiry so the catch block's
tryValidateToken() is not triggered.
- The Logout button still calls signOut() as before.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Auth: Close re-auth modal on other tabs when session is restored
When all tabs showed the re-auth modal and the user signed in on one tab,
the authorized BroadcastChannel message updated every other tab's auth
context but nothing triggered the modal to close on those tabs.
Fix: observe isAuthorized in UmbAppAuthModalElement. When it becomes true
(either from local sign-in or from another tab's BroadcastChannel message),
call #onSuccess() to submit and close the modal.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: adds null guard
* docs: updates CLAUDE.md to let it know that there is a circular check call
* fix: fixes issue where the popup window could redirect to and show the full backoffice inside
* fix: ensures that the timeout modal is not shown until the buffer window is reached and extend the buffer window in case of short timeouts, and use the full expiresAt value for timeout but only the accessTokenExpiresAt for refresh of token
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Append leading / to AliasUrlProvider URLs only if it doesn't already have one
* Add unit tests for AliasUrlProvider.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fixed issue with GetAll on MemberService where skip/take weren't translated to pageIndex/pageSize.
* fix(core): fix paging in MemberService.GetAll skip/take overload
The skip/take overload was passing skip and take directly as pageIndex
and pageSize to the repository, causing incorrect pagination for any
non-zero skip value. Use PaginationHelper.ConvertSkipTakeToPaging to
correctly convert skip/take to page index/size, matching the pattern
used by all other services.
Also update ContentTypeIndexingNotificationHandler to call the
pageIndex/pageSize overload directly, avoiding the redundant conversion.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Treat empty or whitespace filter as no filter in MemberService.GetAll
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: adds new SiteName setting to cookie options to use as a postfix for oauth cookies
* fix: adds configured postfix to oauth cookies to make them work on multiple sites on same domain (fixes regression)
* fix: addresses an issue where the AuthCookieName option was not respected for the _EXPOSED auth cookie
* Update src/Umbraco.Core/Configuration/Models/BackOfficeTokenCookieSettings.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Moved the "exposed" cookie config to IConfigureNamedOptions
* Add missing constants
* Add unit tests to prove the site postfix
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Backoffice: Fix circular dependencies introduced by PRs #21830 and #21846
Two circular dependency chains were created by the combination of recent
auth rewrites and the auth modal split:
1. `resources ↔ auth`: api-interceptor.controller imported UMB_AUTH_CONTEXT
from auth, while auth.context imported UmbApiInterceptorController from
resources.
2. `server → resources → auth → server`: umb-auth-view.element imported
UMB_SERVER_CONTEXT from the server package, and was reachable from
auth/index.ts via the components barrel added in #21846.
Fix for circular 1: Introduce UmbAuthSignalerContext in resources — a
lightweight bridge context with isAuthorized and requestTimeout(). The
interceptor creates it and owns it directly; auth context consumes it via
consumeContext to bridge its own authorization state and react to timeout
signals. Resources now has zero knowledge of the auth package.
Fix for circular 2: Remove umb-auth-view.element from auth/components/index.ts.
The modal already imports it directly within the package; app-auth.element
uses it as a custom element tag string with no class import needed.
Also updates MAX_CIRCULAR_DEPENDENCIES from 1 → 0 since both known cycles
are now resolved.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Backoffice: Fix circular dependencies - part 2
- Remove auth dependency from server.context.ts: replace eager constructor
side-effect (consumeContext + HTTP fetch) with lazy defer()-based observable
using a backing field flag; fetch only happens on first subscription to
isProductionMode
- Re-add umb-auth-view.element.ts to auth/components barrel (now safe since
server no longer imports from auth)
- Ensure umb-auth-view is registered on the /logout route by adding a
side-effect import in app-auth.element.ts
- Fix JSDoc in auth-signaler.context.ts and api-interceptor.controller.ts to
correctly describe ownership and direction
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Make cookie renewal conditional to fix AllowConcurrentLogins enforcement.
* Reduce SecurityStampValidatorOptions validation interval for users to zero.
* Apply member security stamp options.
* Addressed code review feedback.
* Add separate settings for AllowConcurrentLogins for members and users.
* Clarify comment.
* Further unit tests as suggested by code review.
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Move unattended migrations to a background service, allowing liveness checks to recognise the application as healthy but not yet ready to serve requests.
* Add maintenance protection to surface controllers.
* Add protection for delivery API in upgrading state.
* Add protection for management API in upgrading state.
* Skip dynamic route transformer during Upgrading state (ensures surface controllers with attribute routing are handled in the upgrading state).
* Fix regression in attended upgrade state.
* Addressed code review feedback.
* Tidied up comments.
* Scope readiness health check predicate to Umbraco's own check.
* Fixed failing integration test.
* Removed TestCase from test with only a single case.
* Fix localization for "backoffice"
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Removed UpgradeFailed from OpenApi.json and client-side types.
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* fix(media): ensure sequential creation in media drag-and-drop
When multiple folders are dragged into the Media section, the creation
handlers (#handleFile/#handleFolder) were not awaited in the batch loop.
This caused child items to attempt server operations before their parent
folders were fully created, resulting in 404 errors for subsequent items.
Adding await ensures each item is fully created before the next is
processed, which is required because child items in the flat list
reference parent folder IDs that must exist on the server.
Closes#21837
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Task: Bump @umbraco-ui/uui to 1.17.2
Includes the fix for multi-folder drop DataTransfer staleness
(umbraco/Umbraco.UI#1339).
* qa(dropzone): add unit tests for UmbDropzoneManager folder flattening order
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Protect endpoint that sets user groups for a user collection to prevent elevation of permissions for users.
* Update tests from code review feedback.
* Add alias property to collection config interface
Introduced an 'alias' property to the UmbCollectionItemPickerModalCollectionConfig interface
* render collection element when modal is configured with an alias
* expose a picker modal route
* use collection in use picker
* adjust spacing
* add config option for selectOnly
* dynamic modal alias
* support selectable entity item ref
* wip entity data picker collection + ref and card views
* Add entity collection item card extension type + default elements
* implement user collection item card
* fix selection events
* map to prop
* add prop/attr for href
* add support for which detail properties to show
* update type import
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* import card in correct file
* Fix event listener binding for selection events
* implement disabled property for collection item cards
* init commit of collection item ref extension
* fix imports
* add element interface
* Implement UmbEntityCollectionItemElement interface in item cards
Added the UmbEntityCollectionItemElement interface to document and user collection item card elements for improved type safety and consistency. Updated type exports to include the new interface.
* Update collection item ref to use uui-ref-node
Replaces the placeholder div with a uui-ref-node component, passing relevant item properties and event handlers. Adds dynamic icon rendering using umb-icon.
* Refactor entity collection item elements to use shared base
Introduces a new abstract base class for entity collection item elements, consolidating shared logic for card and ref variants. Updates card and ref element implementations to extend the new base, and refactors extension manifest interfaces for consistency. This improves maintainability and reduces code duplication.
* use class instead of magic string
* Use entity collection item card in picker view
Replaces the placeholder card markup with the <umb-entity-collection-item-card> component, enabling selection and deselection functionality for items in the entity data picker card collection view.
* Update entity item ref to collection item ref
Replaces <umb-entity-item-ref> with <umb-entity-collection-item-ref> in the picker collection view. Adjusts event handlers and select-only logic to improve selection behavior and component consistency.
* utilise ref and card kind for picker views
* introduce ref and card collection view kinds
* Utilise card kind for user collection view
* Add item-specific href support to collection views
Introduces a requestItemHref method to collection contexts for retrieving item-specific hrefs. Updates card, ref, and user table collection views to use these hrefs, enabling dynamic linking for collection items. Refactors user table name column layout to accept href via value prop instead of constructing it internally.
* Update ManifestCollectionView import path
Changed the import of ManifestCollectionView from '../extensions/types.js' to '../view/types.js' to reflect its new location.
* remove unused
* use size medium for entity collection item picker
* use box
* render entity actions
* use edit path builder for user links
* rename method
* Revert "rename method"
This reverts commit 4df577688e.
* Update collection-default.context.ts
* make type lint ignore unused args with an underscore
* temp remove unused
* only make collection vie selectable if there are any registered bulk actions
* don't render name link if there is no href
* fix imports
* Render selection actions only if bulk actions exist
* use selectable state
* Update language-table-collection-view.element.ts
* Update language-table-collection-view.element.ts
* Update card-collection-view.element.ts
* clean up
* Refactor collection views to use shared base class
* refactor(collection): parallelize href fetching and make method private
* docs(examples): update collection example to use card and ref kinds
* docs(examples): add icon property to collection example data model
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/view/types.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update collection-bulk-action.manager.test.ts
* Removed duplicate and redundant '@typescript-eslint/no-unused-vars' rule definitions, consolidating the configuration to use only 'argsIgnorePattern'.
* Handle missing user href in name column layout
Replaces the user name link with a span when the href property is not provided, preventing broken links in the user table name column layout.
* Update user-table-name-column-layout.element.ts
* pass modal data and value to routable modal
* Update picker-input.context.ts
* support selectableFilter
* scaffolding of a collection text filter extension
* Refactor collection text filter to use API interface
* Fix incorrect tag
* Update types.ts
* Update collection-text-filter.extension.ts
* Add cancelation to debounced search on destroy
* clean up
* add js docs
* two way binding of filter value
* clean up
* Add collection text filter manifest example
Introduced a new filter manifest for the example collection and updated the main manifests file to include it. This enables a text filter extension for the example collection.
* Delete unused element and context
* Update src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/user-group-collection.context-token.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update user-group-table-collection-view.element.ts
* support search for tree item and collection item pickers
* add spacing between collection ref items
* add margin between picker search result items
* remove spacing after last item
* remove padding in search results
* Update collection-item-picker-modal.element.ts
* move select only logic to collection selection manager
* add tests for collection selection manager
* change to filter label instead of search
* delete unused user grid collection view
* Select-only mode is now only disabled when all items are deselected, rather than on every deselection.
* prepare umb table for pickers
* utilize UmbCollectionViewElementBase in user table collection view
* remove console log
* handle select all and select item from same event
* bulk actions workaround
* add bulk action in collections feature toggle
* remove unused method
* make fields optional to avoid a breaking change
* remove unused import
* fix typescript errors
* adjust search styling
* hide with css
* fix ts errors
* Add modal data support to picker input context
Introduces methods to set and get modal data in UmbPickerInputContext, allowing base configuration for picker modals. Updates modal data handling to merge stored modal data with provided data for both direct picker opening and modal route setup.
* Fix bulk action manager test initialization
Added calls to setConfig in tests to properly initialize the observer before subscribing to hasBulkActions. Simplified the test logic for checking emissions when actions are present.
* Update tree-picker-modal.element.ts
* Update picker-search-result.element.ts
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/view/umb-collection-view-element-base.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Use ifDefined for modal route in user input button
* Use ifDefined for href binding in entity data picker
* Fix collection alias binding in item picker modal
* wire up user table collection view with selectableFilter
* clean up controller aliases
* Update collection-item-picker-modal.element.ts
* Update collection-item-picker-modal.element.ts
* Add support for collection items with thumbnails
Introduces thumbnail support for collection items by extending models and updating the default collection item card to render thumbnails when available. Adds a new example data source and manifest for items with thumbnails, and updates grid styling for card views.
* Improve card grid responsiveness and card sizing
Added a new CSS variable for large card min-width and updated the card grid to use container queries for responsive column sizing. Adjusted user card styles to ensure proper sizing and layout within the grid.
* add example image to thumbnail example
* introduce generic card component
* wip picker views configuration
* Update manifests.ts
* store value as alias
* Improve handling of missing collection view manifests
Refactors manifest storage to use a Map for faster lookup by alias and updates rendering logic to handle missing manifests gracefully. Now displays a 'not found' message with a remove button for missing collection view manifests.
* add sorting
* rename
* Add confirmation modal before removing picker view
* remove unused
* move collection selectOnly logic to context
* Update user-picker-modal.token.ts
* Add data-source package and integrate in input-entity-data
* Add optional description to collection items
* introduce extension picker data source
* fix problem with shallow copy because of js module in object
* nest manifest data
* Hide pagination when all items are shown
* Add a fallback page size
* merge extension insight code with extension code
* clean up
* Add optional description support to default item ref
* Revert "Add data-source package and integrate in input-entity-data"
This reverts commit e02881e8b6.
* fix post merge
* add input-extension utilizing input-entity-data
* proxy value and selection
* add todo
* temp hardcode config
* add typed config model
* Support multiple extension types in filters
* Use extensionTypes filter and deprecate type
Standardize extension collection filtering by introducing extensionTypes and phasing out the old type field.
* More explicit type name
* Expose allowedExtensionTypes as a @property on UmbInputExtensionElement
* Add text filter support for entity data picker
* remove reexport as this is not public available
* remove unused
* clean up
* clean up
* Add storage and getter for allowedExtensionTypes
* Inline collection view alias and remove constant
* Update vite.config.ts
* Update manifests.ts
* Update extension.picker-data-source.ts
* add tests for extension picker data source
* change to an observable feature config
* make feature object optional
* add unit tests
* Reference condition class directly in manifests
* Simplify collection view types and refactor setup
* remove todo
* implement input-extension on picker views configuration
* Add collection view aliases and defaults
* use correct type
* make name optional
* remove debugger
* delete - merge gone wrong. They are now called figure-cards
* map views to layouts
* Add viewsOverride to enforce collection layout order
* clean up observers if data source type changes
* remove unused
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Auth: Split auth modal into reusable view and thin modal wrapper
Extract the full login screen UI from umb-app-auth-modal.element.ts into
a standalone umb-auth-view.element.ts that extends UmbLitElement. The
modal becomes a thin wrapper that delegates rendering to the view and
bridges onSuccess to _submitModal().
The view defaults userLoginState to 'loggedOut', so the /logout route
renders it directly as a component without needing to cast or configure
properties.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Fix imports and add readonly to styles in umb-auth-view
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: import directly from main app itself to avoid dynamic imports
* Auth: Reopen timeout modal on dismiss and fix login layout height
Reopen the auth modal in a loop when the session has timed out, so
the user cannot dismiss it without re-authenticating. Fix login
layout height from calc(100vh - 64px) to 100vh with box-sizing.
Height fix credit: Lan Nguyen (PR #19843, closes#19628)
Co-Authored-By: Lan Nguyen <lan@umbraco.dk>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Fix timeout modal reopen by removing explicit modal key
The do/while loop to reopen the modal on dismiss was failing because
reusing the same key caused a race condition in the modal manager —
appendToFrozenArray replaced the old entry but the container's
_modalElementMap still held the stale key, preventing creation of
the new modal element. Letting each open() generate a unique key
via UmbId.new() avoids the collision entirely.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Prevent auth modal from being dismissed via ESC
Add UmbPersistentModalDialogElement that extends UUIModalDialogElement
and intercepts ESC keydown to prevent the native dialog cancel behavior.
The auth modal now always uses this element via type: 'custom', ensuring
users must complete authentication rather than dismissing the modal.
Also simplifies #showLoginModal by using umbOpenModal() and removing
the do/while reopen loop which is no longer needed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: renames file and adds appropriate exports
* Auth: Use AbortController for listener cleanup and add cancel handler
Use AbortController to manage event listeners, preventing accumulation
if _openModal is called multiple times. Add cancel event handler
alongside keydown as a fallback for the native dialog cancel behavior.
Clean up listeners on forceClose.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Lan Nguyen <lan@umbraco.dk>
* Auth: Add minimal PKCE client to replace appauth library (closes#20873)
Introduces UmbAuthClient — a focused OAuth PKCE client that replaces the
forked @openid/appauth library. Uses Web Crypto API for code_challenge
generation and fetch() with credentials:'include' for cookie-based auth.
Zero localStorage usage — PKCE state held in memory.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Rewrite auth context with BroadcastChannel and Web Locks
Merges UmbAuthFlow into UmbAuthContext (single consumer, no export).
Replaces localStorage token storage with in-memory session state.
- BroadcastChannel('umb:auth') for cross-tab auth event coordination
- Web Locks API prevents concurrent refresh token race conditions
- postMessage for popup PKCE code_verifier exchange
- sessionStorage for redirect-flow PKCE state (tab-scoped)
- Adds configureClient() for extension developer DX
- Deprecates authorizationSignal (scheduled for removal in Umbraco 19)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Update session timeout controller and SharedWorker
Session timeout controller simplified to take only UmbAuthContext (no
separate authFlow parameter). Observes session$ for timing updates.
SharedWorker now accepts expiresAt timestamp instead of full
TokenResponse. Removes TokenResponse import and TOKEN_EXPIRY_MULTIPLIER.
Sends current session state to new tab connections. Cleans up stale
ports via try/catch on postMessage.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Simplify OAuth completion flow and API interceptor
app.element.ts: Remove authorizationSignal wait pattern —
completeAuthorizationRequest() now handles everything. Remove
umbHttpClient.setConfig() call (moved to auth context constructor).
api-interceptor.controller.ts: Replace deprecated authorizationSignal
observer with isAuthorized transition for retrying 401 requests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Deprecate external/openid package and storage constant
Delete all 17 appauth implementation files. Replace index.ts with
deprecated type-only stubs for backwards compatibility — external
consumers can still reference types through v18.
Mark UMB_STORAGE_TOKEN_RESPONSE_NAME as deprecated (scheduled for
removal in Umbraco 19).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Update auth context tests for new implementation
Rewrite tests to cover the new auth context API surface including
configureClient(), getOpenApiConfiguration(), URL generation, lifecycle
management, and bypass auth mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Update extension template to use configureClient() API
Replace manual getOpenApiConfiguration() pattern with the new
configureClient() method on UmbAuthContext — single line to configure
any @hey-api/openapi-ts client for authenticated Management API calls.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Fix token refresh not firing and adaptive worker timing
Two bugs fixed:
1. makeRefreshTokenRequest() checked expiresAt > now which always
returned true when the worker fired proactively (before session
expiry). Changed to compare session reference before/after acquiring
the Web Lock — only skips if another tab actually refreshed.
2. getLatestToken() checked the full session expiresAt (with 4x
multiplier) instead of the access token expiry. Split UmbAuthSession
into accessTokenExpiresAt and expiresAt so each check uses the
correct threshold.
Also made the worker's buffer and check interval adaptive for short
sessions (< 2 minutes) — buffer is reduced to 25% of session lifetime
and check interval scales proportionally. Fixes the long-standing issue
where very low timeouts caused the buffer to exceed the session.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Propagate sign-out to all tabs via BroadcastChannel
When a user signs out in one tab, broadcast a 'signedOut' message so
other tabs redirect to the logout page. Previously, other tabs only
cleared their in-memory session but continued showing stale data.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Route setInitialState through Web Lock to prevent duplicate refreshes
setInitialState() was calling refreshToken() directly, bypassing the
Web Lock. Concurrent API calls (via getLatestToken) also triggered
refresh through the lock. This caused duplicate /token calls — one
outside the lock, one inside — leading to rolling refresh token
invalidation races.
Now setInitialState() goes through makeRefreshTokenRequest() so all
refresh calls are serialized by the same Web Lock.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Close timeout modal when another tab refreshes the session
When the session$ observable emits a new session (e.g. from a
BroadcastChannel update after another tab refreshed), close any open
timeout modal. Previously the modal stayed open with its own countdown,
eventually triggering a spurious logout even though the session was
already extended.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Replace SharedWorker with setTimeout and leader-elected modal
Four improvements from a fresh design review:
1. Remove SharedWorker — replaced with a simple setTimeout in the
timeout controller. A 15-60s timer is negligible on the main thread,
and the focused tab's timer is never throttled by browsers.
2. Leader-elected timeout modal — uses Web Lock (ifAvailable) so only
one tab shows the timeout modal. Non-leader tabs set a fallback
timeout. When the leader tab resolves the modal, BroadcastChannel
propagates the result and session$ observer closes stale modals.
3. Peer session request — new tabs ask existing tabs for their session
via BroadcastChannel before attempting a server refresh. Avoids the
400 error on fresh sessions and eliminates unnecessary /token calls
for new tabs in an existing session.
4. Single expiry concept — no more refreshToken vs logout distinction
from the worker. The controller checks remaining time and decides
based on keepUserLoggedIn and whether time has fully expired.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Fix timeout modal not showing during buffer zone
The #onSessionExpiring guard used isSessionValid() which returns true
during the warning buffer (before full expiry), preventing the modal
from ever appearing. Replace with expiresAt comparison that only skips
if the session was actually refreshed since the check was scheduled.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Set auth header at module level to eliminate timing gap
Move `auth: () => '[redacted]'` into the http-client module-level
config so it's available from first import. Previously, extensions
importing umbHttpClient before UmbAuthContext initialized would send
cookies but not the Authorization header needed by
HideBackOfficeTokensHandler, causing 401s.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Bind default interceptors via configureClient()
configureClient() now creates an UmbApiInterceptorController and binds
the default response interceptors (401 retry, error handling,
notifications) alongside auth config. app.element.ts uses this for
umbHttpClient, giving extensions the same middleware pipeline.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Fix review findings — stale state, double-broadcast, PKCE cleanup
- clearTokenStorage: also set isAuthorized=false on originating tab
- signOut: inline state clearing to avoid double-broadcasting
sessionCleared + signedOut; fix dead URL base arg; use
window.location.origin consistently
- makeRefreshTokenRequest: compare accessTokenExpiresAt values instead
of object identity for robustness
- completeAuthorizationRequest: only remove sessionStorage PKCE entry
when state matches (preserve valid entry on mismatch)
- umb-auth-client: warn when expires_in is missing or zero
- configureClient: guard against duplicate calls with WeakSet
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(auth): resolve lint errors and Copilot review issues
- Add eslint-disable blocks around OAuth wire-format URLSearchParams keys
(client_id, redirect_uri, grant_type, etc.) — these must use snake_case
per RFC 6749/7636 and cannot be renamed
- Fix optional chaining gap in #openTimeoutModal: store modal ref before
awaiting so modal?.onSubmit() is safe when modalManager is undefined
- Fix popup Promise never settling: poll for authWindowProxy.closed and
resolve (cleanup) when the user closes or cancels the login popup
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Auth: Deprecate getLatestToken() — always returns '[redacted]' with cookie auth
With cookie-based auth, getLatestToken() always returns '[redacted]'.
The proactive token refresh it performed is no longer needed since:
- The session timeout controller refreshes proactively via setTimeout
- The API interceptor retries 401s automatically
Internal callers (linkLogin, unlinkLogin, server-event, tryXhrRequest)
now use '[redacted]' directly. getOpenApiConfiguration() is kept as the
recommended API for manual fetch calls.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: adds links to deprecations
* docs: adds deprecation notices
* Auth: Deprecate getLatestToken(), clarify openid stub behavior
- Mark getLatestToken() as deprecated (always returns '[redacted]' with
cookie auth). Points to configureClient() and getOpenApiConfiguration().
- Inline '[redacted]' in internal callers (linkLogin, unlinkLogin,
server-event, tryXhrRequest) instead of going through getLatestToken().
- Update getOpenApiConfiguration().token to return '[redacted]' directly.
- Clarify external/openid deprecation header: data classes remain
functional, handler classes reject because the operations are no
longer possible with cookie-based auth.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: overrides options after applying defaults
* Auth: Supply keepUserLoggedIn from backend via HTML attribute
Instead of fetching keepUserLoggedIn asynchronously from the Management
API after authorization, the server now renders it as a boolean attribute
on <umb-app> from SecuritySettings. This eliminates the timing gap where
the access token could expire before the async preference was fetched,
causing 401s on API calls.
Chain: Index.cshtml → <umb-app keep-user-logged-in> → UmbAuthContext →
UmbAuthSessionTimeoutController. When true, the timeout controller
schedules based on accessTokenExpiresAt (proactive refresh) instead of
expiresAt (full session expiry).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Fix review findings — message storm, PKCE state, spread order
- Fix BroadcastChannel message storm: completeAuthorizationRequest
was calling #updateSession (which broadcasts sessionUpdate) AND
separately broadcasting 'authorized'. Other tabs receiving 'authorized'
called #updateSession again, cascading N² messages. Split into
#setSessionLocally (no broadcast) and #updateSession (broadcasts).
- Increase PKCE state from 10 to 32 characters for stronger CSRF nonce
(was ~59 bits, now ~190 bits of entropy).
- Fix tryXhrRequest spread order: ...options was last, allowing callers
to accidentally override baseUrl/token. Now baseUrl/token come last.
- Remove unused endSessionEndpoint from UmbAuthClientEndpoints interface
(signOut URL is constructed directly in auth.context.ts).
- Export UmbAuthSession interface for extension developers observing
session$.
- Add clarifying comments for: anonymous UmbApiInterceptorController in
configureClient, refresh_token server contract, Web Lock deduplication
edge case.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Fix review findings — redirect loop, popup leak, navigator.locks fallback
- Fix redirect loop after code exchange by using force=true navigation
so setInitialState() runs with fresh httpOnly cookies
- Clean up pending popup flows before starting new ones (prevents
pkceHandler/closedPoll leaks)
- Add navigator.locks fallback for environments without Web Locks
- Clear session on timeOut() to prevent stale in-memory state
- Make AuthorizationError constructor params optional (compat fix)
- Remove dead #previousAuthUrl field
- Add clarifying comments on configureClient and peer session timeout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: Wait for both auth and server contexts before initializing SignalR hub
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Use ifAvailable lock to prevent redundant token refresh across tabs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Add default Authorization header to umbHttpClient
The hey-api `auth` callback is only invoked when requests include
`security` metadata (which generated SDK functions do automatically).
Direct `.get()`/`.post()` calls lack this metadata, so the
Authorization header was silently omitted. Adding it as a default
header ensures all requests through umbHttpClient trigger the
server-side HideBackOfficeTokensHandler cookie swap.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Auth: Use exclusive lock with freshness check for token refresh
Replaces ifAvailable lock with an exclusive lock that queues tabs.
After acquiring the lock, isSessionValid() checks whether another tab
already refreshed — preventing sequential /token calls when timers
fire slightly offset.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(web): configure umbHttpClient baseUrl before server connection
Move auth context creation and configureClient() before
UmbServerConnection.connect() so that the generated SDK calls
(ServerService.getServerStatus/getServerConfiguration) have a
valid baseUrl on umbHttpClient.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(auth): use object reference comparison in token refresh lock
The isSessionValid() check inside the Web Lock used expiresAt (full
session lifetime), which incorrectly skipped proactive refreshes when
keepUserLoggedIn=true. The timeout controller fires based on
accessTokenExpiresAt, but the full session was still valid at that
point, so the refresh was silently skipped — eventually causing 401s.
Fix: capture the session object reference before entering the lock
queue. Inside the lock, compare references to detect whether another
tab broadcast a sessionUpdate while we were waiting. This correctly
deduplicates multi-tab refreshes while allowing proactive refreshes
to proceed.
Also fixes prettier formatting in UmbAuthClient constructor.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: do not assume that any endpoint is authenticated or accepts an Authorization header (this should come from the OpenAPI spec)
* E2E: QA: updated acceptance tests to match the authorization changes in #21830 (#22021)
Updated tests to the updated auth
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
* fix: compose user-supplied pickableFilter with internal filter in picker input contexts (#21859)
The openPicker method in UmbDocumentPickerInputContext, UmbMediaPickerInputContext,
and UmbMemberPickerInputContext unconditionally overwrites the user-supplied
pickableFilter with the internal implementation. This prevents package developers
from providing custom filtering logic (e.g., filtering out unpublished items).
The fix composes both filters using a logical AND: the internal filter runs first
(access checks, allowedContentTypes), and if it passes, the user-supplied filter
is also evaluated. This preserves the existing behavior while enabling extensibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: extract _composePickableFilters into base UmbPickerInputContext class
Move duplicated filter composition logic from document, media, and member
picker input contexts into a shared protected method on the parent class.
This reduces cyclomatic complexity in each openPicker override and
eliminates code duplication across the three picker contexts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Rename picker filter helper to _combinePickableFilters
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Added api helper for creating tiptap data type with media folder
* Added ui helper for remove image upload folder
* Updated ui helper for selecting media with name
* Added tests for selecting media link in multi url picker
* Added tests for media picker start node
* Added tests for image upload folder in tiptap data type
* Updated tests for user media start nodes
* Updated tests for user group media start nodes
* Make tests run in the pipeline
* Fixed comment
* Cleaned code
* Added tests for add multiple media start nodes to a user
* Reverted npm command
* Add CSP nonce support for inline scripts
* Add UseUmbracoCspNonceInjection middleware for NWebsec integration.
* Add unit tests for InjectNonceIntoDirective method.
* Add documented CSP rules to local website so any issues that conflict with these rules are surfaced in local development and testing.
* Test formatting.
* Addressed code review feedback.
* Use tag helper for nonce rendering.
* Apply suggestions from code review
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Move CspNonceInjectionOptions into it's own file.
* Reduce clutter in Program.cs in local web project, by moving use of documented CSP to an extension method.
* Trigger build
* Exclude CSP from template but keep in local project.
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Update server-side dependencies to latest patch or minor releases.
* Revert and comment upgrade to MailKit.
* Update Microsoft.NET.Test.Sdk to latest minor.
* Migration, model and repository data access for sorting via a sortable field.
Property editor sortable interface and implementation of JSON stored date fields.
* Add migration to populate sortable field for existing date property data.
* Added unit tests for GetSortableValue on datetime property editors.
* Fixed issues raised in code review.
* Re-use code in base from DocumentRepository to avoid additional call to SetEntitySortableValues.
* Move migration to 17.3.
* Fix merge issue.
* Move around migrations so they are in correct order
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
* Check whether picker is in a block. If so, act as with a new content node.
* re-use isNew flag to not increase complexity for the requestRoot function
* remove random whitespace added by visual studio
* remove ternary to reduce complexity
* move check to backend
* update fallback in SiteDynamicRootOriginFinder as well
* Revert "update fallback in SiteDynamicRootOriginFinder as well"
This reverts commit 0a14aa7393.
* Revert "move check to backend"
This reverts commit ca8b0c06da.
* get content workspace context - analogous to document-block-property-value-user-permission.workspace-context.ts. import interface for getIsNew().
* Use getContext.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* feat(content): add shared types and repository interface for audit log kind
Introduces UmbAuditLogTagData types, ManifestWorkspaceInfoAppAuditLogKind manifest
interface, and UmbAuditLogHistoryRepository extending the core audit log repository
with getTagStyleAndText() method.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(content): create shared audit log workspace info app element
Reusable element that receives manifest config with auditLogRepositoryAlias
and optional allowedActions. Uses UMB_ENTITY_WORKSPACE_CONTEXT for entity
unique resolution and createExtensionApiByAlias for repository lookup.
Includes reload event listener, pagination, and user avatar caching.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(content): add auditLog kind definition and manifest registration
Registers the 'auditLog' kind for 'workspaceInfoApp' extension type,
mapping to the shared element. Includes info-app and audit-log manifest
aggregators.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(documents,media): register audit log repos as extensions and add getTagStyleAndText
- Register UmbDocumentAuditLogRepository and UmbMediaAuditLogRepository as
extension manifests with type 'repository' and dedicated alias constants
- Add getTagStyleAndText() method to both repositories implementing the
UmbAuditLogHistoryRepository interface from content package
- Export audit-log types from @umbraco-cms/backoffice/content
- Deprecate getDocumentHistoryTagStyleAndText and getMediaHistoryTagStyleAndText
utility functions (scheduled for removal in Umbraco 19)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat(documents,media): switch audit log info apps to use shared auditLog kind
- Update document and media info-app manifests to use kind: 'auditLog'
with meta configuration (auditLogRepositoryAlias, allowedActions)
- Include repository manifests in document and media audit-log aggregators
- Wire audit-log kind manifests into the content package
- Deprecate UmbDocumentHistoryWorkspaceInfoAppElement and
UmbMediaHistoryWorkspaceInfoAppElement (scheduled for removal in Umbraco 19)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(documents,media): add `api` exports to audit log repositories
Required for the extension registry API loader pattern which expects
either a default or named 'api' export from the module.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Linting
* refactor(content): extract renderHistoryItem to reduce cyclomatic complexity
Splits the repeat callback out of #renderHistory into a dedicated
#renderHistoryItem method, reducing the method's cyclomatic complexity
below the threshold of 9.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(content): throw error when workspace entity unique is missing
Restores fail-fast behavior for missing entity unique in audit log
requests, matching the original document/media implementations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor(audit-log): move getTagStyleAndText to UmbAuditLogRepository as optional method
Removes UmbAuditLogHistoryRepository interface and adds optional
getTagStyleAndText() to UmbAuditLogRepository in core. Moves tag
types to core/audit-log and adds a default type parameter.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(audit-log): export repository alias constants from package entry points
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Linting and tidy-up
* Fixes canceled Rollback modal error
* Removed the `allowedActions` property
* feat(content): formalize `auditLogAction` extension type
Add proper TypeScript interfaces, default kind, and dedicated element
for the `auditLogAction` extension type, replacing the previous
untyped usage that relied on `ManifestEntityAction`.
- Define `ManifestAuditLogAction` and `MetaAuditLogAction` interfaces
- Create `umb-audit-log-action` element using `uui-button` (suited for
the audit log info-app header, unlike `uui-menu-item`)
- Register default and contentRollback kind manifests
- Move contentRollback audit-log-action kind to the content module
- Separate document-specific audit-log-action manifest into its own file
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Dispose event listener created in InMemoryAssemblyLoadContextManager.
* Use using to dispose ICryptoTransform in MemberPasswordHasher.
* Dispose CancellationTokenSource in DatabaseServerMessenger.
* Dispose deserialized JsonDocument in CacheInstructionService.
* Use try/finally to ensure dispose.
* quote table, column and alias names with SqlSyntaxProvider methods in raw sql
* refactoring private methods into new file as internal methods,
refactor new extensions into another file
* refactor GetAlias method
* Double check the change
* improve code health
* change new static classes into public static partial class NPocoSqlExtensions
* resolve some Copilot review suggestions
* revert Copilot suggestion because it decreases code health
* revert test
* compare in with LOWER, change two methods from private to protected in UmbracoDatabaseFactory
* revert Query.cs in this PR
* Refactor for code health and fixing raw sql
* divers small issues fixed
* refactor two methods to respect the DRY pricipal
* update IQuery interface
* clean up
* revert refactoring for CodeScene
* delete obsolete Test
* rename method
* remove new methods and updates, which are not relevat for this PR
* prepare for additional states in the future
* don't mix string building methods
* fix SQL injection danger
* fix test for reverted methods
* another SqlSyntax issue
* fix update
* fix reverted changes
* restore change for this PR
* restore change for this PR
* fix merge bug
* update formating
* extend ISqlSytax for database independent autoIkrement feature
* fix DTOs, extend ISqlSyntax
* fix tests
* revert
* updates
* diverse SqlSyntax and NPoco related updates for custom databse providers
* fix names
* squash merge v173/20453-DTO-attributes-fixed into v173/20453-final-sql-syntax-fixes
* merge
* add default implementation to interface
* fix tests
* fix PrimaryKey for multi columns
* test fix
* Resolve the issues with SqlSyntaxProvider for SQLite. If executed correctly, a single test would reveal the problem.
* add another test
* revert changes which causes even more issues
* fix SQL syntax
* fix column const naming
* ensure column const names from v17.2
* add comment for change
* Update src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeTemplateDto.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* resolve review comments
* Make ReferenceMemberName consistent across all DTOs (use constants defined on the referenced DTO).
* Ensure [ExplicitColumns] attribute exists on all DTOs.
* Ensure we consistently use PrimaryKeyColumnName over PrimaryKeyName.
* Fix further inconsistency to use only TemplateNodeIdColumnName.
* Fixed trailing whitespace.
* Restored primary key constraint name on ContentVersionCleanupPolicyDto (it doesn't seem in scope of PR to remove this).
* Removed the confusing PrimaryKeyColumnName constants for multi-column primary key DTOs where the constant refers to only one of the key columns.
* ReferenceMemberName needs to be a C# property name, so it's safer to use nameof.
* Comment fix.
* Amended accessibility modifiers.
* revert unnecessary changes
* revert unnecessary changes
* revert unnecessary changes
* fix SQLite escape variants
* fix typo
* simple (typo) fixes of Copilot review comments
* solve another Copilot review comment
* improve comments and minimise changes
* add an detailed change comment
* resolve review and revert all integration test. Tests changes will be done in the PostgreSqlProvider-npocp branch like some unit tests.
* remove InsertWithSpecialAutoIncrement()
* update WhereIn() for case sensitive databases
* fix special char in test comment
* throw exception for invalid values
* remove values type check
* add extra check
* resolve review comments
* revert more changes with question
* refine method SiblingsSql of EntityRepository, add another AndSelect() method overload to NPocoSqlExtensions.
* resolve review
* fix replacement
* trigger new pipeline build
* trigger new pipeline build
* Added comment explaining why withAlias: false is needed.
* Add additional tests around sibling retrieval.
* Add tests for the AndSelect overloads.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Content Rollback: Abstract document rollback into reusable entity action and modal kinds
Create shared `rollback` entity action kind and modal kind in the content package,
enabling reuse for upcoming entity types (e.g., Elements in v18). The document
rollback now uses these kinds via manifest meta, while old APIs are preserved
with @deprecated annotations for backward compatibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Content Rollback: Address PR review feedback
- Add validation for manifest meta in rollback modal element, throwing
descriptive errors if rollbackRepositoryAlias or detailRepositoryAlias
are not configured
- Remove non-null assertions in favor of validated manifest access
- Fix deprecated requestVersionByDocumentId to delegate through the
generic requestVersionById interface method
- Remove unused requestVersionByDocumentId deprecated method (original
method was requestVersionById, not requestVersionByDocumentId)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Renamed "rollback" to "contentRollback"
for class names and manifest kind.
* Content Rollback: Move repo aliases to entity action meta; remove modal kind
Move rollbackRepositoryAlias and detailRepositoryAlias from the modal
kind manifest meta to the entity action meta, passing them as modal
data. Remove the contentRollback modal kind entirely and register the
modal element directly. Introduce UMB_CONTENT_ROLLBACK_MODAL token so
the entity action no longer needs a configurable rollbackModalAlias.
Deprecate document-level modal constants in favor of content-level ones.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fixed linting errors
* eslint missed an export! 🤦
* refactor(backoffice): rename UMB_ENTITY_ACTION_ROLLBACK_KIND_MANIFEST to UMB_ENTITY_ACTION_CONTENT_ROLLBACK_KIND_MANIFEST
Address PR review feedback to include "Content" in the manifest constant name for consistency.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Create item endpoints that return ancestor IDs for a given collection of entity IDs.
* Return item models instead of just IDs.
* Use async methods.
* Use NamedItemResponseModel for container ancestor endpoints.
* Simplify the usage of ItemAncestorService - use less assumptions about structure and use generic mapping for basic response models.
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Optimize (memory usage, database storage, and processing time) document URL and alias cache for invariant documents.
Store invariant content with NULL languageId instead of duplicating records for each language.
* Additional integration tests verifying aspects of changed functionality.
* Implement and test that URLs and aliases are updated when a content type changes from variant to invariant or vice versa.
* Tidied up migration.
* Corrected file name.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Further updates from code review, resolved warnings.
* Use rebuild key defined in constant in migration.
* Handle possibility of custom URL providers generating different URL segments per culture.
* Resolve breaking change.
* Handling breaking change in DocumentUrlDto.
* Tidied up code comments
* Fix issue where URL aliases on variant content with a shared property were not being recorded.
* Tidy up comment.
* Fix breaking change in nullability.
* Fix breaking change in nullability (2).
* Revert "Fix breaking change in nullability (2)."
This reverts commit c77a37c855.
* Fix failing integration tests.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated ui helper for verify the file uploads
* Updated tests due to test helper changes
* Updated tests for block due to UI changes
* Added comment for the failing tests
* Added preview helper
* Added preview helpers
* Added preview tests
* Updates based on comments
* reinitialize the preview locators for the pop up preview page
* Cleaned up based on comments
* Update smokeTest command in package.json
* fix(core,api,web): fix backoffice UI errors on notification cancellation
- Fix ContentTypeServiceBase.DeleteAsync() to use PublishCancelableAsync
directly instead of delegating to the sync Delete() method, which
silently swallowed cancellation and always returned Success.
- Extract shared deletion logic into private PerformDelete() method
to keep both Delete() and DeleteAsync() DRY.
- Mark ProblemDetails with notificationsDeliveredViaHeader extension
when Umb-Notifications header carries event messages, preventing
the frontend from showing duplicate error toasts.
- Add notificationsDeliveredViaHeader to UmbProblemDetails type and
skip redundant ProblemDetails notification in try-execute controller.
- Add integration test for DeleteAsync cancellation detection.
* fix(core,api,web): fix backoffice UI errors on notification cancellation
- Fix ContentTypeServiceBase.DeleteAsync() to use PublishCancelableAsync
directly instead of delegating to the sync Delete() method, which
silently swallowed cancellation and always returned Success.
- Extract shared deletion logic into private PerformDelete() method
to keep both Delete() and DeleteAsync() DRY.
- Mark ProblemDetails with notificationsDeliveredViaHeader extension
when Umb-Notifications header carries event messages, preventing
the frontend from showing duplicate error toasts.
- Add notificationsDeliveredViaHeader to UmbProblemDetails type and
skip redundant ProblemDetails notification in try-execute controller.
- Add integration test for DeleteAsync cancellation detection.
fix: #12636
* fix(core): reduce PerformDelete arguments and trim LOC
Address CodeScene quality gate failures:
- Reduce PerformDelete from 5 to 4 parameters by resolving
EventMessages internally via EventMessagesFactory.Get()
- Trim lines of code to stay within the 1000 LOC threshold
* refactor(core): extract obsolete container methods into partial class
Split ContentTypeServiceBase into two partial class files to address
CodeScene's "Lines of Code in a Single File" quality gate (1007 > 1000).
The #region Containers block was chosen for extraction because all its
methods are already marked [Obsolete] and scheduled for removal in
Umbraco 18, replaced by IContentTypeContainerService and
IMediaTypeContainerService. The region is fully self-contained with no
inbound calls from the rest of the class.
This is a compile-time only change — partial classes produce identical
IL output. No public API, behavior, or binary compatibility impact.
* Revert "refactor(core): extract obsolete container methods into partial class"
This reverts commit 6fd8fd23f6.
* Pass eventMessages from the caller into PerformDelete instead of being re-obtaining from the factory.
* Use try/finally in test to ensure clean-up.
* Restore removed comments.
* Revert client-side updates.
* Revert client-side updates (2).
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add aria-label and name to search input for accessibility
- Add aria-label attribute to search input using localized placeholder text
- Add name attribute ("search-input") to provide form field identification
- Fixes Google Console warning about missing id/name on form field
- Improves WCAG 3.3.2 compliance (Labels or Instructions)
- Improves WCAG 2.5.3 compliance (Form input identifiable names)
Closes#2193
* Reused localized label
* Tidy-up/linting
---------
Co-authored-by: Emma L Garland <1649855+emmagarland@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Auto-generate HMAC secret key for imaging on new installs.
* Address code review feedback.
* Log results of configuration operations.
* Refactored to use the Attempt pattern.
* Allow custom folder types when creating from media picker.
* Adjust selector padding.
* Corrected call to await.
* Addressed feedback from code review.
* Set entity unique before scaffold processing to fix collection view for new media folders.
* Instead of moving setUnique() earlier in the provider, fix the consumers to observe the unique observable rather than reading synchronously.
* Addressed code review point on context observation.
* implement satisfies type check
* minor refactor
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Prevent save of partial view file when using runtime production mode, and verify for partial views and templates with integration tests.
* Display warning when templates and partial views are not editable in the backoffice.
* Share styles.
* Validate at the partial view API whether updates are allowed based on production runtime mode.
* Add similar checks for templates, handling case where metadata updates are allowed.
* Add integration tests for verifying behaviour in production mode.
* Fix the breaking changes on the constructor of the service classes.
* Use IOptions (we don't need live updates for this setting).
* Addressed code review feedback.
* Add IsProductionMode private property on both updated services.
* Move create template check to validate method.
* Remove entity actions create/delete/rename for templates and partial views whilst running in production mode.
* Addressed code review feedback.
* include server in condition name
* move tag to bottom right corner of workspace
* introduce info modal
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Tiptap Table: fix popover positioning for row and column grips
Refactored the table extension to use a proper container structure
and separate popovers for row and column context menus.
Key changes:
- Added UmbTableView with block container, inner table container,
widgets container, and overlay container structure
- Created TableHandlePlugin to manage grips and popovers centrally
- Changed from single shared popover to separate row and column
popovers, fixing the issue where column menu always appeared
at the first column position
- Updated CSS styles to support the new container structure
- Added proper cleanup when tables are removed from the editor
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Deprecates `UmbBubbleMenu` extension
No longer used internally.
There were issues with the popover and Tiptap editor state.
* Tiptap Table node-view refactor
* Exports `UmbTableView`
* Handles `mouseleave` event
* Adds readonly guard and dynamic grip offset for table handles
Prevents grips/popovers from appearing and dispatching transactions
when the editor is in readonly mode. Replaces hardcoded 16px container
offset with dynamic bounding rect computation to stay in sync with CSS.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Uses TableMap for cell indices instead of DOM child indexes
Resolves cell row/column via ProseMirror position resolution and
TableMap.findCell, which correctly handles merged cells (colspan/rowspan)
instead of relying on DOM child indexes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Improvement: Use `when` callback parameter in tiptap toolbar disabled button
Use the callback parameter from Lit's `when` directive instead of a
non-null assertion to access the icon value.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Feature: Add `actionButton` kind for tiptap toolbar extensions
Create a new `actionButton` kind that uses the disabled button element,
replacing manual `element` overrides in the Unlink, Undo, and Redo
toolbar manifests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Improvement: Add dedicated element for `actionButton` tiptap toolbar kind
Addresses review feedback by creating a proper `umb-tiptap-toolbar-button-action`
element for the `actionButton` kind instead of reusing the `-disabled` element.
- Uses `api.isDisabled()` for the disabled state (not `!isActive`)
- Types manifest correctly via generic on base class
- Makes base `UmbTiptapToolbarButtonElement` generic so subclasses can
specify their manifest kind
- Deprecates `umb-tiptap-toolbar-button-disabled` (scheduled for removal in v19)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Improvement: Add base API class for `actionButton` toolbar extensions
Introduces UmbTiptapToolbarActionButtonApiBase with a default isDisabled
implementation that returns !isActive(editor), so third-party extensions
get meaningful disabled state without needing to override isDisabled.
Updates undo, redo, and unlink APIs to use the new base class, removing
their redundant isDisabled overrides. Adds a comment explaining the
implicit re-render dependency in the action button element.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* fix(media): display filename in upload field preview
Add visible filename text to the file and image upload field preview
components. Previously, the file preview only showed an icon and the
image preview only used the filename as invisible alt text.
The filename is extracted from the File object when available (blob
URLs during upload), falling back to the last path segment for
persisted server paths.
Closes#21587
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(media): display filename in audio, video, and SVG upload previews
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(media): move filename display to parent upload field with file-info bar
Move filename rendering from 5 individual preview components into the
parent input-upload-field element. The filename and remove action now
share a bordered bar below the preview. Filename is plain text during
upload (blob URL) and a clickable link to the file when saved.
Reverts preview components to their original state (preview only).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* style updates
* link style adjustment
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Add support for running website without backoffice.
* Add support for running delivery API without website or backoffice.
* Reverted unncessary idempotent checks on individual builder extensions.
* Integration tests for service registrations.
* Integration HTTP tests for service registrations.
* Tidy up and code review feedback.
* Remove unnecessary null check.
* Ensure models builder references are added to attempt to resolve the deliver API setup.
* Allow folder selection in media entity picker
* Also handle user and user group media root node picker.
* Allow file selection for users and user groups, fixing failing E2E test.
* Changed media start nodes for user/user group to select folders only
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Add support for member sorting by member type.
* Make the backoffice member table sortable by the supported fields.
* Sort member groups by name.
* Fixed linting issue.
* Use UmbDirection for sort direction
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Fix missing <title> attribute for Icons in document types in backoffice
* Move the title attribute to uui-button from umb-icon.
* Removed color option from lable and title. Added prefix "Change icon:" in the title. Prefix managed from the localization.
* Improve icon tooltip accessibility and i18n in content type header
- Add defensive check in #iconTitle to avoid "undefined" text when icon is unset
- Move colon separator from translation strings to component template
- Use consistent label for both title and aria-label on icon button
- Add Spanish and Italian translations for changeIcon key
* Fix failing test by using an exact match for a label.
---------
Co-authored-by: Pasang Tamang <45009265+pasangtamang@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Document Types returns a list of allowed parent keys
* Media types included
* Add selectable filter for duplicate action based on allowed parents.
* Add optional selectable filter provider support to move action.
* Add selectable filter provider for move action in documents.
* Add selectable filter provider for move action on media.
* Optimize filter providers by using allowedAsRoot property directly.
* Refactor document move action to use repository for selectable filter.
* Move media filter logic from provider to repository .
* Centralize allowed-parent logic in data sources.
* Remove document item lookup from duplicate action.
* Simplify custom filter assignment in move action.
* Remove unused import.
* Rename getSelectableFilter method in document duplicate action..
* Refactor move to action for documents.
* Refactor of media move to action.
* Refactor duplicate action and remove unused imports.
* Clean up.
* Use .js extension for media tree type import
* Export move action and fix imports.
* add interfaces for type safety
* local implementations
* make linter happy
* make linter happy
* Filter out current node in MoveTo action
* Return error instead of throwing on fetch
* Use typed getters for structure data sources
* remove unused
* Add UmbTreeItemModel typing to move-to actions
* align paramater naming
* Defer move repository lookup until after modal
* Fetch type data concurrently with Promise.all
---------
Co-authored-by: NillasKA <kramernicklas@gmail.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Dont blow up GetTestOptions when inside testfixtures
* Dont blow up Reference resolving when working with proxies
* Improve GetAssemblyFolders nullability
* More verbosity
* Messy implementation of documenttypes and datatypes
* Formatting and move service injection to constructor
* cleanup and bubble up new constructor
* Allow folder or item only searches
* feedback pr & subsequent refactoring
* Apply review suggestions
* Update openapi file
* Used constant, resolved minor layout warnings.
* Fix parent key lookup in tree search to check both folders and items.
* Remove TreeItemKind.None from flags enum.
* Add TODOs for removing the default implementation on the interfaces.
* Add permission integration tests.
* Update OpenApi.json.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Skip empty strings in repeatable textstring validation and persistence.
* Override RequiredValidator for repeatable textstring to treat all-empty arrays as no value.
* Updated ui helper for add block list button
* Make AllowEditInvariantFromNonDefaultIsTrue tests run in the pipeline
* Removed .skip since the issue is resolved
* Fixed tests for submit an empty URL in RTE property
* Make TiptapToolbar tests run in the pipeline
* Reverted npm command
* Claude's suggestions
* Rewrite for tags based hybrid cache eviction and optimize the converted, in-memory cache eviction
* Replicate cache invalidation/flushing optimizations for the media cache service
* Do not perform Examine re-indexing for "other" changes on content types
* Clean up TODOs
* Use configured batch size for indexing, and use cached structure for checking publish status
* Default implementations of new interface methods to prevent breaking changes
* Clean out more TODOs
* Refactor logic to extension methods
* Add missing notification handlers to cache tests
* Add additional test coverage.
* Remove OnChange from settings for transient notification handler.
* Adds a migration to clear the hybrid cache to ensure all items are tagged by content type.
* Clear all converted content on type change in auto models builder mode.
* Apply the same fix for data type updates.
* Apply the same fix for data type updates (2).
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Changed the modal size to medium data type picker modals.
* Updated the icon and label alignment so that icon always align vertically top and label in each starts from same position.
* Linting
* Adds `justify-items: center` for "Create new" button icon
---------
Co-authored-by: Pasang Tamang <45009265+pasangtamang@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Add pagination to the member group picker.
* Linting
...and use of `when` directive ;-)
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Move testhelpers and builder into the acceptance test project
* Updated imports in tests
* Updated readme
* Updated postinstall to exclude setting up config
* added a cleanup when npm packing
* update tsconfig path mapping to @umbraco/acceptance-test-helpers
* Added dist to git ignore
* Adds separate README files for npm and GitHub
README.md: contributor-focused (test docs)
README.npm.md: consumer-focused (package docs)
cleanse-pkg.js swaps them during npm pack
* Updated to swap READMEs on npm pack. So the consumer README is the one being released
* Add npm publish pipeline for @umbraco/acceptance-test-helpers
* Configure package.json for npm publishing as @umbraco/acceptance-test-helpers
* Updated missing imports
* Cherrypicked helper changes
* Updated tests
* Updated name of builder
* added tslib
* Fixed test
* Renamed
* Add nbgv version step for test helpers npm package
* Fixes based on comments
* More fixes
* Removed unnecessary imports
* Fix naming of storage_state_path
* Added recommend for storage state
* Create console file if not present
* simpler and more consistent css for block list and block single
* adjust spacing only for default views
* adjust inline and support for Block Grid
* simplify gap css for Grid Entries
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Create new folder on enter in media picker
* Move CSS properties and change value for placeholder.
* Add localization key for labels and placeholder.
---------
Co-authored-by: Emma L Garland <emmagarland77@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Adding CPM into Umbraco Project
* Adding CPM for UmbracoExtension
* remove CPM from umbraco templates
* remove change from readme
* update readme for umbracoproject
* Adding CPM options to Umbraco Project and Umbraco Templates
* update name param
* make central to default option
* Update templates/UmbracoExtension/Umbraco.Extension.csproj
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update templates/UmbracoExtension/.template.config/template.json
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update templates/UmbracoProject/.template.config/template.json
Co-authored-by: Andy Butland <abutland73@gmail.com>
* add PackageManagement into Visual studio display
* Apply suggestions from code review
* Fix ascii art and typo.
* Remove trailing commas in template.json files.
* Aligned casing and grammar between package management choices.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Cleaned up
* Make ScheduledPublishing tests run in the pipeline
* Updated npm command
* Increased timeout
* Updated npm command
* Addec console log to test in the pipeline
* Make tests run in the pipeline
* Removed step to verify that the document is published since it doesn't work in the pipeline - only works locally
* Update npm command
* Fixed tests
* Fixed comments
* Removed unnecessary comments
* Revert npm command
---------
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
* Ensure local cache instructions count towards last synced ID
* Add obsoletion message to the interface.
* Fixed failing integration tests, then refactored them so they call and test the non-obsolete method.
* Rework the solution to retain existing functionality
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Show correct URLs for invariant content under non-default language domains.
* Use configured domain hosts instead of request host for fallback URL filtering.
* Addressed feedback from code review.
* Fixed code warnings.
* Update file references in integration test csproj.
* Simplify invariant URL culture filtering by determining cultures upfront
Instead of querying all cultures and post-processing to remove irrelevant
URLs, determine the relevant cultures before the loop by checking which
domains are assigned to the content's ancestor path.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Show correct URLs for invariant content under non-default language domains.
* Use configured domain hosts instead of request host for fallback URL filtering.
* Addressed feedback from code review.
* Fixed code warnings.
* Update file references in integration test csproj.
* Simplify invariant URL culture filtering by determining cultures upfront
Instead of querying all cultures and post-processing to remove irrelevant
URLs, determine the relevant cultures before the loop by checking which
domains are assigned to the content's ancestor path.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Update GetContentSchedulesByIds to retrieve data in groups to avoid overrunning the SQL parameter count.
* Protect against duplicate retrieval if duplicate IDs are provided.
Removed explicit 260-character path length checks from PhysicalFileSystem.GetFullPath and deleted associated unit tests. Updated tests to focus on path normalization and validity, and improved path assertions for clarity and cross-platform compatibility. No longer enforce or test for legacy Windows path length restrictions.
* Add data-source package and integrate in input-entity-data
* Add optional description to collection items
* introduce extension picker data source
* fix problem with shallow copy because of js module in object
* nest manifest data
* Hide pagination when all items are shown
* Add a fallback page size
* merge extension insight code with extension code
* clean up
* Add optional description support to default item ref
* Revert "Add data-source package and integrate in input-entity-data"
This reverts commit e02881e8b6.
* fix post merge
* add input-extension utilizing input-entity-data
* proxy value and selection
* add todo
* temp hardcode config
* add typed config model
* Support multiple extension types in filters
* Use extensionTypes filter and deprecate type
Standardize extension collection filtering by introducing extensionTypes and phasing out the old type field.
* More explicit type name
* Expose allowedExtensionTypes as a @property on UmbInputExtensionElement
* Add text filter support for entity data picker
* remove reexport as this is not public available
* remove unused
* clean up
* clean up
* Add storage and getter for allowedExtensionTypes
* Inline collection view alias and remove constant
* Update vite.config.ts
* Update manifests.ts
* Update extension.picker-data-source.ts
* add tests for extension picker data source
* change to an observable feature config
* make feature object optional
* add unit tests
* Reference condition class directly in manifests
* clean up observers if data source type changes
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* UmbracoExtension template: Use runtimeConfigPath for automatic auth
Use hey-api's runtimeConfigPath to pre-configure the generated client
by copying umbHttpClient's config (baseUrl, credentials, auth) at
initialization time. This eliminates the need for entrypoint auth setup
via consumeContext/getOpenApiConfiguration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: updates extension with newly generated SDK files
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Keep track of rebuilding in memory
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Remove comment
* Revert back to original with lock
* Apply suggestion from @Zeegaan
* Remove unused
* Adress review comments
* Improve in-memory rebuild tracking for index rebuilder.
* Add cross-server rebuild status tracking via ILongRunningOperationService.
* Ensure index is used in operations, to allow rebuild of different indexes concurrently.
* Use Task.Delay.
* Resolve breaking change in constructor.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add data-source package and integrate in input-entity-data
* Add optional description to collection items
* introduce extension picker data source
* fix problem with shallow copy because of js module in object
* nest manifest data
* Hide pagination when all items are shown
* Add a fallback page size
* merge extension insight code with extension code
* clean up
* Add optional description support to default item ref
* Revert "Add data-source package and integrate in input-entity-data"
This reverts commit e02881e8b6.
* fix post merge
* add input-extension utilizing input-entity-data
* proxy value and selection
* add todo
* temp hardcode config
* add typed config model
* Support multiple extension types in filters
* Use extensionTypes filter and deprecate type
Standardize extension collection filtering by introducing extensionTypes and phasing out the old type field.
* More explicit type name
* Expose allowedExtensionTypes as a @property on UmbInputExtensionElement
* remove reexport as this is not public available
* remove unused
* clean up
* clean up
* Add storage and getter for allowedExtensionTypes
* Inline collection view alias and remove constant
* Update vite.config.ts
* Update manifests.ts
* Update extension.picker-data-source.ts
* add tests for extension picker data source
The touchstart handler on the image cropper focus setter needs to call
preventDefault() to prevent scrolling during focal point drag. Use Lit's
@eventOptions({ passive: false }) decorator to explicitly declare this,
resolving the browser warning about non-passive event listeners.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* For indexing in the RTE, replace all HTML tags with spaces to make sure wqord boundaries are preserved. Closes#21778
* Trim the returned string and adjust test cases to match new expected output #21778
* Address review comments:
- Updated XML docs
- Removed trimming in unit tests
- Moved HTML strip implementation to an extensions method
* Removed redundant regexes
* Address comment formatting
* Address failed tests by not replacing multiple characters if the replacement is String.Empty to preserve existing behavior
* Remove unnecessary partial and using.
* Add tests for introduced overload of StripHtml, fix found issues with replacement regex, then optimised by removing second regex and replaced with string operations.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix umbracoUrlName not working on multi sites
* update documentUrlServiceTests
* Use "is false" for false comparison
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* test: add comprehensive test coverage for BlockEditorVarianceHandler
- Add tests for AlignPropertyVarianceAsync method (collection alignment)
- Add tests for AlignedExposeVarianceAsync method
- Add edge case tests for segment variations
- Add tests for multiple items and deduplication scenarios
- Remove TODO comment
Fixes#21706
* refactor: reduce code duplication in BlockEditorVarianceHandler tests
- Add CreateBlockListValue helper method to eliminate repeated setup code
- Remove redundant test cases to reduce duplication
- Consolidate similar tests while maintaining essential coverage
Fixes code duplication issues reported in PR #21706
* fix: correct assertion in AlignPropertyVarianceAsync_Removes_NonDefault_Culture_Values test
When culture variance is disabled (ContentVariation.Nothing), the culture
should be set to null, not preserved. This matches the behavior tested in
Removes_Default_Culture_When_Culture_Variance_Is_Disabled test.
* fix: always deduplicate expose entries in AlignExposeVariance
Deduplication should always occur at the end of AlignExposeVariance,
even when no alignment is needed. This ensures duplicate expose entries
are removed regardless of whether variance alignment occurred.
* fix: remove expose entries when ContentData is missing
Expose entries that don't have matching ContentData should be removed
from the expose list. This ensures data consistency and prevents orphaned
expose entries.
* test: add 8 additional test cases for BlockEditorVarianceHandler
Adds comprehensive test coverage for:
- Culture assignment scenarios
- Segment variation handling
- Multiple ContentData items
- Edge cases (missing element types, no matching expose)
- Variation matching scenarios
* refactor: eliminate code duplication in BlockEditorVarianceHandler tests
Extract common test patterns into helper methods:
- CreatePropertyValues: Creates property values from configuration tuples
- CreateBlockPropertyValues: Creates block property values with alias/culture/segment
- CreateBlockItemVariations: Creates block item variations from tuples
- ExecuteAlignPropertyVarianceAsync: Executes AlignPropertyVarianceAsync with common setup
- ExecuteAlignedExposeVarianceAsync: Executes AlignedExposeVarianceAsync with common setup
- ExecuteAlignExposeVariance: Executes AlignExposeVariance with common setup
- SetupAlignedExposeTest: Sets up test data for AlignedExposeVarianceAsync tests
This eliminates copy-pasted code patterns across multiple test methods.
* refactor: eliminate duplication in AlignedPropertyVarianceAsync tests
Extract common test setup into ExecuteAlignedPropertyVarianceAsync helper method.
This eliminates duplication in:
- Assigns_Default_Culture_When_Culture_Variance_Is_Enabled
- Removes_Default_Culture_When_Culture_Variance_Is_Disabled
- Ignores_NonDefault_Culture_When_Culture_Variance_Is_Disabled
- AlignedPropertyVarianceAsync_Returns_As_Is_When_Variation_Matches
* fix: add missing using statements for Task, IList, IEnumerable, Func
* fix: correct Assert.ThrowsAsync usage - await the task when accessing exception
* fix: await Assert.ThrowsAsync directly to get exception
* remove: AlignPropertyVarianceAsync_Throws_When_PropertyType_Is_Null test
* fix: mock should return null for unknown content types in AlignExposeVariance test
* Revert production code changes - keep only test additions
* Remove bug-fix verification tests - moved to PR #21801
* refactor: consistently use CreateBlockListValue helper in all tests
* test: restore AlignExpose_Can_Handle_Variant_Element_Type_With_All_Invariant_Block_Values test
* docs: clarify why mock returns null for unknown content types
* refactor: use configuration class to reduce argument count in CreateBlockPropertyValues
* fix: add missing closing brace for Assert.Multiple block
* fix: remove leftover merge conflict marker
* fix: remove duplicate method definitions
* Remove unused code and usings. Encapulate BlockPropertyValueConfig. Fix code warnings.
* Standardise test naming, order of methods and use of Assert.Multiple.
* Complete test coverage with additional tests for AlignedExposeVarianceAsync.
---------
Co-authored-by: root <root@dragon.second>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Ensure document status shown in the Infor workspace view is up to date after unpublish and save/publish operations.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Further feedback from code review.
* Fix false-positive pending changes after save and publish by ensuring the property value preset builder reconstructs objects with the same property key order.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Add media navigation support to PublishedContentQuery
Introduced IMediaNavigationQueryService as a dependency and updated constructors to resolve it. Refactored ItemsAtRoot to accept a navigation query service, enabling MediaAtRoot to retrieve root media items via navigation queries. ContentAtRoot and MediaAtRoot now use the appropriate navigation query service for root item retrieval.
* Add IMediaNavigationQueryService support to content query
Extended PublishedContentQuery and ContentFinderByConfigured404 to accept and use IMediaNavigationQueryService alongside IDocumentNavigationQueryService. Updated constructors and service registrations to ensure both navigation services are available for enhanced content and media navigation scenarios.
* Add obsolete constuctors and expand PublishedContentQuery tests
Introduce [Obsolete] constructor overloads for PublishedContentQuery and ContentFinderByConfigured404 to support legacy usage, scheduled for removal in Umbraco 19. Refactor ItemsAtRoot for clarity. Significantly expand PublishedContentQueryTests with comprehensive unit tests covering constructor validation, Content/Media overloads, root item retrieval, and search functionality, including paging, ordering, and culture context. Add test helpers and mocks to improve test coverage and reliability.
* Fixes to constructor overloads.
* Re-organise tests into unit and integration (so the former, that don't need integration setup, will run more quickly).
* Remove low value integration tests.
---------
Co-authored-by: Fabian Beier <Fabian.Beier@aa-g.de>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* refactor to use the collection item extension point
* Add actions slot to media collection item card
* Set actions slot button background in media card
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/collection/media-collection.context.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix GUID read repository cache key collision with int-keyed repositories.
* Remove GUID read repository for templates.
* Ensure GUID read repository cache keys are invalidated.
* Further optimisation of by GUD GetAll reads.
* Move default repository cache timespan to a centralised constant.
* Further use of centralised constant.
* Add GetGuidKey<T>(Guid id) and update callers to use it.
* Ensure package migration steps only run once by moving the override of IgnoreCurrentState to true to the derived AutomaticPackageMigrationPlan, where it's needed.
* Add integration test to verify the fix.
* Fix failing integration test (the test migration plans were leaking outside of the new test, and being picked up by the DI container for other tests.
Fix EntityTypeContainerService.UpdateAsync using wrong AuditType
UpdateAsync was logging AuditType.New instead of AuditType.Save,
causing container update operations to be recorded as creations
in the audit log.
* Be explicit about creating foreign key constrains with check (already the default).
* Add a migration to attempt to ensure that all constrains a trusted.
* Updated name of migration class.
* Ensure long timeout for migration.
* Update BulkInsertRecordsSqlServer to use SqlBulkCopyOptions.CheckConstraints and verify that no untrusted constraints remain afterward.
* Ensure NPoco InsertBulk uses SqlBulkCopyOptions.CheckConstraints by introducing UmbracoSqlServerDatabaseType (subclass of SqlServer2012DatabaseType) that overrides InsertBulk to pass SqlBulkCopyOptions.CheckConstraints.
* Also handle InsertBulkAsync.
* Fix GetPermissionsAsync to use path-based permission inheritance
GetPermissionsAsync was querying only explicit per-node permissions,
ignoring the ancestor-based inheritance model. Nodes without explicit
permissions would get group defaults instead of inheriting from their
nearest ancestor with explicit permissions. This caused tree filtering
to hide child nodes that should have been visible.
Replace per-node permission queries with GetPermissionsForPath which
walks the entity path to resolve inherited permissions correctly. Also
pass object types through to enable batched entity lookups.
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Optimise GetPermissionsAsync.
* Add benchmark test.
* Add benchmark test.
* Add integration tests for default and isolated permission resolution
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Make the Delivery API "access" attributes public
* Update src/Umbraco.Cms.Api.Delivery/Filters/DeliveryApiAccessAttribute.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Cms.Api.Delivery/Filters/DeliveryApiMediaAccessAttribute.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Also make the VersionedDeliveryApiRouteAttribute public
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* quote table, column and alias names with SqlSyntaxProvider methods in raw sql
* refactoring private methods into new file as internal methods,
refactor new extensions into another file
* refactor GetAlias method
* Double check the change
* improve code health
* change new static classes into public static partial class NPocoSqlExtensions
* resolve some Copilot review suggestions
* revert Copilot suggestion because it decreases code health
* revert test
* compare in with LOWER, change two methods from private to protected in UmbracoDatabaseFactory
* revert Query.cs in this PR
* Refactor for code health and fixing raw sql
* divers small issues fixed
* refactor two methods to respect the DRY pricipal
* update IQuery interface
* clean up
* revert refactoring for CodeScene
* delete obsolete Test
* rename method
* remove new methods and updates, which are not relevat for this PR
* prepare for additional states in the future
* don't mix string building methods
* fix SQL injection danger
* fix test for reverted methods
* another SqlSyntax issue
* fix update
* fix reverted changes
* restore change for this PR
* restore change for this PR
* fix merge bug
* update formating
* extend ISqlSytax for database independent autoIkrement feature
* fix DTOs, extend ISqlSyntax
* fix tests
* revert
* updates
* diverse SqlSyntax and NPoco related updates for custom databse providers
* fix names
* fix PrimaryKey for multi columns
* Resolve the issues with SqlSyntaxProvider for SQLite. If executed correctly, a single test would reveal the problem.
* add another test
* revert changes which causes even more issues
* fix column const naming
* ensure column const names from v17.2
* add comment for change
* Update src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeTemplateDto.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* resolve review comments
* Make ReferenceMemberName consistent across all DTOs (use constants defined on the referenced DTO).
* Ensure [ExplicitColumns] attribute exists on all DTOs.
* Ensure we consistently use PrimaryKeyColumnName over PrimaryKeyName.
* Fix further inconsistency to use only TemplateNodeIdColumnName.
* Fixed trailing whitespace.
* Restored primary key constraint name on ContentVersionCleanupPolicyDto (it doesn't seem in scope of PR to remove this).
* Removed the confusing PrimaryKeyColumnName constants for multi-column primary key DTOs where the constant refers to only one of the key columns.
* ReferenceMemberName needs to be a C# property name, so it's safer to use nameof.
* Comment fix.
* Amended accessibility modifiers.
* Fixed/tidied comments.
* Fixed references from UserGroupDto.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix: adds a title to the first entity action in the entity actions bundle, otherwise you do not know what it does, unless the icon is very descriptive
* calculate the label once
* concatenate data-mark string better
* Show character count and instant exceed validation.
* Show character count for textarea editor.
* Add character-count utility and use in editors.
* Rename char count state, add tests, fix imports.
* Update textbox character messages in locales.
* Apply suggestions from code review
* Align textarea and textbox in use of #getMaxLengthMessage private helper function.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix(manifest): replace %CACHE_BUSTER% token in extension paths served by manifest API
Move cache buster replacement to the presentation layer (manifest controllers)
instead of the infrastructure service. The importmap replacement stays in
HtmlHelperBackOfficeExtensions where it was already handled.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Ordered usings.
* Add unit test for cache buster token replacement.
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix ambiguous controller constructors.
* Make ReplaceCacheBusterTokens void since it mutates in-place.
* Defensively code against special characters in the cache buster hash.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Imaging: Add format parameter to thumbnail component with webp default
Adds a format parameter to the imaging resize API endpoint and the
umb-imaging-thumbnail component. The component defaults to 'webp' format
for optimal browser support and smaller file sizes.
This ensures that non-image file types (like PDFs) that have custom image
providers can render thumbnails correctly by explicitly requesting an
output format instead of relying on the original file extension.
Changes:
- Add format query parameter to ResizeImagingController
- Pass format through IReziseImageUrlFactory to ImageUrlGenerationOptions
- Add format property to UmbImagingResizeModel TypeScript type
- Add format property to umb-imaging-thumbnail element (default: 'webp')
https://claude.ai/code/session_01GP7N2iTashrG1cBdYVSW97
* Imaging: Include format in cache key generation
Fix cache key to include the format parameter so that different format
requests with identical dimensions are cached separately.
https://claude.ai/code/session_01GP7N2iTashrG1cBdYVSW97
* Imaging: Refactor to use ImageResizeOptions record
Introduces ImageResizeOptions record to encapsulate resize parameters,
addressing CodeScene's "Excess Number of Function Arguments" warning.
Changes:
- Add ImageResizeOptions record with Height, Width, Mode, Format properties
- Add new CreateUrlSets overload accepting ImageResizeOptions
- Mark old CreateUrlSets overload as obsolete (removal in v19)
- Update controller to use new options pattern
https://claude.ai/code/session_01GP7N2iTashrG1cBdYVSW97
* Imaging: Add explicit obsolete method to satisfy API compatibility
The API compatibility checker requires the method to exist explicitly
in the implementation, not just via default interface method.
Co-Authored-By: Claude <noreply@anthropic.com>
* Imaging: Add unit tests for imaging store format parameter
Tests verify that:
- Different formats are cached separately (webp vs png)
- Crops with and without format are cached separately
- Cache operations work correctly with format parameter
Co-Authored-By: Claude <noreply@anthropic.com>
* Add API compatibility suppression for resize imaging endpoint
Suppress CP0002 for adding optional 'format' parameter to the resize
imaging controller endpoint. The HTTP API remains backward compatible
as existing clients simply won't send the new parameter.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fix API compatibility for IReziseImageUrlFactory
Restructure interface to maintain binary compatibility:
- Keep original 4-parameter method as required (marked obsolete)
- Add new ImageResizeOptions overload with default implementation
- Factory overrides new method to properly handle format parameter
This allows existing implementations to continue working while
new code uses the ImageResizeOptions overload with format support.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore(api): regenerate API compatibility suppression file
Regenerated the CompatibilitySuppressions.xml file with proper metadata
to suppress the breaking change detection for the optional format parameter
added to ResizeImagingController.Urls method. This change is backward
compatible at the HTTP API level.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat(imaging): automatic format conversion for non-image files
Move format conversion logic from frontend to backend IImageUrlGenerator
implementations to handle format defaults intelligently based on source
file types.
Why Backend Should Handle This:
1. **Source-aware decisions**: Backend has access to source file extension
and can determine if it's a true image (jpg, png) or processable
non-image (pdf with plugin)
2. **Consistent behavior**: All consumers (backoffice, APIs, custom code)
get consistent format handling without duplicating logic
3. **Plugin compatibility**: When ImageSharp plugins add support for new
file types (e.g., PDF thumbnails), the system automatically converts
them to web-compatible image formats
4. **User override preserved**: Explicit format parameter still works as
an override, giving users control when needed
Changes:
- Add Format property to ImageUrlGenerationOptions for explicit format requests
- ImageSharp implementations auto-detect non-image files and default to WebP
- ReziseImageUrlFactory passes format directly instead of via FurtherOptions
- Frontend imaging-thumbnail component removes hardcoded format='webp' default
- Backend now handles: format override > auto-detect non-images > keep original
Example Scenarios:
- JPEG → No format added (keeps JPEG)
- PNG → No format added (keeps PNG)
- PDF (with plugin) → Auto-adds format=webp
- Any file + explicit format param → Uses specified format
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(imaging): improve robustness and code quality
Address code review feedback with three improvements:
1. Add URI parsing error handling to prevent UriFormatException crashes
when malformed URLs are passed to RequiresFormatConversion()
2. Extract magic string array to class-level constant (TrueImageFormats)
to eliminate duplication and provide single source of truth
3. Remove inconsistent default interface implementation that didn't pass
format parameter, forcing concrete implementations to handle it properly
All changes maintain backward compatibility and improve code safety.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* refactor(imaging): move format determination to factory layer
Refactors format conversion logic from ImageSharp implementations to the factory layer for better separation of concerns and maintainability.
Changes:
- Add ContentImagingSettings.TrueImageFormats configuration (native image formats)
- Move format determination logic to ReziseImageUrlFactory.DetermineOutputFormat()
- Simplify ImageSharp v1 & v2 generators (remove duplicate RequiresFormatConversion())
- Add backward-compatible obsolete constructor to ReziseImageUrlFactory
- Add 50 comprehensive unit tests for format determination and configuration
Benefits:
- Single Responsibility: ImageSharp generators only generate URLs, don't make business decisions
- DRY: Eliminated 70+ lines of duplicated code between ImageSharp packages
- Configurable: TrueImageFormats setting allows customization
- Testable: Format logic tested independently of ImageSharp
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* refactor(imaging): repurpose ImageFileTypes for native format determination
Repurposes the existing unused ContentImagingSettings.ImageFileTypes setting instead of adding a new TrueImageFormats property. This provides better configuration control and eliminates the need for a new setting.
Changes:
- Repurpose ContentImagingSettings.ImageFileTypes (was unused, now active)
- Update ReziseImageUrlFactory to use ImageFileTypes for format determination
- Update TemporaryFileConfigurationPresentationFactory to use config instead of IImageUrlGenerator
- Add comprehensive XML documentation explaining usage in factory layer and backoffice UI
- Update all tests to reference ImageFileTypes
Benefits:
- No new configuration property needed (reuses existing setting)
- Frontend gets configurable format list instead of dynamic ImageSharp formats
- Better separation of concerns (config determines behavior, not infrastructure)
- Clearer documentation of where and how the setting is used
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test(core): remove duplicate test methods in ContentImagingSettingsTests
Removed duplicate test methods that were causing compilation errors:
- ImageFileTypes_DefaultValue_ContainsExpectedFormats (duplicate)
- ImageFileTypes_DefaultValue_MatchesStaticConstant (duplicate)
- ImageFileTypes_CanBeConfigured_WithCustomFormats (duplicate with incorrect test data)
- Contradicting assertion in StaticConstants_HaveExpectedValues
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(api): suppress CP0006 for IReziseImageUrlFactory.CreateUrlSets overload
Added API compatibility suppression for the new CreateUrlSets overload that
accepts ImageResizeOptions parameter. This change is backward compatible as the
concrete implementation already has both methods and the old method is marked
obsolete to guide users.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fixes merge conflict
* formatting
* fix(api): suppress CP0002 for TemporaryFileConfigurationPresentationFactory constructor change
Added suppression for constructor signature change where IImageUrlGenerator
parameter was replaced with IOptionsSnapshot<ContentImagingSettings> to get
ImageFileTypes directly from configuration instead of from the image URL
generator.
This change is part of the WebP thumbnail feature and aligns with getting
native format information from ContentImagingSettings configuration.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(api): maintain backward compatibility for TemporaryFileConfigurationPresentationFactory constructor
Instead of suppressing the CP0002 error, added back the old constructor marked
as [Obsolete] that chains to the new one. The old constructor:
- Accepts the original parameters (ContentSettings, RuntimeSettings, IImageUrlGenerator)
- Ignores the IImageUrlGenerator parameter (kept only for backward compatibility)
- Uses StaticServiceProvider to get ContentImagingSettings
- Chains to the new constructor
This maintains full backward compatibility while migrating to the new approach
where ImageFileTypes comes directly from ContentImagingSettings configuration.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test(core): update StaticConstants_HaveExpectedValues test to match actual constant value
The test was checking for format order 'jpg,jpeg,png,gif,webp,bmp,tif,tiff' but
the actual constant StaticImageFileTypes is 'jpeg,jpg,gif,bmp,png,tiff,tif,webp'.
Updated the test to match the actual constant value.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(api): resolve constructor ambiguity in TemporaryFileConfigurationPresentationFactory
Add [ActivatorUtilitiesConstructor] attribute to the new constructor to explicitly
indicate which constructor the DI container should use when both constructors have
the same number of parameters.
This fixes the "ambiguous constructors" error that was preventing the OpenAPI
contract test from running.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: adds parameter even though it is unused to help the DI system figure out which constructor to use
* test(api): update ReziseImageUrlFactory test to reflect corrected query string handling
The implementation was fixed to correctly handle URLs with query strings by
stripping the query string before extracting the file extension. Updated the
test expectations to verify that PDFs with query strings are now processed
correctly and converted to WebP format, rather than returning empty results.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* chore: adds double obsolete constructor to stay persistent and be able to use only new constructor with same amount of arguments
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Address remaining PR #21570 review comments
- Add GetFileExtension() to UriExtensions for reusable URI extension extraction
- Simplify ReziseImageUrlFactory to use GetFileExtension() instead of manual parsing
- Add default implementation to IReziseImageUrlFactory to avoid CP0006 breaking change
- Remove CP0006 suppression from CompatibilitySuppressions.xml
- Fix Obsolete message format and remove unnecessary [ActivatorUtilitiesConstructor]
- Add TODO for ReziseImageUrlFactory typo rename
- Remove stale ObsoleteOverload test and low-value ContentImagingSettingsTests
- Add unit tests for UriExtensions.GetFileExtension()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Avoid unnecessary second call to GetFileExtension().
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added further integration test to verify list view permission checks.
* Replace per item GetPermissionsForPath calls with a single batch GetPermissions query across all unique path node ids.
* Added unit test verifying DocumentCollectionPresentationFactory and fixed constructors.
* Replace per-item IsProtected calls with a single batched GetAll query and in-memory path matching.
Compute shared ancestor path keys once for collection siblings instead of per item.
* Eliminate redundant GUID to int conversions in HasScheduleFlagProvider.
* Batch user profile resolution in collection view mapping.
* Addressed issues from code review.
* DRY up GetOwenerName and GetCreatorName in CommonMapper.
* Apply suggestions from code review
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
* Apply feedback from code review.
---------
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Mark hey-api generated client code and OpenApi.json as linguist-generated
so they are collapsed by default in GitHub diffs and excluded from
language statistics.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
fix(web): register entity data picker non-editor manifests statically
The entity data picker's picker infrastructure manifests (collection menu,
item, search, tree) were only registered dynamically via the entry point,
meaning they were unavailable until a picker data source was detected.
Split the registration so these manifests are registered statically through
the main property-editors manifest tree, while only property editor manifests
remain dynamically registered.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* Update length of type column in LongRunningOperation
* Adding truncation
* Update src/Umbraco.Infrastructure/Examine/ExamineIndexRebuilder.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Used constants.
Handled case where long strings with the same first 200 characters could end up clashing (very unlikely, but we can be defensive).
Introduced a TruncateWithUniqueHash extension method to support this.
* Reverted comment removal.
* Rename migration class.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Use dotnet tool instead
* Uses pipeline build artifacts to reduce compilation time
* Fixed name
* Remove --noRestore
* Move DocFX metadata generation to Build stage
* Updated to use dlls
* Docs: Fix DocFX CSS reference for newer DocFX version
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Added conditions for generating DocFX metadata
* use glob pattern for DLLs
* Move DocFX to Build_Docs stage with separate DLLs artifac
* Fixes based on comments
* Undo commented out Upload C# Docs job
* Removed Build_Docs from Nuget Release so our docs isnt blocking
* Added dependsOn so Upload_API_Docs is only done when Build_Docs are finished
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* cherry-pick from #21672
* cherry pick tab rendering to handle one more case
* move the root route down for it to stay an empty path.
* Revert empty root path commit
* fullPath for root includes 'root'
* revert claude settings commit
* refactor accordingly to feedback
* Updates all obsoletion messages to use a softer expression of intent rather than stating explicit removal in a particular version.
* Code review feedback.
* Updates from code review.
chore(api): regenerate OpenApi.json and backoffice client SDK
The OpenAPI definition and backoffice TypeScript client were out of
sync with recent Management API changes already on main. Regenerated
to bring them up to date.
* Fix suggestion appsettings issue
* Add todo comment to remove UserPasswordConfigurationSettings and MemberPasswordConfigurationSettings
* Apply suggestions from code review
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add tests for property presest value
* save method'
* update accepntance test
* ad timeout to preset value test
* Updated yaml file to copy all .cs files but still keep folder structure
* remove timeout from preset value test
* adding time wait to tests
* adding more timeout
* Adding slow test
* update test
* Format code
* Format code and add more afterEach step to clean language
* Remove test.slow() as it is unnecessary
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
* Localize "Copy to clipboard" button label
in other Block editor components.
* Adds "Copy to clipboard" action to RTE Block component
* Check if Clipboard Property Context is available
If not, don't show the action button.
* Register "Clipboard Property Context" for Tiptap RTE
we can't make this generic for all RTEs,
since it is bound to the property-editor UI alias.
* Implemented RTE Block's `copyToClipboard()` method
* Added Clipboard Property Value Translators
for Tiptap RTE Blocks.
* Block RTE: fix clipboard paste data structure mismatch
Change paste translator to output UmbPropertyEditorRteValueType (with
markup and blocks) instead of UmbBlockRteValueModel (flat structure).
This ensures the cloner receives the correct type and can properly
regenerate content keys.
Also optimize the cloner to skip DOM parsing when markup is empty,
which is always the case for clipboard paste operations.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* TipTap: debounce block updates to prevent race condition
Add debounceTime to the contents observable to batch rapid emissions
when pasting multiple blocks from clipboard. This prevents the
#updateBlocks method from being called multiple times in quick
succession.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Block RTE: address code review feedback
- Add missing await on insert() and insertFromRtePropertyValues()
- Remove redundant optional chaining on blockContentTypes.every()
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* feat(backoffice): use looser version ranges for peerDependencies
Convert hoisted dependencies to peerDependencies with more permissive version
ranges that allow plugin developers to use different versions without npm conflicts.
Version range strategy:
- Pre-release (0.x.y): >=X.Y.Z <1.0.0
Example: @hey-api/openapi-ts 0.85.0 → >=0.85.0 <1.0.0
Allows plugins to use 0.85.0, 0.91.1, 0.99.99 without conflicts
- Stable (major.x.y where major ≥1): major.x.x
Example: lit ^3.3.1 → 3.x.x
Allows any patch/minor within the major version
This allows plugin developers to:
- Use @hey-api/openapi-ts 0.91.1 while backoffice uses 0.85.0
- Install compatible deduplicated versions when available
- Override versions when needed for their specific use case
Types remain available from peerDependencies (automatically installed by npm 7+).
When @hey-api reaches 1.0.0, the range will automatically become ^1.0.0.
https://claude.ai/code/session_01CBpcwXYZjzexKkM9Cf57Kb
* refactor(backoffice): use semver package for version parsing in cleanse script
Replace regex-based version parsing with the semver package used by npm itself.
This ensures version parsing is consistent with npm's own semver handling and is
more robust for edge cases.
Also update the version range logic to be more explicit and correct:
- Pre-release (0.x.y): >=X.Y.Z <1.0.0
- Stable (1+.x.y): >=X.Y.Z <NEXT_MAJOR.0.0
This ensures plugin developers use at least the tested version and prevents
accidental downgrades to incompatible minor versions.
https://claude.ai/code/session_01CBpcwXYZjzexKkM9Cf57Kb
* chore: formats file
* chore: lockfile
* fix(backoffice): use semver.minVersion to parse version ranges
Fix parsing of version ranges like ^0.85.0 by using semver.minVersion() instead
of semver.parse(). The parse() function only handles exact versions, while
minVersion() extracts the minimum version from a range.
Example transformations:
- ^0.85.0 → 0.85.0 → >=0.85.0 <1.0.0
- ^3.3.1 → 3.3.1 → >=3.3.1 <4.0.0
https://claude.ai/code/session_01CBpcwXYZjzexKkM9Cf57Kb
* refactor(backoffice): keep caret ranges for stable package versions
Optimize the version range conversion logic:
- Stable versions (major ≥ 1) with caret (e.g., ^3.3.1): Keep as-is
The caret already implements the desired range: >=3.3.1 <4.0.0
- Pre-release versions (0.x.y): Convert to explicit range
^0.85.0 → >=0.85.0 <1.0.0 (caret only allows 0.85.z, not 0.91.z)
- Exact versions (e.g., 3.16.0): Convert to range
3.16.0 → >=3.16.0 <4.0.0
This simplifies the published package.json while maintaining the same semantics
and is more explicit about the intent.
Examples of published peerDependencies:
- lit: ^3.3.1 (unchanged, already has correct range)
- rxjs: ^7.8.2 (unchanged)
- @hey-api/openapi-ts: >=0.85.0 <1.0.0 (converted from ^0.85.0)
- @tiptap/core: >=3.16.0 <4.0.0 (converted from 3.16.0)
https://claude.ai/code/session_01CBpcwXYZjzexKkM9Cf57Kb
* refactor(backoffice): use caret for stable exact versions
Simplify stable exact versions (e.g., 3.16.0) by adding a caret prefix (^3.16.0)
instead of explicit range (>=3.16.0 <4.0.0). Both are semantically identical for
stable versions but caret is more concise and conventional.
Updated version range logic:
- Stable with caret (^3.3.1): Keep as-is
- Pre-release with caret (^0.85.0): Convert to >=0.85.0 <1.0.0
- Stable exact version (3.16.0): Convert to ^3.16.0
Examples of published peerDependencies:
- lit: ^3.3.1
- rxjs: ^7.8.2
- @hey-api/openapi-ts: >=0.85.0 <1.0.0
- @tiptap/core: ^3.16.0 (now with caret)
https://claude.ai/code/session_01CBpcwXYZjzexKkM9Cf57Kb
* refactor(backoffice): ensure all pre-release versions get explicit range
Reorganize version conversion logic for clarity:
1. All pre-release (0.x.y) versions → explicit range: >=X.Y.Z <1.0.0
- Examples: ^0.85.0 → >=0.85.0 <1.0.0, 0.85.0 → >=0.85.0 <1.0.0
2. Stable versions with caret (^3.3.1) → keep as-is
3. Stable versions exact (3.16.0) → add caret: ^3.16.0
This ensures pre-release version constraints are properly loosened for plugins
while maintaining stability guarantees.
https://claude.ai/code/session_01CBpcwXYZjzexKkM9Cf57Kb
* treat all modifiers the same
* docs: add backoffice npm package structure documentation
Add comprehensive section to CLAUDE.md explaining:
- Backoffice npm package architecture and plugin model
- Dependency hoisting strategy and version range logic
- How pre-release versions are handled vs stable versions
- Importmap as single source of truth for runtime
- Plugin development implications and expectations
Clarifies that while npm versions constrain types, the actual runtime comes
from importmap, and plugin developers should declare explicit dependencies
rather than relying on transitive deps.
https://claude.ai/code/session_01CBpcwXYZjzexKkM9Cf57Kb
* docs: add npm package publishing guide to backoffice CLAUDE.md
Add comprehensive section explaining:
- Why backoffice uses peerDependencies (importmap provides runtime)
- Dependency hoisting strategy and version range conversion logic
- How pre-release versions are handled differently from stable versions
- Example published peerDependencies showing final output
- Plugin developer guide with dos and don'ts
- Key files involved in the publishing process
Provides clear guidance for plugin developers on version compatibility
and explains the importmap-as-single-source-of-truth architecture.
https://claude.ai/code/session_01CBpcwXYZjzexKkM9Cf57Kb
---------
Co-authored-by: Claude <noreply@anthropic.com>
* edit regex for oembed flickr
* Apply stricter matching with domain to all embed providers, and validate with unit tests.
* Resolved warnings and added further unit tests.
* Further tightened the URL matching regex for two providers.
* Add regex caching to OEmbedService and unit tests to verify behaviour.
* Restore flickr short URL domain.
* Use https in requests to oembed providers.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* edit regex for oembed flickr
* Apply stricter matching with domain to all embed providers, and validate with unit tests.
* Resolved warnings and added further unit tests.
* Further tightened the URL matching regex for two providers.
* Add regex caching to OEmbedService and unit tests to verify behaviour.
* Restore flickr short URL domain.
* Use https in requests to oembed providers.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Tests: Fix permission controller tests to use correct entity keys
The GetDocumentPermissionsCurrentUserController, GetMediaPermissionsCurrentUserController,
and GetPermissionsCurrentUserController tests were incorrectly creating user data and
passing user keys to the GetPermissions method. These controllers expect document/media
keys, not user keys.
Updated the tests to create the appropriate content/media types and entities, then pass
the correct keys to properly test the permission endpoints.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* add paging UI to picker search results
* implement paging in collection picker data source example
* Hide pagination when all items loaded
* Use paging object for search requests
* Forward paging params in server search queries
* Set default page size in PickerSearchManager
* Use args.paging for skip/take in search
* Update src/Umbraco.Web.UI.Client/src/packages/core/picker/search/picker-search-result.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Reset pagination page when updating query
* dim the box while searching
* Delay loader appearance with fade-in
* Track executed search query and use in results to prevent UI flickering when entering in the search field
* Skip update when dataType is undefined
* Cancel tree loads on context destroy
* fix pagination labels
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Umbraco.Core: add XML documentation to all public members
Add comprehensive XML documentation comments to all public classes,
interfaces, methods, properties, constructors, and enums in Umbraco.Core
to resolve SA1600 StyleCop warnings.
- Document ~2,500+ files across all folders (Services, Models,
Notifications, Configuration, Cache, etc.)
- Use <summary>, <param>, <returns>, <remarks> tags as appropriate
- Apply <inheritdoc/> for interface implementations
- Use <see cref="..."/> for type references
- Preserve all existing comments
This eliminates approximately 15,500 SA1600 warnings from the project.
* Revert any code changes in the PR.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Block RTE: Add delete action with undo support
Adds a delete button to RTE block entries that removes blocks from
both the editor HTML and the block manager data. Implements an
HTML-first deletion approach that enables Ctrl+Z undo support by
leveraging the existing _filterUnusedBlocks mechanism.
- Add delete button to block-rte-entry action bar
- Add pendingDeletions state to manager for HTML-first deletion flow
- Modify entries context to use pending deletion mechanism
- Add Tiptap API observer to process pending deletions
- Remove blocks from editor via ProseMirror transactions
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Updates UmbracoProject template
Removes the framework choice from the template configuration as it's not used and was out of date.
Updates the LTS version to a wildcard to allow minor version updates and mean this doesn't need to be updated all the time!
Updates the description in the dotnet version generated property
* Removes unnecessary build flag
* Remove Custom Version symbol
It doesn't show up in the template anyway and has been marked as obsolete
* Remove framework from Extension template also as not used
* fix: update dotnet new syntax in pipeline
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: NguyenThuyLan <116753400+NguyenThuyLan@users.noreply.github.com>
* Document Types returns a list of allowed parent keys
* Media types included
* Minor fixes to namespace etc.
* Tests
* Fixing breaking change
* Correcting requested changes
* Corrected requested changes
* Removed unnecessary usings, aligned naming between service, repository and tests.
Add a new status for the default implementation (NotImplemented felt more correct than NotFound).
Updated inheritance in service layer so we maintain the NotFound behaviour for member types.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Documents: Remove deprecated entityType from property values
The entityType property on property values was causing "Unsaved Changes"
modal to appear after saving documents with RTE blocks. This occurred
because the server data source added entityType when reading, but
setPropertyValue did not preserve it when updating values.
Since entityType on UmbElementValueModel is deprecated and marked for
removal in v18, the cleanest fix is to stop adding it in the server
data source mapping.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Fix display of validation hint related to a tab.
* Update position of the badge.
* Change position for last tab.
---------
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Add and use a constant for the folder media type GUID identifier.
* Use defined constant and avoid lookup for folder media type when searching for media items.
* Add failing tests illustrating the lack of data type caching by key.
* Implement cache by key in data type repository.
* Apply same for template repository look-ups by key.
* Add tests verifying that content types are already cached by Id and key.
* Use correct default for creator Id in data type builder for tests.
* Use non-obsolete constructor in test.
* Ensured a deleted data type or template is cleared from the by key cache.
* Add IReadRepository implementations
* Utilize by-key repo access in service layers
* Fix test
* Safeguard against potential null reference exception
---------
Co-authored-by: kjac <kja@umbraco.dk>
* quote table, column and alias names with SqlSyntaxProvider methods in raw sql
* refactoring private methods into new file as internal methods,
refactor new extensions into another file
* refactor GetAlias method
* Double check the change
* improve code health
* change new static classes into public static partial class NPocoSqlExtensions
* resolve some Copilot review suggestions
* revert Copilot suggestion because it decreases code health
* revert test
* revert refactoring for CodeScene
* delete obsolete Test
* remove new methods and updates, which are not relevat for this PR
* prepare for additional states in the future
* don't mix string building methods
* fix SQL injection danger
* fix test for reverted methods
* another SqlSyntax issue
* Add additional unit and integration tests verifying the refactorings made in the PR.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Remove the default empty target tag for links, so the target attribute is only output when it has a value.
* Tiptap Link extensions: defaults `target` value to `null`
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Squash merged "v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar" into "v173/21448-FirstOrDefault-vs-ExecuteScalar"
* resolce Copilot code review comments
* revert to ExecuteScalar<string>
* revert to Database.ExecuteScalar<string>
* revert .FirstOrDefault<long>(query) and its async variant to .ExecuteScalar<long>(query). It is fine for PostgreSql too.
* Remove the test added for verifying NPoco behaviour (it's not needed in the code base moving forward)
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Exclude invariant options for culture-variant properties in preset builder
* Add unit test verifying the fix.
* added a few more unit tests
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
improvement(web): make ProfilingViewEngine._inner private and modernize string formatting
- Changed internal readonly Inner field to private readonly _inner field
- Replaced string.Format calls with string interpolation
- Removed TODO comment
* Skip leading whitespace in ufm parser
* UFM: Update start function to also skip leading whitespace
The tokenizer was updated to allow whitespace after opening braces,
but the start function still used a string pattern without whitespace
tolerance. This updates start to use a pre-compiled regex that matches
the tokenizer behavior, and adds an additional test case for the
documentation example format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Upgraded Tiptap to v3.13.0
* Remove eslint disable comments
* Update notes in externals
* `TextDirection` is now part of Tiptap core
* Upgraded Tiptap to v3.16.0
* The `addOptions()` typing error still persists in v3.16.0
* Resolved the export issue
* Removed unrequired `@ts-expect-error`
This came from an upstream merge.
* Move MediaTree write lock before MediaSavingNotification to prevent deadlock
Fixes a deadlock that could occur when saving multiple media items in parallel
when a MediaSavingNotification handler acquires a MediaTree read lock. The
previous ordering allowed two threads to each acquire read locks in their
notification handlers, then both attempt to upgrade to write locks, causing
a classic lock upgrade deadlock in SQL Server.
By acquiring the write lock before publishing the notification, the deadlock
scenario is avoided. Since the write lock is lazy, it only materializes at the
database level when actual queries are made, so notification handlers doing
in-memory work won't hold the lock.
* Apply same fix to MediaService.Delete method
* Apply same fix to DeleteVersions, DeleteVersion, and Sort methods
* Apply same fix to ContentService methods
Move WriteLock before notifications in:
- Save (single and batch)
- Delete
- DeleteVersions
- DeleteVersion
- Copy
* Apply the same pattern to MemberService.
* Add integration tests to verify the fix.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added tests for multi url picker validation message
* Added more tests - not done
* Updated more tests for multi url picker validation message
* Removed unused file
* Bumped version
* Make tests run in the pipeline
* Reverted npm command
* added color variable to code-block to make it readable in dark mode
* Update src/Umbraco.Web.UI.Client/src/packages/core/components/code-block/code-block.element.ts
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Prevent creation of media items with GUID version 7 keys when a media scheme is registered that doesn't support this GUID version.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix log message formatting.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Add support to models builder for nested generic types.
* Fixed existing warnings, added further tests, renamed tests for clarity.
* Add defensive validation for generic brackets passed to SplitGenericArguments.
* Fix failing unit tests.
* Content types: Allow adding composition with clashing property alias when property is being removed
* Further assert on property coming from the composition.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Block editors: Fix false pending changes indicator for invariant BlockList with culture-variant blocks (closes#21223)
When a document with a culture-variant content type has an invariant BlockList property containing culture-variant blocks, and you publish all languages for the first time, the content would incorrectly show as having unpublished changes.
The root cause was inconsistent JSON serialization order between EditedValue and PublishedValue. Two fixes were applied:
1. Sort block item values by culture before serialization in both `FromEditor` and `MergePartialPropertyValueForCulture` to ensure consistent ordering.
2. Add `[JsonIgnore]` to `BlockItemData.Udi` property since this computed property differs between save and publish paths.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/BlockListElementLevelVariationTests.Publishing.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed failing integration tests.
* Fix backwards compatibility for legacy UDI format in JSON deserializatio
* Tidy up, remove unused parameters.
* Fixed failing E2E test with copy blocks.
* Separate handling of udi and values in deserialization from current and legacy format, to correctly fix previously failing integeration and E2E tests.
* Fixed failing unit test.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds link (`umbLink`) support to the Style Menu api
* Tiptap RTE: Fix toggleClassName to handle multi-class strings
The toggleClassName command now properly tokenizes the className parameter
to handle space-separated classes (e.g., "btn btn-primary"). Previously,
the entire string was treated as a single token, causing duplicates and
preventing class removal.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Tiptap RTE: Add ensureUmbLink command for idempotent link creation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Backoffice: Redirect to list view after entity deletion
When an entity is deleted from its detail workspace, the UI now redirects
to the parent list view and shows a success notification instead of staying
on the deleted entity's page showing a 404 error.
Changes:
- Dispatch UmbEntityDeletedEvent after successful deletion
- Show success notification toast on deletion
- Listen for delete event in workspace editor and navigate to backPath
* Integration tests for #21138
* Make OpenId redirect and postlogout uris support load balanced environments
* Applied review suggestions
* Fix unit test mocks
* Introduce new method overloads and repository implentation, such that a collection view response only loads properties it needs.
* Use non-obsolete method overloads throughout.
* Add unit tests to verify property value retrieval.
* Don't load templates for collection view content retrieval.
* Optimize access checks by verifying the full collection rather than one at a time, and avoid the need to retrieve full content items.
* Added obsoletion messages and aligned behaviour of content and media permission service checks.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Return key in TreeEntityPath collection response, avoiding a later look-up of the key by Id.
* Resolve breaking changes to interfaces.
* Fix further breaking change.
* Additional assert for test verifying property loading for a non-existing property.
* Refactored repositories to avoid having method parameters related to templates on non-document and base content repositories.
* Remove check that verifies all provided keys are found when doing permission checks (although arguably correct, it's a behavioural change, and can also be argued it's corect as is).
* Introduce variable for permission set permissions.
* Provide functional default implementation on FilterAuthorizedAsync.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Squash merge Squash merged v173/20453-fix-more-sql-syntax-issues int v173/20453-fix-more-sql-syntax-issues-squash (copy of main)
* fix 2 unit test
* Replace nameof(DTO.COLUMN_NAME) by constant, because it leads to casing issues for case sensitive databses
* fix Copilot review comments
* resolve review comments
* replace more hard coded strings
* fix test
* fix review comments
* fix database schema
* fix database schema
* fix database schema and ResultColumn reference names
* Update src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* add comment from review
* fix two reference column names
* fix breaking change
* fix typo
* Remove unnecessary attributes
* mark 2 unsused DTO classes as obsolete
* reverted change of class UnionHelperDto adding [Column("...")] attributes again, because some integration tests for PostgreSQL provider fail without them. Again a case sensitivty issue.
* replace nameof reference names,
make all column name const consistent
* use NPoco dto instead of raw sql,
extend ISqlSyntaxProvider to handle some sql issues
* reduce complexity
* remove currently unsused extensions to ISqlSyntax
* add missing methods to ISqlSyntaxProvider and SqlSyntaxProviderBase
* add another missing methods to ISqlSyntaxProvider and SqlSyntaxProviderBase
* fix Copilot review comments and build errors
* update ISqlSyntaxProvider and SqlSyntaxProviderBase
* ensure GetPagedDescendants returns ordered by path entities as default
* resolve review comments
* fix review comments
* Update src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.PublishedCache.HybridCache/Persistence/DatabaseCacheRepository.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix Copilot comment
* fix wrong Copilot suggestion
* quote more column names
* resolve review
* Apply suggestions from code review
* synced interface and base class
* Revert "synced interface and base class". For an interface's default implementation, NotImplementedException makes more sense.
This reverts commit cf01cd01fc.
* Fixed remaining code warnings in DatabaseSchemaCreator.
* follow Cotpilot's review suggestion
* revert implementation and fix test
* use default
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds reusable `emptyRecycleBin` `collectionAction` kind
* Adds `emptyRecycleBin` collection-action to documents
* Adds `emptyRecycleBin` collection-action to media
* Removes `api` export
since the condition is eagerly loaded.
* Fixes type annotations and JSDoc comments
- Uses correct generic type `UmbCollectionHasItemsConditionConfig` in `UmbCollectionHasItemsCondition`
- Corrects JSDoc `@augments` tag in `UmbEmptyRecycleBinCollectionAction`
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Fixed linting errors
* Refactors execute() to reduce cyclomatic complexity
Extracts tree refresh logic into private #reloadChildrenOfEntity() method.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/recycle-bin/manifests.ts
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Removed code comment
as caused ambiguity.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Disabled the generation and upload off the docfx csharp api docs.
* Add comment explaining why job is disabled
* Added comment on second job
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added missing code documentation to the Umbraco.Cms.Api.Common project
* Remove duplicate XML summary for All constant
Removed duplicate XML summary documentation for the All constant.
* Removed inline comments no longer required now the information has been moved to XML header remarks
* Fix indentation on refactored path segment extraction in SubTypesSelector
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Squash merge Squash merged v173/20453-fix-more-sql-syntax-issues int v173/20453-fix-more-sql-syntax-issues-squash (copy of main)
* fix 2 unit test
* Replace nameof(DTO.COLUMN_NAME) by constant, because it leads to casing issues for case sensitive databses
* fix Copilot review comments
* resolve review comments
* replace more hard coded strings
* fix test
* fix review comments
* fix database schema
* fix database schema
* fix database schema and ResultColumn reference names
* Update src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* add comment from review
* fix two reference column names
* fix breaking change
* fix typo
* Remove unnecessary attributes
* mark 2 unsused DTO classes as obsolete
* reverted change of class UnionHelperDto adding [Column("...")] attributes again, because some integration tests for PostgreSQL provider fail without them. Again a case sensitivty issue.
* replace nameof reference names,
make all column name const consistent
* use NPoco dto instead of raw sql,
extend ISqlSyntaxProvider to handle some sql issues
* reduce complexity
* remove currently unsused extensions to ISqlSyntax
* add missing methods to ISqlSyntaxProvider and SqlSyntaxProviderBase
* add another missing methods to ISqlSyntaxProvider and SqlSyntaxProviderBase
* fix Copilot review comments and build errors
* update ISqlSyntaxProvider and SqlSyntaxProviderBase
* resolve review comments
* fix review comments
* Update src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.PublishedCache.HybridCache/Persistence/DatabaseCacheRepository.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix Copilot comment
* fix wrong Copilot suggestion
* quote more column names
* resolve review
* Apply suggestions from code review
* synced interface and base class
* Revert "synced interface and base class". For an interface's default implementation, NotImplementedException makes more sense.
This reverts commit cf01cd01fc.
* Fixed remaining code warnings in DatabaseSchemaCreator.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(log-viewer): prevent polling toggle reset when changing interval
Fixes issue where changing polling interval would reset the button to 'Polling' state instead of applying the new interval immediately.
- Remove togglePolling() call from closePoolingPopover() method
- Update setPollingInterval() to restart polling with new interval if already enabled
Fixes#21507
* refactor(log-viewer): extract polling start logic and fix regression
- Extract polling start logic into #startPolling() helper method
- Fix regression: enable and start polling when interval is selected while polling is off
- Update togglePolling() to use the helper method for consistency
Addresses feedback on PR #21508
---------
Co-authored-by: Gittensor Miner <miner@gittensor.io>
* Fix for the client side circular dependency.
This should fix the circular dependency without causing any breaking changes to the public APIs.
This issue is detailed here:
https://github.com/umbraco/Umbraco-CMS/issues/21463
* refactor UMB_MODAL_MANAGER_CONTEXT to avoid circular dependency
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Add 'is modal' condition to modal package
Introduces a new 'is modal' condition for extension manifests, allowing actions to be conditionally permitted based on modal context. Updates user collection action manifests to use this condition, preventing certain actions when inside a modal. Includes implementation, configuration, manifest registration, and tests for the new condition.
* rename from is modal to in modal
* added dicationary value search active only with config param set
* Removed code smell, by reducing nesting
* Renamed configuration value to EnableValueSearch.
Added integration tests to verify search results.
* update query to return correct values for each language in the overview
* Use OptionsMonitor and add additional assert to verify fix to indication of which languages have translations.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Sort at last by language name
* ensure document language picker is sorted as variant selector
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/modals/shared/document-variant-language-picker.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/utils.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor to avoid inline methods
* transform into a function
* revert config file commit
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add alias property to collection config interface
Introduced an 'alias' property to the UmbCollectionItemPickerModalCollectionConfig interface
* render collection element when modal is configured with an alias
* expose a picker modal route
* use collection in use picker
* adjust spacing
* add config option for selectOnly
* dynamic modal alias
* support selectable entity item ref
* wip entity data picker collection + ref and card views
* Add entity collection item card extension type + default elements
* implement user collection item card
* fix selection events
* map to prop
* add prop/attr for href
* add support for which detail properties to show
* update type import
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* import card in correct file
* Fix event listener binding for selection events
* implement disabled property for collection item cards
* init commit of collection item ref extension
* fix imports
* add element interface
* Implement UmbEntityCollectionItemElement interface in item cards
Added the UmbEntityCollectionItemElement interface to document and user collection item card elements for improved type safety and consistency. Updated type exports to include the new interface.
* Update collection item ref to use uui-ref-node
Replaces the placeholder div with a uui-ref-node component, passing relevant item properties and event handlers. Adds dynamic icon rendering using umb-icon.
* Refactor entity collection item elements to use shared base
Introduces a new abstract base class for entity collection item elements, consolidating shared logic for card and ref variants. Updates card and ref element implementations to extend the new base, and refactors extension manifest interfaces for consistency. This improves maintainability and reduces code duplication.
* use class instead of magic string
* Use entity collection item card in picker view
Replaces the placeholder card markup with the <umb-entity-collection-item-card> component, enabling selection and deselection functionality for items in the entity data picker card collection view.
* Update entity item ref to collection item ref
Replaces <umb-entity-item-ref> with <umb-entity-collection-item-ref> in the picker collection view. Adjusts event handlers and select-only logic to improve selection behavior and component consistency.
* utilise ref and card kind for picker views
* introduce ref and card collection view kinds
* Utilise card kind for user collection view
* Add item-specific href support to collection views
Introduces a requestItemHref method to collection contexts for retrieving item-specific hrefs. Updates card, ref, and user table collection views to use these hrefs, enabling dynamic linking for collection items. Refactors user table name column layout to accept href via value prop instead of constructing it internally.
* Update ManifestCollectionView import path
Changed the import of ManifestCollectionView from '../extensions/types.js' to '../view/types.js' to reflect its new location.
* remove unused
* use size medium for entity collection item picker
* use box
* render entity actions
* use edit path builder for user links
* rename method
* Revert "rename method"
This reverts commit 4df577688e.
* Update collection-default.context.ts
* make type lint ignore unused args with an underscore
* temp remove unused
* only make collection vie selectable if there are any registered bulk actions
* don't render name link if there is no href
* fix imports
* Render selection actions only if bulk actions exist
* use selectable state
* Update language-table-collection-view.element.ts
* Update language-table-collection-view.element.ts
* Update card-collection-view.element.ts
* clean up
* Refactor collection views to use shared base class
* refactor(collection): parallelize href fetching and make method private
* docs(examples): update collection example to use card and ref kinds
* docs(examples): add icon property to collection example data model
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/view/types.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update collection-bulk-action.manager.test.ts
* Removed duplicate and redundant '@typescript-eslint/no-unused-vars' rule definitions, consolidating the configuration to use only 'argsIgnorePattern'.
* Handle missing user href in name column layout
Replaces the user name link with a span when the href property is not provided, preventing broken links in the user table name column layout.
* Update user-table-name-column-layout.element.ts
* pass modal data and value to routable modal
* Update picker-input.context.ts
* support selectableFilter
* scaffolding of a collection text filter extension
* Refactor collection text filter to use API interface
* Fix incorrect tag
* Update types.ts
* Update collection-text-filter.extension.ts
* Add cancelation to debounced search on destroy
* clean up
* add js docs
* two way binding of filter value
* clean up
* Add collection text filter manifest example
Introduced a new filter manifest for the example collection and updated the main manifests file to include it. This enables a text filter extension for the example collection.
* Delete unused element and context
* Update src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/user-group-collection.context-token.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update user-group-table-collection-view.element.ts
* support search for tree item and collection item pickers
* add spacing between collection ref items
* add margin between picker search result items
* remove spacing after last item
* remove padding in search results
* Update collection-item-picker-modal.element.ts
* move select only logic to collection selection manager
* add tests for collection selection manager
* change to filter label instead of search
* delete unused user grid collection view
* Select-only mode is now only disabled when all items are deselected, rather than on every deselection.
* prepare umb table for pickers
* utilize UmbCollectionViewElementBase in user table collection view
* remove console log
* handle select all and select item from same event
* bulk actions workaround
* add bulk action in collections feature toggle
* remove unused method
* make fields optional to avoid a breaking change
* remove unused import
* fix typescript errors
* adjust search styling
* hide with css
* fix ts errors
* Add modal data support to picker input context
Introduces methods to set and get modal data in UmbPickerInputContext, allowing base configuration for picker modals. Updates modal data handling to merge stored modal data with provided data for both direct picker opening and modal route setup.
* Fix bulk action manager test initialization
Added calls to setConfig in tests to properly initialize the observer before subscribing to hasBulkActions. Simplified the test logic for checking emissions when actions are present.
* Update tree-picker-modal.element.ts
* Update picker-search-result.element.ts
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/view/umb-collection-view-element-base.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Use ifDefined for modal route in user input button
* Use ifDefined for href binding in entity data picker
* Fix collection alias binding in item picker modal
* wire up user table collection view with selectableFilter
* clean up controller aliases
* Update collection-item-picker-modal.element.ts
* Update collection-item-picker-modal.element.ts
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* enable async method
* ensure container is local to the owner content type
* no need to await anyhow
* handle moved groups
* Update src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-properties.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixes#20665 - Password change error msg
In order to show the right validation message:
- the repository code always notifies the validation failure message
(or a default failure message if none is received)
- in the data-source code, tryExecute is called with the option
to disable the default notification
* Return the original error instead of faking success
---------
Co-authored-by: Emma L Garland <1649855+emmagarland@users.noreply.github.com>
* Implement document alias cache and service to optimize content finder by alias.
* Renamed to DocumentUrlAlias. Fixed issues on start-up.
* Remove tracking of root ancestor.
* Optimize cache key, tidy up tests, move domain matching to content finder.
* Handle language and document deletes.
* Align further with document URL service.
* Code tidy.
* Fixed comment.
* Refactor scope handling to avoid nested scopes
Extract CreateOrUpdateAliasesInternalAsync to process documents without
creating their own scope. Both CreateOrUpdateAliasesAsync and
CreateOrUpdateAliasesWithDescendantsAsync now create a single scope
and call the internal method, avoiding unnecessary nested scope creation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Extract CreateOrUpdateAliasesInternalAsync to process documents without
creating their own scope.
* Only return a document for a match under a domain if the document is found under the domain of the current request.
* Fix failing integration tests.
* Apply suggestions from code review.
* Ensured language to culture code map is updated when a language isn't found in the cached map.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
fix(backoffice): resolve event listener memory leaks in auth, dropzone, actions, and router
Fixes memory leaks in 4 components where event listeners registered with .bind(this) could not be properly removed because each .bind() call creates a new function reference.
Changes:
- auth.context.ts: Convert #onStorageEvent to arrow function property
- dropzone-media.element.ts: Convert 4 drag handlers to arrow function properties
- entity-actions-dropdown.element.ts: Convert handler and add disconnectedCallback
- router-slot.element.ts: Convert handler and add proper cleanup in disconnectedCallback
Solution: Arrow function properties maintain consistent references while preserving 'this' context, enabling proper listener removal.
Testing:
- Added unit tests for auth.context.ts
- All builds pass
- Linter passes
- No breaking changes
Documentation:
- Added "Event Listener Cleanup Pattern" section to clean-code.md
- Added "Event Handler Guidelines" section to style-guide.md
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* refactor(rte): Replace misleading Promise.all with sequential awaits
The inner awaits in Promise.all([await ..., await ...]) made the operations
sequential anyway. Since #loadEditor() depends on _extensions being populated,
sequential execution is correct - this change makes the intent clearer.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(rte): Cache toolbar and statusbar emptiness checks
Instead of calling .flat() on every render to check if toolbar/statusbar
have items, compute the boolean once when values are set in #loadEditor().
This avoids unnecessary array operations during render cycles.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(rte): Pre-compute extension styles during initialization
Instead of calling unsafeCSS() on each style during every render cycle,
collect and process styles once in #loadEditor() and store the result
in _extensionStyles. This avoids repeated CSS processing during renders.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts:
# src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Adds `check:duplicate-class-names` devops script
* DevOps: Improve `check:duplicate-class-names` script
- Fix example path in JSDoc comment
- Add support for `export default class` declarations
- Add `--ignore-stories` flag to exclude story files from detection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Added try/catch on reading file contents
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Resolved potential thread safety issues with PublishStatusService.
* Only update published status in content cache refresher if within a publish or unpublish operation.
* move media-type guid strings into constants partial
* missed one.
* Update src/Umbraco.Core/Constants-MediaTypes.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add member type GUID constants too.
* Removed member type incorrectly recorded as a built-in data type.
* Reuse constant in obsolete GUID constant.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Remove rebuild of document URLs during migration, instead ensuring they will run after migration is complete and Umbraco is running.
* Avoid unnecessary second rebuild of document URL cache after startup with migration that has already triggered a rebuild.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add a toggle, defaulted to off, for display of diffs on the rollback view.
* Used only label for checkbox.
* Align formatting across translations for diffHelp key.
* Changed the checkbox to a toggle
UI semantics, checkboxes imply selection, whereas toggles imply activation.
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Prevent selection of document and member type folders when selecting allowed types for the content picker.
* Added fix for Media Types
* Set `documentTypesOnly` on `umb-input-document-type`
so to disallow selecting element-types.
* Linting
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* fix: aligns media workspace with document workspace to handle "variants" when calculating routes, which fixes an issue where the "Access denied" view would not be shown
* fix: clear root access flag when selecting specific start nodes
When selecting specific document or media start nodes for a user, the UI now automatically sets hasDocumentRootAccess/hasMediaRootAccess to false.
Previously, if a user group had "Has access to all items" enabled, selecting specific start nodes on the individual user wouldn't clear the root access flag. This caused the backend to add -1 (root access) to the start node list, overriding the specific node selections.
This ensures user-specific start node permissions properly override group-level root access settings.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: add length check to prevent rendering router with empty routes array
The render method now checks both that _routes exists AND has length > 0 before rendering the router-slot. An empty array is truthy, so without the length check, the router-slot could be rendered with an empty routes array, causing runtime errors.
This aligns with the original render logic and prevents the TypeError when media tests run.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix E2E test URL construction for media workspace deep-linking
The test was constructing an invalid URL by appending the workspace path
directly to the current URL, which included '/collection'. This resulted in:
/umbraco/section/media/collection/workspace/media/edit/ (invalid)
Instead of the correct:
/umbraco/section/media/workspace/media/edit/
The fix removes '/collection' before appending the workspace path, ensuring
the test actually navigates to the workspace editor where the 'Access denied'
view is properly displayed.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Make all tests for media start node run in the pipeline - remember to revert before merging
* Revert npm command before merging
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
* Document Tree: Filter tree items based on user browse permissions
- Add FilterTreeEntities virtual methods to EntityTreeControllerBase for filtering tree entities with total count adjustments
- Override FilterTreeEntities in DocumentTreeControllerBase to filter by ActionBrowse permission
- Extract filtering logic into IDocumentPermissionFilterService for testability
- Add unit tests for DocumentPermissionFilterService
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Complete the scope when no runnable job found. Without this I'm seeing timeouts and lock contention if a long-running document type save operation is running when the first distributed job is requested.
* Run serialization steps of rebuild of content cache in parallel for a small but not insignficant speed optimization.
* Add integration tests for database cache rebuild.
* Optimize rebuild of databaes and memory cache after content type update.
* Add debug log for running distributed job.
* Apply memory cache clear optimization to media.
* Optimize MediaCacheService.RebuildMemoryCacheByContentTypeAsync with lightweight query
Use GetMediaKeysByContentTypeKeys to fetch only media keys instead of loading full ContentCacheNode objects. This matches the same optimization applied to DocumentCacheService.
Also refactors Rebuild() to reuse RebuildMemoryCacheByContentTypeAsync for the memory cache clearing step.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Further updates from code review.
* Further tests for variant documents, composed documents and message pack serialization.
* Fixed failing integration tests.
* Clear the cacje level published content cache on content type change.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: Resolve 128 SA1600 documentation warnings in Umbraco.Cms.Persistence.Sqlite
- Added XML documentation comments to interceptors, mappers, and services
- Added TODO (V18) comments to SqliteSyntaxProvider.Format methods (CS0114)
- Updated .csproj TODO comment to follow V18 convention
- CS0114 warnings remain suppressed as fix would be binary breaking
* Fixed the issues Copilot complained about with the documentation and..
Fixed two IDE0270 warnings (null check simplification).
* Code Quality: Fix CS0659 and CS0661 build warnings in Item test class
The Item class in test project defined Equals override and equality operators without implementing GetHashCode, causing CS0659 and CS0661 compiler warnings.
Added GetHashCode implementation using RuntimeHelpers.GetHashCode(this) for consistent reference-based equality matching the existing operators behavior.
Removed CS0659/CS0661 from WarningsNotAsErrors in test project as they are no longer needed.
* Code Quality: Remove unused test infrastructure classes
Remove Item, OrderItem, and SimpleOrder classes along with the SimpleOrder_Returns_Null_On_FirstOrDefault_When_Empty test.
These ~370 lines of test infrastructure existed only for a single trivial test that verified FirstOrDefault() returns null on an empty collection - behavior already tested on actual Umbraco collections in the same file.
* Refactor StringExtensions into multiple files using partial classes.
* Tidy/complete XML header comments.
* Fixed warnings in string extension methods.
* Add unit tests for IsLowerCase and IsUpperCase and optimize the methods.
* Add unit tests for ReplaceNonAlphanumericChars and optimize the method.
* Add unit tests for StringWhitespace and optimize the method.
* Add unit tests for StripHtml and DecodeFromHex and optimize the methods.
Fix too aggressive regex for StripHTML to ensure works only on HTML tags.
* Add unit tests for EnsureStartsWith and EnsureENdsWith and optimize the methods.
* Add unit tests for ToSingleLine and StripNewLines and optimize the methods.
* Fix issues raised in code review.
* Added the SA1649 to the "No Warnings" section.
Stylecop is trying to enforce filenames that are like:
CancellableObjectEventArgs{TEventObject}.cs
However Umbraco uses CancellableObjectEventArgs.cs
Unless a policy decision is make to follow this stylecop rule, I think it is better to add this rule to the " NoWarn " section, so we don't see it appear at all.
* Revert accidental package-lock.json change
* Renaming files to match the StyleCop patterns.
Except two which would end up having the same names as other file, so these have been renamed as LegacyIScope & LegacyIScopeProvider, with local Pragma warnings disabled for this Style Cop rule.
* Removing the SA1649 from Warnings NOT as Errors.
In other words, if you turn on show warnings as errors, these will show as errors, rather than being suppressed.
* change to static import
* add support for passing modules to manifest js property
* Replaces dynamic imports of entry-point.js with static imports across all manifests
* Support statically imported modules in loader functions
Extended loadManifestApi and loadManifestElement to handle already resolved module objects (statically imported modules) in addition to dynamic imports. Updated type definitions in utils.ts to include module export types for loader properties.
* Add tests for loadManifest* functions in extension-api
Introduces unit tests for loadManifestApi, loadManifestElement, and loadManifestPlainJs functions. These tests cover various scenarios including direct class constructors, dynamic and static imports, export prioritization, and edge cases for null and undefined inputs.
* Added folder and files for the new condition.
* Registered the condition.
* Added an example to test the condition.
* Added the condition in one of examples.
* Renamed condition.
* Fixed linting error.
* fix(a11y): Toast notifications not announced by screen readers in Chrome
- Move screen reader live region from Shadow DOM to Light DOM (document.body)
Chrome doesn't reliably detect ARIA live regions inside Shadow DOM
- Use role="alert" with fresh elements for each announcement instead of
updating text content of an existing live region
- Fix invalid aria-role="true" attribute (was invalid HTML)
- Fix missing backslash in unicode escape '\u00A0'
The previous implementation had the live region nested 3 levels deep in
Shadow DOM, which Safari handled but Chrome ignored. Creating a new
alert element in Light DOM for each announcement is the most reliable
method across browsers.
Closes#14521🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Removed comment.
---------
Co-authored-by: Claude <noreply@anthropic.com>
* Update Umbraco version in starterkits template
LTS and Latest should both install 17.0.0, at the moment latest uses Umbraco v17.1.0 but a starter kit version 17.0.0-rc1 which is not a good combo
* Update LTS in template to 17.1.0
* Tree pickers: Implement noAccess property UI handling for user start nodes
- Add noAccess observable to document and media tree item contexts
- Add visual styling (grayed out, italic) for noAccess items in tree views
- Update document and media picker input contexts to prevent selection of noAccess items
- Items with noAccess are shown for navigation but cannot be selected in pickers
This implements the UI handling for Feature 63060 "Handle Start Nodes"
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix noAccess implementation and add E2E tests
This commit combines all improvements made to the noAccess property feature:
1. Refactored to use Lit lifecycle methods (updated()) instead of property watchers
2. Added click and keyboard event handlers to prevent navigation
3. Removed disabled attribute that was blocking tree expansion
4. Added comprehensive E2E tests for document and media trees
Critical bug fix: Removed disabled attribute that prevented expansion
- The disabled attribute was blocking ALL interactions including expanding
tree items to show accessible children underneath noAccess ancestors
- Now only sets aria-disabled="true" for screen readers and removes href
- Click and keyboard event handlers still prevent navigation as intended
- Users can now properly navigate through noAccess ancestors to reach
their accessible child nodes
E2E test coverage:
- Display noAccess styling (opacity, italic)
- Prevent navigation when clicking noAccess nodes
- Allow expansion of noAccess nodes to show children
- Picker tests skipped pending infrastructure improvements
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Remove aria-disabled manipulation that interferes with tree expansion
The previous implementation set aria-disabled="true" and removed href
from the menu-item in #updateMenuItemAccessibility(). This approach
caused issues with tree expansion functionality.
Removed:
- #updateMenuItemAccessibility() method
- updated() lifecycle hook that called it
- UUIMenuItemElement import (no longer needed)
The click and keyboard event handlers already prevent navigation to
noAccess nodes, so additional DOM manipulation is not necessary.
Test results:
✅ 4 passing: Display styling and prevent navigation work correctly
❌ 2 failing: These appear to be backend issues:
1. Document expansion: Caret button disabled (backend marking noAccess
items as not selectable, which disables entire menu-item)
2. Media expansion: Child media folder incorrectly has noAccess attribute
(backend data issue - child should be accessible as it's the start node)
The UI implementation is sound. The remaining test failures indicate
backend API issues that need investigation.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix path comparison bug in UserStartNodeEntitiesService (similar to #21162)
This fixes the same path comparison bug we fixed in PR #21162 but in C# string
comparisons instead of SQL queries.
## Root Cause
Path comparisons without trailing commas caused false matches:
- Path "-1,1001" incorrectly matched prefix "-1,100"
- This marked nodes as ancestors/descendants when they weren't related
## Examples of False Matches
- child.Path = "-1,1001", startNodePath = "-1,100"
- OLD: "-1,1001".StartsWith("-1,100") = TRUE (bug!)
- NEW: "-1,1001,".StartsWith("-1,100,") = FALSE (correct!)
- child.Path = "-1,100", startNodePath = "-1,1001"
- OLD: "-1,1001".StartsWith("-1,100") = TRUE (bug!)
- NEW: "-1,1001,".StartsWith("-1,100,") = FALSE (correct!)
## Fix Applied (Two Locations)
1. Line 146 (ancestor check): Added comma suffix to child.Path
2. Line 226 (IsDescendantOrSelf): Added comma suffix to both paths
This matches the pattern already used correctly in lines 92 and 191 of the
same file, and mirrors the SQL fix from PR #21162.
## Test Impact
This should fix the failing E2E test where child media folders were incorrectly
marked as noAccess when they were actually the user's start node.
Related: #21162
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix remaining merge conflict markers in media-tree-item.element.ts
* Remove E2E agent markdown file (moved to personal space)
* test: adds mock data for noAccess
* feat: moves noAccess subscriber to base class
* test: adds mock data for media
* feat: moves no-access styling to the base class
* fix: media tree items should inherit styling from the base class
* feat: observes noAccess from children and reports back to the base class
* test: spec file should use undefined instead of null
* docs: add comprehensive comments explaining noAccess opt-in pattern
- Document why noAccess is not in base interface (breaking change)
- Explain opt-in pattern with code examples
- Add JSDoc comments to property, event handlers, and CSS
- Reference accessibility considerations (keyboard users)
- Link child class implementations to base class documentation
* test: adds timeout for URL to settle
* fix: allow clicks on accessible children of noAccess tree items
When a tree item has noAccess, child tree items are rendered in its slot.
Previously, the parent's click handler blocked ALL clicks due to event bubbling,
preventing users from navigating to accessible descendants.
Now checks if click originated from a child tree item element using closest().
If it's a child, allow the click. Only block clicks on the noAccess item itself.
Applied to both mouse clicks and keyboard navigation (Enter/Space).
This enables users to navigate through noAccess ancestors to reach their
accessible start nodes (e.g., Root[noAccess] → Child[noAccess] → Grandchild[accessible]).
Fixes tests:
- should allow expansion of noAccess ancestor node to show children (documents)
- should allow expansion of noAccess ancestor media node to show children (media)
* compare with the closest element to see if we are clicking on the element that is blocked or a sub-element that is not
* fix: adds forbidden route in case of no variants
* test: corrects label locator
* test: adds test to check if you can click or deeplink to restricted media
* test: removes .only
* test: removes duplicated tests
* test: adds test for document no-access
* test: add unit tests for user start node path comparison logic
Adds comprehensive unit tests documenting the path comparison fix that prevents
false matches when node IDs are numeric prefixes of other IDs (e.g., 100 vs 1001).
The fix uses trailing commas on both paths to ensure accurate comparison:
- Without fix: "-1,100".StartsWith("-1,10") = true ❌ (incorrect)
- With fix: "-1,100,".StartsWith("-1,10,") = false ✅ (correct)
Tests cover:
- Numeric prefix edge cases (1 vs 10, 10 vs 100, 100 vs 1001)
- Self comparison (start node itself)
- Descendant relationships
- Deep path hierarchies
- Demonstrates the bug without the fix for documentation
19 test cases total, all passing.
* test: removes .only
* fix: do not overwrite forbidden route
* docs: fixes line number in comment
* test: fixes comment
* feat: uses isSelectableContext to disable and scrub 'href' from base element
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adjust build scripts for custom elements and JSON schema generation to be placed at root level, add generation to build for npm and update .gitignore
* fix: updates umbraco package schema location
* git ignores
* fix: outputs the vscode custom elements file at root
* fix: adds generated files to output
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* fix(backoffice): use hardcoded Umbraco logo in header popover
Fixes issue where the backoffice header logo popover incorrectly
displayed the LoginLogoImageAlternative setting instead of showing
the Umbraco branding.
Changes:
- Added hardcoded umbraco-logo.svg asset to client project
- Updated backoffice-header-logo component to reference static logo
- Wrapped logo in link to umbraco.com
- Removed dependency on BackOfficeLogo endpoint for popover
The small header logo button still uses <umb-app-logo> and remains
customizable via the BackOfficeLogo setting.
Closes#62866
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* chore: removes link to umbraco.com
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(media-picker): auto-select uploaded media items
When uploading media in the media picker modal, uploaded items are now
automatically selected. This works for both single and multiple selection
modes, and correctly handles paginated folders where uploaded items may
not be visible on the current page.
Closes#21115🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(media-picker): navigate to last page after upload
Uploaded media items get the highest SortOrder, placing them on the last
page. This change navigates to the last page after upload so users can
see their newly uploaded items, which are also auto-selected.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added tests to create a user group with description
* Clean up
* Moved tests for user group description to other class
* Bumped version
* Make tests run in the pipeline
* Reverted npm command
* Optimize retrieval of ContentCacheNode for draft and publish in when refreshing the hybrid cache.
* Fixed issue with XML header documentation tags.
* Use is null for consistency
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Add resilience to ServerEventRouter to prevent failures during unattended
install/upgrade when SignalR (especially Azure SignalR) is configured.
Changes:
- Skip server event routing when runtime level is not Run (Install/Upgrade)
- Add try-catch with warning logging for graceful degradation on SignalR failures
- Add backwards-compatible obsolete constructor using StaticServiceProvider pattern
- Add unit tests for runtime level checks
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add UMB_WORKSPACE_EDIT_PATH_PATTERN and UMB_WORKSPACE_EDIT_VARIANT_PATH_PATTERN
to core workspace paths for generic edit URL generation
- Fix UmbPathPattern to support multi-level chaining via toAbsolutePatternString()
- Refactor workspace-menu-breadcrumb to use new path patterns
- Refactor menu-variant-tree-structure-workspace-context-base to use new patterns
- Refactor tree-item-context-base to use UMB_WORKSPACE_EDIT_PATH_PATTERN
- Refactor user-grid-collection-view to use existing UMB_EDIT_USER_WORKSPACE_PATH_PATTERN
- Remove outdated TODO about encoding uniques (handled at data source)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* fix(stylecop): resolve SA1106 - remove empty statement
* fix(stylecop): resolve SA1400 - add missing access modifiers
* fix(stylecop): resolve SA1028 - remove trailing whitespace
* fix(stylecop): resolve SA1306 - rename fields to lowercase
* fix(stylecop): resolve SA1130 - use lambda syntax
* fix(stylecop): resolve SA1121 - use built-in type aliases
* fix(stylecop): resolve SA1405 - add messages to Debug.Assert calls
* fix(stylecop): resolve SA1649 - rename files to match type names (partial)
* fix(stylecop): resolve SA1401 - convert fields to const/readonly (partial)
* fix(stylecop): resolve SA1116 - reformat multi-line parameters (partial)
* fix(stylecop): revert breaking changes, add V18 TODO comments
* fix: correct TODO comment for SA1306 - should rename to _completed
* Standardize API file names across modules - No code changes, file names.
- Extracts login model to a dedicated file and preserves binding behavior
- Renames multiple API files to align with updated conventions ( Just to match their names in the code, not changing the actual API names, i.e. no breaking changes )
- Updates DI extensions, mappings, and OpenAPI helpers to follow new naming
- Adjusts tests for consistent formatting and readability
- Preserves behavior; no logic changes, references kept intact
* fix(tests): refactor UserEmail to virtual property pattern
- Convert protected field _userEmail to virtual property UserEmail
- Remove dead code (_userEmail += "groupName" executed after request)
- Update derived test classes to use property instead of field
- Maintains original name to avoid breaking changes
- Follows best practice: virtual property allows derived class override
This was originally changed in my PR from UserEmail to _userEmail, so changing it back to ensure no breaking change, even though this is in a test class.
* Committing small fix to prevent a breaking change, adding commit for future removal.
* Renames helper class and removes BOM
Renames internal helper to follow naming conventions without the T prefix
Removes stray BOM from header to ensure clean compilation
No runtime behavior changes
* Split Physical FileSystem interface into it's own file.
* Split the IContentQueryService into it's own file
Also updated XML docs.
* Reverting the package-lock.json
* Updated the typo for Permision -> Permission
Updated the file name and class to: AddUserGroup2PermissionTable
This should be safe to do so as migrations are logged with their GUID's not the class names.
* Update src/Umbraco.Core/Scoping/CoreScope.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Reverting a binary change.
* Reverted rename of public migration class.
* Revert name in migration plan.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Ensure the description field added in a later migration for user groups is available when the earlier migration on this table runs.
* Update implementation of fix to store and use the state of UserGroupDto at the time of migrations.
* scaffolding of a collection text filter extension
* Refactor collection text filter to use API interface
* Fix incorrect tag
* Update types.ts
* Update collection-text-filter.extension.ts
* Add cancelation to debounced search on destroy
* clean up
* add js docs
* two way binding of filter value
* clean up
* Add collection text filter manifest example
Introduced a new filter manifest for the example collection and updated the main manifests file to include it. This enables a text filter extension for the example collection.
* Delete unused element and context
* Update src/Umbraco.Web.UI.Client/src/packages/user/user-group/collection/user-group-collection.context-token.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update user-group-table-collection-view.element.ts
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan
* Add loading indicator to data-type-picker-flow-modal
- Added _isLoading state variable
- Updated #getDataTypes() to set loading state with try-finally
- Added uui-loader component in #renderGrid() when loading
- Created test file with basic tests
- Fixed linter warnings
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
* Refactor: Replace inline styles with CSS class for loader
- Added .loader-container CSS class
- Removed inline styles from loader div
- Improves maintainability and follows best practices
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
* Improve tests and revert unrelated package-lock.json changes
- Test observable behavior (loader element) instead of private properties
- Added tests for loader visibility during loading states
- Added test for loader removal after loading completes
- Reverted unintended changes to Umbraco.Web.UI.Login/package-lock.json
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
* Refactor: Extract helper function in tests for cleaner code
- Added setLoadingState helper function to reduce code duplication
- Updated comments to reflect testing reactive state property
- Improved test readability and maintainability
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
* delete test file not testing anything
* show loading indicator in search field instead
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nielslyngsoe <6791648+nielslyngsoe@users.noreply.github.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Added tests for removing a not-found member picker
* Added tests for adding thumbnail to block
* Updated tests to match the test helper changes
* Refactor code to avoid duplication
* Added tests for removing a thumbnail from a block list/grid and refactor code
* Bumped version
* Bumped version and make tests run in the pipeline
* Update smokeTest command to use '@smoke' filter
---------
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
- Add noAccess observable to document and media tree item contexts
- Add visual styling (grayed out, italic, cursor: not-allowed) for noAccess items in tree views
- Implement click prevention to block navigation when noAccess is true
- Update document and media picker input contexts with type-safe guards to prevent selection of noAccess items
- Create type guard utilities (isDocumentTreeItem, isMediaTreeItem) in separate utils files
- Items with noAccess are shown for navigation but cannot be selected or opened
This implements Task 63363 for Feature 63060 "Handle Start Nodes"
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Block Grid: Resolve translation keys for group names (closes#20696)
Add localization support for block group names in two locations:
- Block Grid area type permission combobox options
- Block catalogue modal group headers
Translation keys (e.g., #content_isPublished) used as group names
are now properly resolved instead of displaying the raw key.
* fix: moves group.name to mapper so search works
* fix: localizes block types in permissions element too
---------
Co-authored-by: Claude <noreply@anthropic.com>
Fix collection create action causing full page navigation instead of SPA routing
When a collection create action had an href, clicking it would trigger a full
browser navigation instead of using history.pushState for SPA routing. This was
caused by event.stopPropagation() being called before the early return when an
href was present, preventing the global ensureAnchorHistory() listener from
intercepting the click event.
The fix moves stopPropagation() to only execute when we're actually handling
the click via execute() (no href), allowing href-based navigation to bubble
to the window-level router listener for proper SPA navigation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
style: fix SA1500, SA1111, SA1134 StyleCop warnings
Fixed 194 StyleCop analyzer warnings across the codebase:
- SA1500: Move opening braces to their own line for multi-line statements (80 warnings)
- SA1111: Move closing parenthesis to same line as last parameter (50 warnings)
- SA1134: Place each attribute on its own line (64 warnings)
Also added XML documentation to any public APIs within the edited files.
* implement preventEditInvariantFromNonDefault for variant blocks
* remove unused
* refactor to enforce both document and block case from the document module
* remove implementation from doc workspace
* prevent editing invariant blocks from non default
* remove unused imports
* more explicit class names
* Refactor invariant edit guard rule creation
Extracted the creation of the invariant property edit guard rule into a reusable _createRule method in the controller base class. Updated block and document workspace controllers to use this method
* Refactor invariant edit rule logic into base controller
Moved the logic for observing properties and variant options and applying property guard rules into a new _observeAndApplyRule method in the base controller. Updated document block and workspace controllers to use this shared method, reducing code duplication and improving maintainability.
* Refactor invariant block edit check into helper methods
Extracted logic for checking invariant blocks and default language datasets into private async methods for better readability and maintainability. This refactor also corrects a context check typo and improves error handling.
* remove unused
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
- Fixed inverted logic in #parseNumber method
- Changed Number.isFinite(num) ? undefined : num to Number.isFinite(num) ? num : undefined
- Previously, valid max values (e.g., 50) were being ignored and defaulting to 100
- Now correctly parses and uses the configured Maximum Value from data type settings
This ensures the Maximum Value setting in Slider datatype configuration
is properly enforced in the slider UI component.
* fix(backoffice): allow drag and drop into empty link picker (closes#21295)
* refactor: use classMap to avoid empty class attribute
* refactor: use margin/padding trick for drop zone
* refactor: use CSS :has() selector instead of class
* also enable it for the Document input
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Route server events for public access updates to indicate an update to the protected document.
* Add unit tests for all ServerEventSender notification handlers.
* Adds additional test recommended in code review.
* Addressed parameter name issue raised in code review.
* Removed margin-top to address the loader icon shifting when entering text
* Space
---------
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* Fix test entrypoint
* Fix healthcheck.sh
* Ensure bind mounts gets created on host
* Fix bind mounts permission issues
* Generate self signed cert for dev
* Only generate cert for localhost
* Fixup docker compose file
* Update templates/UmbracoProject/entrypoint.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update templates/UmbracoProject/Dockerfile
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix APP_UID runtime availability and optimize chown performance
- Export APP_UID as ENV so it's available at container runtime
(ARG values from .NET base image are only available at build time)
- Only run chown -R when directory ownership differs from APP_UID
to avoid slow recursive operations on large directories
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Fix bug where with recycle bin media protection on, the files on disk aren't deleted when the recycle bin is emptied.
* Fix display of media URL when in recycle bin and protection of trashed media is enabled.
* Clean-up of ContentCacheRefresher: resolved warnings and tidied up code and comments.
* Only flush the ID/Key map when content is deleted.
* Update src/Umbraco.Core/Cache/Refreshers/Implement/ContentCacheRefresher.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adding description to user groups
* Add description to dto and test and umbraco plan
* update unit test for user group
* remove change from link picker
* edit icon ui for user group
* Fixed table exists check in migration.
* update description in table user groups
* update user group editor css
* update description default
* remove description column element
* add ignore large method
* remove codesence
* update user group descriptions default
* Added description to constructor of ReadOnlyUserGroup.
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
When changing a property's variation setting (Shared/Invariant ↔ Variant) via Infinite Editing,
the document would fail to save with a 404 error.
This fix:
- Adds value migration fallback logic in UmbPropertyValuePresetVariantBuilderController
to find values when culture/segment doesn't match exactly
- Overrides reload() in UmbContentDetailWorkspaceContextBase to process incoming data
through _processIncomingData() for proper value transformation
- Detects property variation changes and triggers document reload to migrate values
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Avoid an unnecessary look-up for the super-user when resolving ID from key and vice versa.
Utilise an async database methods given the enclosing method is async.
* Applied suggestions from code review.
* Revered async amend (caused pipeline failures with integration tests).
* Apply suggestions from code review
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Added transitive dependency references to specific libraries where direct dependencies depend on vulnerable versions.
* Enable CentralPackageTransitivePinningEnabled.
* Update MS dependencies to 10.0.1 patch versions.
* Removed System.Text.Encodings.Web.
* Add TODOs for pinned dependency removal.
* working on a auto closing ... modal when focus leaves
* remove appsetting for local development
* rewrites the focus function to check if the shadow dom exsits before trying to set focus
* Fix JSON formatting in appsettings.Development.template.json
* Simplify focus logic in entity action list
Refactored the focus method to directly focus the first menu item after it is rendered, removing unnecessary nested updateComplete checks and focusing logic for the label button.
* Remove unused 'nothing' import and minor formatting
* Call ext.component?.focus() instead of chaining updateComplete promises.
* Update entity-action-list.element.ts
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
Co-authored-by: engjlr <enl@umbraco.dk>
* Add IMarkdownToHtmlConverter abstraction with Markdig and HeyRed implementations
- Add IMarkdownToHtmlConverter interface in Umbraco.Core.Strings
- Add MarkdigMarkdownToHtmlConverter using the Markdig library (new default)
- Add HeyRedMarkdownToHtmlConverter using HeyRed.MarkdownSharp (deprecated, for backwards compatibility)
- Update HealthChecks.MarkdownToHtmlConverter to use the new abstraction
- Update MarkdownEditorValueConverter to use the new abstraction
- Add unit tests for both markdown converter implementations
- Add unit tests for HealthChecks.MarkdownToHtmlConverter syntax highlighting
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from code review.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds a check to ensure notifications are only added to relevant CMS management API endpoints.
* Add null check for tagging actions to handle null management API GroupName.
* Provide abstraction for the DocInclusionPredicate when configuring SwaggerGenOptions.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Cache: Clear ContentTypeCommonRepository cache when data types change
When a data type's EditorAlias is changed (e.g., BlockList to SingleBlock), the ContentTypeCommonRepository 5-minute cache was not being cleared. This caused content types to return stale PropertyEditorAlias values until server restart, leading to validation using the wrong property editor validators.
The fix adds IContentTypeCommonRepository as a dependency to DataTypeCacheRefresher and calls ClearCache() in RefreshInternal(), matching the pattern already used in ContentTypeCacheRefresher and TemplateCacheRefresher.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Fixed the 22 warnings.
Also updated the XML documentation where required.
* Updating XML docs.
* Noted version in obsoletion message.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Use Append for response headers
- Replaces Add with Append when adding response headers to conform to IHeaderDictionary usage.
- Applies across unauthorized handling, redirects, and custom header signaling.
- Updates tests to use Append consistently.
- Removes ASP0019 from warnings in project configs to reflect new approach.
Silences deprecation warning in dev mode
Silences deprecated runtime-compile warning in dev mode
Keeps development-time runtime compilation enabled for in-memory dev setup
Relates to ASPDEPR003
* Bumped version
* Updated tests to match new changes
* Bumped version
* Bumped version
* Use isSuccessNotificationVisible instead of doesSuccessNotificationHaveText
* Updated tests to avoid flaky tests
* Bumped version of test helper
* Bumped version of test helper
* Bumped version
* Bumped version
* Bumped version
* Update waits to avoid hardcoded values
* fix(SYSLIB0051): Remove obsolete serialization constructors
Removes obsolete formatter-based serialization constructors from exception
classes to resolve SYSLIB0051 warnings. This is NOT a breaking change as:
- Binary serialization is deprecated in modern .NET
- No BinaryFormatter usage exists in the codebase
- Microsoft recommends removing these obsolete constructors
Affected files:
- AuthorizationException.cs
- BootFailedException.cs
- ConfigurationException.cs
- PanicException.cs
- UnattendedInstallException.cs
- RetryLimitExceededException.cs
- IncompleteMigrationExpressionException.cs
- HttpUmbracoFormRouteStringException.cs
- ModelBindingException.cs
Also removes SYSLIB0051 from WarningsNotAsErrors in project files.
* fix(SYSLIB0051): Mark obsolete serialization constructors for removal in v19
* fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword
fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword to hiding members
- Add 'new' modifier to Empty properties in BlockGridModel, BlockListModel, RichTextBlockModel
- Add 'new' modifier to DeepCloneWithResetIdentities in IContentType, IMediaType
- Add 'new' modifier to Save/GetById methods in IContentService, IMediaService, IMemberService
- Add 'new' modifier to EFCore interface members (IAmbientEFCoreScopeStack, IEFCoreScope)
- Add 'new' modifier to ExternalLoginSignInResult.NotAllowed and CreateMediaTypeRequestModel.Collection
- Improve XML documentation for edited public members
Note: CS0114 warnings (virtual/override) were intentionally not fixed as they may be breaking changes. Will add more details to the PR.
* fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword
fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword to hiding members
- Add 'new' modifier to Empty properties in BlockGridModel, BlockListModel, RichTextBlockModel
- Add 'new' modifier to DeepCloneWithResetIdentities in IContentType, IMediaType
- Add 'new' modifier to Save/GetById methods in IContentService, IMediaService, IMemberService
- Add 'new' modifier to EFCore interface members (IAmbientEFCoreScopeStack, IEFCoreScope)
- Add 'new' modifier to ExternalLoginSignInResult.NotAllowed and CreateMediaTypeRequestModel.Collection
- Improve XML documentation for edited public members
Note: CS0114 warnings (virtual/override) were intentionally not fixed as they may be breaking changes. Will add more details to the PR.
* Modifying the PR based on feedback from Andy.
Files Modified (Removed Duplicate Members)
src/Umbraco.Cms.Api.Management/ViewModels/MediaType/CreateMediaTypeRequestModel.cs
Removed duplicate Collection property (already defined in base class ContentTypeModelBase)
src/Umbraco.Core/Services/IContentService.cs
Removed duplicate GetById(Guid key) method (already in IContentServiceBase<IContent>)
Removed duplicate Save(IEnumerable<IContent> contents, ...) method (already in IContentServiceBase<IContent>)
src/Umbraco.Core/Services/IMediaService.cs
Removed duplicate GetById(Guid key) method (already in IContentServiceBase<IMedia>)
Removed duplicate Save(IEnumerable<IMedia> medias, ...) method (already in IContentServiceBase<IMedia>)
src/Umbraco.Core/Services/IMemberService.cs
Removed duplicate Save(IEnumerable<IMember> members, ...) method (already in IContentServiceBase<IMember>)
Files Left Unchanged (Keeping new keyword)
The following files were correctly fixed with the new keyword because they intentionally hide base members to return more specific types:
BlockGridModel.cs, BlockListModel.cs, RichTextBlockModel.cs - Empty returns specific type
IContentType.cs, IMediaType.cs - DeepCloneWithResetIdentities returns specific interface
ExternalLoginSignInResult.cs - NotAllowed returns ExternalLoginSignInResult instead of SignInResult
IEFCoreScope.cs, IAmbientEfCoreScopeStack.cs - re-declarations for documentation purposes
* fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword
fix: Resolve CS0108 compiler warnings by adding explicit 'new' keyword to hiding members
- Add 'new' modifier to Empty properties in BlockGridModel, BlockListModel, RichTextBlockModel
- Add 'new' modifier to DeepCloneWithResetIdentities in IContentType, IMediaType
- Add 'new' modifier to Save/GetById methods in IContentService, IMediaService, IMemberService
- Add 'new' modifier to EFCore interface members (IAmbientEFCoreScopeStack, IEFCoreScope)
- Add 'new' modifier to ExternalLoginSignInResult.NotAllowed and CreateMediaTypeRequestModel.Collection
- Improve XML documentation for edited public members
Note: CS0114 warnings (virtual/override) were intentionally not fixed as they may be breaking changes. Will add more details to the PR.
* Modifying the PR based on feedback from Andy.
Files Modified (Removed Duplicate Members)
src/Umbraco.Cms.Api.Management/ViewModels/MediaType/CreateMediaTypeRequestModel.cs
Removed duplicate Collection property (already defined in base class ContentTypeModelBase)
src/Umbraco.Core/Services/IContentService.cs
Removed duplicate GetById(Guid key) method (already in IContentServiceBase<IContent>)
Removed duplicate Save(IEnumerable<IContent> contents, ...) method (already in IContentServiceBase<IContent>)
src/Umbraco.Core/Services/IMediaService.cs
Removed duplicate GetById(Guid key) method (already in IContentServiceBase<IMedia>)
Removed duplicate Save(IEnumerable<IMedia> medias, ...) method (already in IContentServiceBase<IMedia>)
src/Umbraco.Core/Services/IMemberService.cs
Removed duplicate Save(IEnumerable<IMember> members, ...) method (already in IContentServiceBase<IMember>)
Files Left Unchanged (Keeping new keyword)
The following files were correctly fixed with the new keyword because they intentionally hide base members to return more specific types:
BlockGridModel.cs, BlockListModel.cs, RichTextBlockModel.cs - Empty returns specific type
IContentType.cs, IMediaType.cs - DeepCloneWithResetIdentities returns specific interface
ExternalLoginSignInResult.cs - NotAllowed returns ExternalLoginSignInResult instead of SignInResult
IEFCoreScope.cs, IAmbientEfCoreScopeStack.cs - re-declarations for documentation purposes
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Reverted the one of the changes and updated some XML doc tags.
* Should have committed these files.
Corrected a name space in the test files.
* Remove warning on missing access modifiers on interface members.
* Revert breaking namespace change.
* Fixed build errors following namespace reversion.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(tests): Replace obsolete APIs in Umbraco.TestData controllers
Replaced deprecated synchronous service methods with their modern async
equivalents in the TestData controllers to eliminate CS0618 warnings.
Changes:
- LoadTestController: Replace IFileService with ITemplateService,
use IDataTypeService.GetAsync(Guid) instead of GetDataType(int),
use IContentTypeService.CreateAsync() instead of Save()
- SegmentTestController: Use IContentTypeService.UpdateAsync()
instead of Save()
- UmbracoTestDataController: Use IContentTypeService.CreateAsync()
and UpdateAsync() instead of Save()
Also adds comprehensive XML documentation to all three controllers
including class summaries, constructor parameters, and method
documentation.
The controllers now use:
- Constants.DataTypes.Guids.TextstringGuid instead of magic int -88
- Constants.Security.SuperUserKey for async service operations
- Task<IActionResult> return types where async operations are used
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Further amends from code review.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(benchmarks): resolve obsolete BenchmarkDotNet API warnings
Update BenchmarkDotNet configuration to use current API methods:
- Replace deprecated `ManualConfig.Add()` with `AddDiagnoser()` for memory diagnostics
- Replace deprecated `ConfigExtensions.With()` with `AddJob()` for job configuration
- Initialize `_totalItemCount` field to suppress CS0649 warning
These changes resolve 4 compiler warnings (CS0618, CS0649) in the benchmark project
without any functional changes.
* Removing the benchmark artifacts and adding the folder to gitignore
* Added XML Docs to the files in Umbraco.Cms.Imaging.ImageSharp2
This commit fixes the missing XML documentation with the Umbraco.Cms.Imaging.ImageSharp2 project.
Now this project should have no build warnings.
* Update src/Umbraco.Cms.Imaging.ImageSharp2/UmbracoBuilderExtensions.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixing the build warnings in the Umbraco.Tests.Common Project
The main warning was about the file name not matching the class, this was because an interface was being defined first within the class file.
This should either be moved into its own file, or to the bottom of the file to fix this warning. Rather than creating a new file, I've moved the interface to the bottom, but if you'd prefer a new file, just let me know :)
Also removed the TODO in the project file and the WarningsNotAsErrors as they have all been resolved.
* Moved the interface into it's own file.
* Removed the interfaces folder.
- Replace obsolete constructor call that used IUmbracoContextAccessor
- Use new constructor with IDocumentUrlService instead
- Add using for Umbraco.Cms.Core.Services namespace
- Remove unused Umbraco.Cms.Core.Web namespace
The obsolete constructor was scheduled for removal in Umbraco 18.
This is an internal change only - ControllersAsServicesComposer is not
shipped with Umbraco.Templates package.
This commit fixes around 1,000 build warnings related to SA1117, this warning is related to ensuring each parameter passed into a function is on a new line OR all on one line.
I have also added XML code comments to any public function within these files and fixed some that had invalid / old comments.
When changing a property's variation setting (Shared/Invariant ↔ Variant) via Infinite Editing,
the document would fail to save with a 404 error.
This fix:
- Adds value migration fallback logic in UmbPropertyValuePresetVariantBuilderController
to find values when culture/segment doesn't match exactly
- Overrides reload() in UmbContentDetailWorkspaceContextBase to process incoming data
through _processIncomingData() for proper value transformation
- Detects property variation changes and triggers document reload to migrate values
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
fix(user): fix avatar change and remove functionality
- Fix "Change photo" button not working on subsequent clicks by using
{ once: true } on the event listener and resetting the input value
- Fix avatar not disappearing after removal by clearing _imgSrc when
imgUrls is set to empty array
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
The validation message was showing the total character count instead of how
many characters exceeded the limit. For example, with max=4 and input="12345",
it showed "5 too many" instead of "1 too many".
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Content Type Workspace: Sync current data after save to prevent navigation blocking
After saving a content type, only `_data.setPersisted()` was called without
`_data.setCurrent()`. An observer kept `current` in sync with the structure's
ownerContentType, but timing mismatches caused `persisted` and `current` to
differ, triggering false "unsaved changes" detection and blocking navigation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Fixed various obsolete .NET API calls.
These all show up as warnings when you try to build the Umbraco solution:
- SYSLIB0045 (6) - Use proper HashAlgorithm creation
- SYSLIB0023 (4) - Replace RNGCryptoServiceProvider with RandomNumberGenerator
- SYSLIB0021 (8) - Replace deprecated crypto types
- SYSLIB0013 (4) - Replace Uri.EscapeUriString
Fix unintended reference comparison in tests
Explicitly casts the mock property to string in a predicate to prevent reference equality checks. Adds constraints for storage type and editor to align with expected data characteristics and improve test reliability. Keeps mock service behavior unchanged; minor formatting tweak included.
* Fixes the warning CS8524 and tidying up the SetStatusRedirectUrlManagementController
I have added throwing an error in the switch statement if neither of the know enums is submitted to the API, in theory this should never happen.
The other option would be to simply return false, but I think throwing the exception is better as it will alert whoever is calling the API that their call is invalid.
* Update src/Umbraco.Cms.Api.Management/Controllers/RedirectUrlManagement/SetStatusRedirectUrlManagementController.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Improves log message clarity
- Refines a warning when a property type alias is missing, clarifying that a default value is returned.
- Improves backoffice token revocation log by including contextual client id for easier troubleshooting.
- Corrects model generation error logging by passing the exception as the first argument for consistency.
* Added tests for media delivery api
* Added tests for content delivery api
* Fixed import
* Added tests for Content Delivery API
* Updated skip tag and issue link for the failing tests
* Bumped version
* Refactor code for content delivery api tests
* Moved repeat steps to beforeEach and added more waits
* Bumped version
* Added more waits
* Updated variable names
* Grouped tests
* Renamed
* Fixed names
* Added tests for rendering content with block list
* Updated tests for rendering content with block lists
* Updated message when has no block lists
* Added tests for rendering content with block grid
* Updated code
* Bumped version
* Changed npm command to make tests run in the pipeline
* Fixed comment
* Reverted command
* fix(code-quality): resolve CS0628 warnings - change protected to private in sealed classes
Changed protected members to private in sealed classes across 26 files. Protected members in sealed classes serve no purpose since sealed classes cannot be inherited. This eliminates 57 CS0628 compiler warnings.
* fix: use public for NUnit SetUp methods per Copilot review
NUnit requires SetUp methods to be at least protected. Using public
avoids CS0628 while allowing NUnit to discover and execute the methods.
* Clean up
- Renames internal fields to clearer names and aligns with conventions
- Changes internal cache holder to use auto-properties for state ( fixes another build warning )
- Removes an unused exception type from the loader and cleans up unused usings
- Adds "Umbraco" to the list of known spellings in .vsCode settings file, amazed this wasn't already there :)
* Improvements to fix CodeScene Code Health Review issues.
- Introduces debug-only logging helpers and routes all log messages through them for consistency
- Centralizes retrieval of discoverable types and scanning logic to simplify paths
- Aligns logging of cached vs non-cached and slow paths with new helpers
- Documents data-holding structure used to store type lists for clarity
* Refactoring to make CodeScene happy, removing code duplication :)
Fix unawaited async calls in tests
- Converts setup to async and awaits data creation
- Awaits operation status update to fix potential unawaited calls
- Updates nested validation tests to use await for helper results
- Removes stray BOM character in a test file
- Improves overall async flow, addressing CS4014
Relates to CS4014
* TDD solution to Block level variance publishing changing to no variance retaining block level variance values and vica versa
* Add similar tests for the other block editors
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Amend the test scenarios
* Simplify the merge clean-up to remove all misaligned values.
* Fix failing test (remove false assumptions)
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* TDD solution to Block level variance publishing changing to no variance retaining block level variance values and vica versa
* Add similar tests for the other block editors
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Amend the test scenarios
* Simplify the merge clean-up to remove all misaligned values.
* Fix failing test (remove false assumptions)
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Add null checks in case content no longer exists
* Add logging statement
* Add integration tests for null handling in cache refresh services
Tests verify that DocumentUrlService and PublishStatusService
do not throw exceptions when called with non-existent content keys,
which can happen when processing stale cache instructions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add integration tests for stale cache instruction handling
Tests simulate the scenario where a cache instruction is processed
for content that has been deleted (stale instruction). This can happen when:
1. Content is saved (cache instruction queued)
2. Content is deleted before instruction is processed
3. Server restarts and processes the stale instruction
Tests cover:
- ContentCacheRefresher with RefreshBranch for deleted content
- ContentCacheRefresher with RefreshNode for deleted content
- MediaCacheRefresher with RefreshBranch for deleted media
- Processing instructions for content that never existed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Added tests for removing a not-found content picker
* Added comment
* Bumped version
* Change npm command to make tests run in the pipeline
* Reverted npm command
* Added base class
* Added implementation of base class
* Added missing parameter
* Added try-catch around delete operations in Purge() to ignore locked files during cleanup.
* Content: Fix name() and getName() to use active variant when no variantId provided
When calling `name()` or `getName()` without a variantId argument, the methods
now correctly return the name of the first active variant from the split view
instead of always returning the first variant in the data array.
The `name()` method now returns a reactive observable that updates when the
active variant changes, using `mergeObservables` to combine the split view's
active variant observable with the variants data.
The `getName()` method now uses `splitView.getActiveVariants()[0]` to get the
current active variant synchronously, with a fallback to the first variant if
no active variant is set.
This fixes an issue where block previews could not reactively observe the
document name because the callback parameter was always empty.
Closes#20759🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: use UmbVariantId.compare() for consistent variant matching
Address PR review feedback by using UmbVariantId.Create() and compare()
instead of direct property comparison. This ensures consistent behavior
with the existing variant comparison pattern used throughout the codebase.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: formatting
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Re-provide support for casting a published member to the models builder type.
* Used new constructor for MemberManager in unit tests.
* Fix failing unit tests.
* Relations: Fix descendants query to exclude parent item
The GetPagedDescendantsInReferences query was using a path LIKE without
the comma delimiter, causing it to match both the parent item and its
descendants. This resulted in the trash confirmation dialog showing
the item being deleted in the "descending items with dependencies"
list.
Changed the WhereLike call to use ",%" suffix instead of just "%",
so the query only matches actual descendants (items whose path
starts with the parent's path followed by a comma).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add integration test to verify behaviour.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Fix SQL Server deadlock during concurrent document updates
Add ReadLock on ContentTree in RefreshMemoryCacheAsync to prevent
deadlocks between cache refresh SELECT queries and concurrent document
UPDATE operations. The deadlock occurred because the operations accessed
umbracoNode and umbracoDocument tables in different orders.
The #debouncedLoadTree method was not awaiting repository initialization
before calling loadChildren() when hideTreeRoot was true. This caused a
"repository is missing" error in tree pickers like the Static File picker
used for block thumbnails.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Added tests for regression issue #20962
* Added tests for regression issue #20520
* Added tests for rendering content with RTE
* Added @release tags
* Bumped version
* Make new added tests run in the pipeline
* Updated dataTypeName
* Fixed comments
* Reverted npm command
* fix: add write lock at outer scope to prevent deadlocks in content publishing
Acquire a write lock on ContentTree at the start of PublishAsync to prevent
deadlocks. Previously, inner scopes would acquire read locks first (via
repository operations), then attempt to upgrade to write locks, causing
deadlocks when multiple transactions tried this simultaneously.
By acquiring the write lock at the outer scope, we ensure consistent lock
ordering and prevent the deadlock scenario.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Re-enable lazy locks
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Introduce new content type schema service and models
To be used in the future for content type schema generation.
* Do not fail when content type is not in cache, simply ignore
* Added unit and integration tests
* Fix failing unit tests
* Addressing comments from code review
* add content key and type to link info on RTE delivery API data. Fix tests to accomodate changes
* convert field type content-id -> destination-id. convert field type content-type -> link-type and use LinkType enum instead.
* revert unintended find and replace changes
* apply patch by kjac
* fix unit tests for RTE parsers
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* updates the drag event to convert types to lowercase
* clearing up
* clearing up
* Fixed style problem in safari and an unused parameter.
* Fixed lint error.
---------
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
* block context example
* fix clone method
* implement contextual variant id
* use contextual variant id
* ensure currentExposeOf uses elementType configuration
* make hasExposeOf use ElementType configuration for variatId
* Update src/Umbraco.Web.UI.Client/src/packages/rte/components/rte-base.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* rename to displayVariant
* use variantid in this case
* update readme
* return false
* remove unused imports
* return undefined
* append UmbWorkspaceViewElement interface
* remove test
* fallback to false
* fallback to false
* refactor what is not exposed.
* Fix#20944: Updating UI Slider number properties to accept decimal values (#20945)
* updating UI slider properties min, max, initial1, initial2 and step to accept decimal values
* Changes based on Copilot suggestions
* Used a smaller step value configuration.
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
Co-authored-by: engjlr <enl@umbraco.dk>
* Manifests: Fix misnaming and mis-registering of the document validation manifest (closes#21128) (#21139)
Fix misnaming and mis-registering of the document validation manifest.
* Performance: Optimize memory footprint of document URL cache (closes#21055) (#21066)
* Optimize memory footprint of document URL cache.
* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/DocumentUrlServiceTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Used properties, added some further comments.
* Fixed failing integration tests.
* Ensure no edge case exists where the culture code to language Id map isn't up to date with the newly created languages.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Block List: Sort mode (#21060)
* Block List: added sort-mode
* Fix missing closing bracket
* register sort mode toolbar element on start up
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
# Conflicts:
# src/Umbraco.Web.UI.Client/src/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.ts
* Update nightly build to include 16 as 17 is now main (#21144)
* Global search items missing Umbraco url segment (#20266)
* Add /umbraco url Segament for searched mapped results to aviod 404 og navigation away from backoffice
* Applied changes from code review.
---------
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* import
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jason Andrae <jasona@emergentsoftware.net>
Co-authored-by: Engiber Lozada <89547469+engijlr@users.noreply.github.com>
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Lucas Bach Bisgaard <rammi@rammi.dk>
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
* get full path of file
* get configuration umbracosspath from BE and use it when get css file
* fix lint error
* update for test fail
* add obsolete constructor
* Update src/Umbraco.Cms.Api.Management/Controllers/Server/ConfigurationServerController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update src/Umbraco.Cms.Api.Management/Controllers/Server/ConfigurationServerController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added `umbracoCssPath` to mock Server handler
* Added `umbracoCssPath` to Server Connection controller
* Removed the Tiptap Config Repository/Store code
we can simplify this by reusing the Server Context.
* Used `UMB_SERVER_CONTEXT` to get the `umbracoCssPath`
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Add /umbraco url Segament for searched mapped results to aviod 404 og navigation away from backoffice
* Applied changes from code review.
---------
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Optimize memory footprint of document URL cache.
* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/DocumentUrlServiceTests.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Used properties, added some further comments.
* Fixed failing integration tests.
* Ensure no edge case exists where the culture code to language Id map isn't up to date with the newly created languages.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Populate repository cache by GUID when retrieving documents by integer ID, to avoid database hit on subsequent retrieval by key.
* Apply same for media repository.
* Use existing helper to centralise generation of repository cache keys.
* Minor clean-up.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Applied suggestions from code review.
* Apply suggestions from code review
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Applied suggestions from code review.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Block Workspace: Only update view title when opened in modal context
Prevents unintended document title updates when block workspace is used
outside of modal context. Also adds early return in view controller when
no local title is available to avoid setting an empty title prefix.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* View Controller: Reactivate parent view when child is removed
When a non-inheriting child view (like a modal) is removed, the parent
view may have been deactivated. This change ensures the parent view is
reactivated to restore the browser title when the modal closes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/view/context/view.controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Docs: Add PR naming convention to CLAUDE.md
Integrate the PR naming guidelines from PullRequestNaming.md into the
Pull Request Process section of CLAUDE.md for better discoverability.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Remove area
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Introducing lock and logic to find directory to be deleted
* Obsoleting old ctor
* Expanding obsolete comment
* Adding new parameter to tests
* Adding database to failing integration tests.
* Adding more tests
* Fixing flawed logic
* Cleanup on FileSystemsTests.cs
UFM Filter base, check that the component is connected to the DOM
otherwise the context no longer exists and the `render` still runs,
giving a bunch of "missing filter" warnings.
fix: add write lock at outer scope to prevent deadlocks in content publishing
Acquire a write lock on ContentTree at the start of PublishAsync to prevent
deadlocks. Previously, inner scopes would acquire read locks first (via
repository operations), then attempt to upgrade to write locks, causing
deadlocks when multiple transactions tried this simultaneously.
By acquiring the write lock at the outer scope, we ensure consistent lock
ordering and prevent the deadlock scenario.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Adding allow content type alias settings and validator
* Creating private helper method for tests
* Revisiting logic for disallow types
* Adding tests for validator
* Obsolete unnecessary methods and overloads.
* Fix warning and update naming in tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Adjust the document type creation flow so that a template can be created for a content type
Add id, name and alias to the request payload to allow creating multiple templates for the same document type
Small adjustments
Remove unused import and unnecessary async
Switched content type template creation to content type controller
Missing constant export
# Conflicts:
# src/Umbraco.Web.UI.Client/src/packages/core/backend-api/sdk.gen.ts
* Add default implementation for CreateForContentTypeAsync
* Small adjustments from code review
* Introduce InvalidTemplateAlias content type operation status
* Add tests for CreateTemplateAsync and fix alias validation
- Add integration tests for ContentTypeService.CreateTemplateAsync:
- Success case with template association
- NotFound status for non-existent content type
- InvalidTemplateAlias for empty and too-long aliases
- Default template assignment verification
- Fix bug in TemplateService.CreateAsync where alias validation
occurred after GetViewContent call, causing ArgumentNullException
for invalid aliases instead of returning InvalidAlias status
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Use EagerWriteLock for long running operations
Switch from WriteLock to EagerWriteLock when acquiring the lock for
long running operations to ensure proper lock acquisition timing.
* Sync: Fix SyncBootStateAccessor to use ILastSyncedManager
Update SyncBootStateAccessor to use the new ILastSyncedManager interface
instead of the deprecated LastSyncedFileManager, which was causing cold
boots to be triggered every time.
- Replace LastSyncedFileManager field with ILastSyncedManager
- Add new primary constructor accepting ILastSyncedManager
- Add obsolete constructors for backwards compatibility using StaticServiceProvider
- Update GetSyncBootState to use GetLastSyncedExternalAsync
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Sync: Add integration tests for SyncBootStateAccessor
Add integration tests to verify SyncBootStateAccessor correctly
determines cold boot vs warm boot state based on ILastSyncedManager.
- Test cold boot when no last synced ID exists
- Test warm boot when last synced external ID matches a cache instruction
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Sync: Fix SyncBootStateAccessor to use ILastSyncedManager
Update SyncBootStateAccessor to use the new ILastSyncedManager interface
instead of the deprecated LastSyncedFileManager, which was causing cold
boots to be triggered every time.
- Replace LastSyncedFileManager field with ILastSyncedManager
- Add new primary constructor accepting ILastSyncedManager
- Add obsolete constructors for backwards compatibility using StaticServiceProvider
- Update GetSyncBootState to use GetLastSyncedExternalAsync
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Sync: Add integration tests for SyncBootStateAccessor
Add integration tests to verify SyncBootStateAccessor correctly
determines cold boot vs warm boot state based on ILastSyncedManager.
- Test cold boot when no last synced ID exists
- Test warm boot when last synced external ID matches a cache instruction
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Improve deletion logic in UmbracoContentIndex
When re-indexing a node it will first delete it, however in many cases the query to delete doesn't return anything, however a delete command is still executed with an empty integer collection. We can avoid allocating and iterating lists and avoid the deletion call all together if the collection is empty.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Clean-up and warning resolution whilst we are modifying class.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add entity collection item card extension type + default elements
* implement user collection item card
* fix selection events
* map to prop
* add prop/attr for href
* add support for which detail properties to show
* update type import
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* import card in correct file
* Fix event listener binding for selection events
* implement disabled property for collection item cards
* init commit of collection item ref extension
* fix imports
* add element interface
* Implement UmbEntityCollectionItemElement interface in item cards
Added the UmbEntityCollectionItemElement interface to document and user collection item card elements for improved type safety and consistency. Updated type exports to include the new interface.
* Update collection item ref to use uui-ref-node
Replaces the placeholder div with a uui-ref-node component, passing relevant item properties and event handlers. Adds dynamic icon rendering using umb-icon.
* Refactor entity collection item elements to use shared base
Introduces a new abstract base class for entity collection item elements, consolidating shared logic for card and ref variants. Updates card and ref element implementations to extend the new base, and refactors extension manifest interfaces for consistency. This improves maintainability and reduces code duplication.
* use class instead of magic string
* introduce ref and card collection view kinds
* Utilise card kind for user collection view
* Add item-specific href support to collection views
Introduces a requestItemHref method to collection contexts for retrieving item-specific hrefs. Updates card, ref, and user table collection views to use these hrefs, enabling dynamic linking for collection items. Refactors user table name column layout to accept href via value prop instead of constructing it internally.
* Update ManifestCollectionView import path
Changed the import of ManifestCollectionView from '../extensions/types.js' to '../view/types.js' to reflect its new location.
* use box
* render entity actions
* use edit path builder for user links
* rename method
* Revert "rename method"
This reverts commit 4df577688e.
* Update collection-default.context.ts
* make type lint ignore unused args with an underscore
* temp remove unused
* only make collection vie selectable if there are any registered bulk actions
* don't render name link if there is no href
* fix imports
* use selectable state
* Update language-table-collection-view.element.ts
* Update card-collection-view.element.ts
* clean up
* Refactor collection views to use shared base class
* refactor(collection): parallelize href fetching and make method private
* docs(examples): update collection example to use card and ref kinds
* docs(examples): add icon property to collection example data model
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/default/collection-default.context.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/view/types.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update collection-bulk-action.manager.test.ts
* Removed duplicate and redundant '@typescript-eslint/no-unused-vars' rule definitions, consolidating the configuration to use only 'argsIgnorePattern'.
* Handle missing user href in name column layout
Replaces the user name link with a span when the href property is not provided, preventing broken links in the user table name column layout.
* Update user-table-name-column-layout.element.ts
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
When multiple Umbraco extensions (e.g., BulletList and OrderedList) include
the same Tiptap extension (ListItem), duplicates were added to the extensions
array, causing Tiptap to log warnings. This change uses a Map to deduplicate
extensions by their name property before passing them to the Editor.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Added 'mandatory' tag as a visual indicator for webhook events being mandatory.
* Map the webhook validation for no events specified to a specific API response problem details message.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
The contributing documentation still referenced the old `contrib` branch,
which was causing AI tools to incorrectly use it as the base branch for
comparisons. Updated all references to use `main` instead.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* Back-office auth: Calculate token cookie names at request time
The __Host- cookie prefix enforces secure cookies at browser level,
which caused cookies to be rejected when running over HTTP in local
development environments even when UseHttps was set to false.
Cookie names are now calculated per-request based on both the UseHttps
setting and whether the current request is over HTTPS, matching the
logic used for the Secure cookie option.
* Update src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs
Co-authored-by: Sven Geusens <sge@umbraco.dk>
---------
Co-authored-by: Sven Geusens <sge@umbraco.dk>
* Adding functionality to overwrite the cacheduration for NewsDashboard
* Making the extension its own class, as to avoid having to inherit the entire service.
* Changing options to duration and adding interface
* Only validate segment values for cultures they are defined for.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Integration test suppressions.
* Remove previous implementation using ISegmentService and rely on values provided in the model to determine segments with cultures.
* Omit null culture and remove passing but unrealistic tests.
* Fixed nullability error.
* Apply suggestions from code review
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Relocated function following code review.
* Reset unchanged files.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* fix(backoffice): Tree menu item shows undefined for variant names without fallback
When a document variant has no name set and there's no fallback language
configured, the tree now falls back to the first variant with any name
instead of displaying "undefined".
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix(backoffice): Show (Untitled) when no variant has a name
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix: sets profiling cookie to httpOnly and strict in order to run non-secure
* fix: adds extra message to explain when you can set a cookie
* fix: simplify cookie explanation comment in WebProfilerRepository
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: checks that the profiler is actually enabled and/or disabled and warns the user if that is not the case
* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: uses localization string() to localize user-provided labels
* fix: localizes placeholder as well
* Refinements to the Toggle input
The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.
Added a `when` directive to show/hide the label `<span>` tag.
Removed `_currentLabel` as unused.
* Refinements to the Textbox input
The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.
Refactored the `uui-input` attributes/properties.
* Refinements to the Number input
The localizations can happen in the `config` setter,
then they don't need to re-get the localization each re-render.
Refactored the `uui-input` attributes/properties.
* Update src/Umbraco.Web.UI.Client/src/packages/core/components/input-toggle/input-toggle.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/text-box/property-editor-ui-text-box.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/number/property-editor-ui-number.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updates based on Copilot feedback
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added `icon-sort`
from Lucide's "arrow-down-up" icon.
* Added "Sort" package
with property action and context.
* Adds the "sort" property action and context to the Block Grid property
* [WIP] Observing sort mode toggle on Block Grid editor
* [WIP] Further work on Block Grid editor sort-mode
* Added "umb-sort-mode-toolbar" component
* Fixed typo of private method "renderNoting"
* Renamed "sort" property-action to "sort-mode"
* Corrected bad copypasta!
* Renamed "Sort" package to "Sorter"
to include the Sorter controller and maintain backwards-compatibility.
* Code updates based on @copilot feedback
* Fixed circular references
* Removed reference to "sorter/index.ts"
that I'd missed when relocating the package.
* Moved "sorter" back into "core" package
* Moved the "sort" property-action to a combined "property-actions" location
Fixed up other code, use of constants and manifest clarity.
* rename with claude code (#21036)
* rename with claude code
* include property action in name
* renaming
* Rename sortingMode to isSortMode in property sort context
Refactored property sort mode context and related components to use 'isSortMode'
* add jsdocs
* Update vite.config.ts
* no need to export as element
* add tests
* Ordered the tsconfig namespaces
* Reverted the relocation of the "sorter" controller files
* Import ordering
* Reverted some code style tweaks
* Renamed `sortingMode` to `isSortMode`
* Renamed `sortModeEnabled` to `isSortMode`
* Add tests for property sort mode action
* add js docs
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* fix: sets profiling cookie to httpOnly and strict in order to run non-secure
* fix: adds extra message to explain when you can set a cookie
* fix: simplify cookie explanation comment in WebProfilerRepository
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: checks that the profiler is actually enabled and/or disabled and warns the user if that is not the case
* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: uses 'href' as property instead of attribute
* build: runs on PR to release branches
* Content references: Avoid requesting references for content that is not yet persisted server side (#21035)
* Avoid requesting references for content that is not yet persisted server side.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* refactor to use condition
* revert
* danish translations
* da translation
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* fix: CTRL+Click now opens links in new tab on Linux
The router's anchor click handler incorrectly assumed non-Windows
platforms use Meta (⌘) key for "open in new tab". This broke
CTRL+Click on Linux, which uses CTRL like Windows.
Changed detection from "is Windows" to "is Mac" so Linux correctly
uses CTRL+Click while Mac continues to use Meta+Click.
Also replaced deprecated navigator.platform with navigator.userAgent.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
refactor(backoffice): remove unused uui-dialog element in modal component
Remove dead code that created an unnecessary uui-dialog element inside uui-modal-dialog. The uui-modal-dialog component already manages its own internal dialog element, making the manual creation redundant.
This aligns the dialog implementation with the sidebar implementation pattern, where container elements manage their own internal structure.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* Add entity collection item card extension type + default elements
* implement user collection item card
* fix selection events
* map to prop
* add prop/attr for href
* add support for which detail properties to show
* update type import
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/item/entity-collection-item-card/entity-collection-item-card.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* import card in correct file
* Fix event listener binding for selection events
* implement disabled property for collection item cards
* init commit of collection item ref extension
* fix imports
* add element interface
* Implement UmbEntityCollectionItemElement interface in item cards
Added the UmbEntityCollectionItemElement interface to document and user collection item card elements for improved type safety and consistency. Updated type exports to include the new interface.
* Update collection item ref to use uui-ref-node
Replaces the placeholder div with a uui-ref-node component, passing relevant item properties and event handlers. Adds dynamic icon rendering using umb-icon.
* Refactor entity collection item elements to use shared base
Introduces a new abstract base class for entity collection item elements, consolidating shared logic for card and ref variants. Updates card and ref element implementations to extend the new base, and refactors extension manifest interfaces for consistency. This improves maintainability and reduces code duplication.
* use class instead of magic string
* Use ifDefined for href in item card element
* Fix href attribute handling in collection item ref
* Make meta property optional in ManifestEntityCollectionItemBase
* Use ifDefined for href binding in document card
* Fix user card href binding with ifDefined
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: adds `termOrDefault` to be able to safely fall back to a value if the translation does not exist
* feat: accepts 'null' as fallback
* feat: uses 'termOrDefault' to do a safe null-check and uses 'willUpdate' to contain number of re-renders
* feat: uses null-check to determine if key is set
* chore: accidental rename of variable
* uses `when()` to evaluate
* revert commits
* fix: improves the fallback mechanism
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* move legacy icons into a folder
* regenerate icons
* icon compile script for custom
* Reverts "icon-company" to use "building-2" from latest Lucide version
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Implement form control for user picker property editor.
* Added form control support to member picker property editor.
* Added form control support to member group picker property editor and removed super.value.
* Reverted max state to infinity.
* Removed console.log inside the render.
* Removed duplicated import.
* Import missing input components in member picker tests
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Return not found when request for content references when entity does not exist.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Move check for entity existence from controller to the service.
* Update OpenApi.json.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Addressed points raised in code review.
* Update OpenApi.json
* Resolved breaking changes.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit da94e0953b)
* Return not found when request for content references when entity does not exist.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Move check for entity existence from controller to the service.
* Update OpenApi.json.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Addressed points raised in code review.
* Update OpenApi.json
* Resolved breaking changes.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Applies checks for root folders to static file tree service.
* Add integration tests.
* Fix ancestor test.
* Amends from code review.
* Integration test compatibility suppressions.
* Reverted breaking change in test base class.
(cherry picked from commit 84c15ff4d7)
* Applies checks for root folders to static file tree service.
* Add integration tests.
* Fix ancestor test.
* Amends from code review.
* Integration test compatibility suppressions.
* Reverted breaking change in test base class.
* Fix infinite recursion and incorrect error notifications in tree children loading
This commit addresses two critical issues in the tree item children manager:
1. **Infinite recursion vulnerability**: The #resetChildren() method called
loadChildren(), which could recursively call #resetChildren() again if
the underlying issue persisted, creating an infinite loop.
2. **Inappropriate error messages**: The "Menu loading failed" notification
was shown even in legitimate scenarios, such as when deleting the last
child of a node, where an empty tree is the expected outcome.
Changes made:
- Add ResetReason type ('error' | 'empty' | 'fallback') to differentiate
between error states and expected empty states
- Extract #loadChildrenWithOffsetPagination() as a terminal fallback method
that uses only offset pagination and never calls #resetChildren(),
structurally preventing recursion
- Update #resetChildren() to:
- Accept a reason parameter to determine whether to show error notification
- Reset all retry counters (#loadChildrenRetries, #loadPrevItemsRetries,
#loadNextItemsRetries) to ensure clean state
- Call #loadChildrenWithOffsetPagination() instead of loadChildren()
- Only show error notification when reason is 'error'
- Update all call sites of #resetChildren() with appropriate reasons:
- 'error' when retries are exhausted (actual failures)
- 'empty' or 'fallback' when no new target is found (may be expected,
e.g., after deleting items)
The fix makes infinite recursion structurally impossible by creating a
one-way flow: target-based loading can fall back to #resetChildren(),
which calls offset-only loading that never recurses back.
* Fix undefined items array causing tree to break after deletion
This fixes the root cause of issue #20977 where deleting a document type
would cause the tree to "forever load" with a JavaScript error.
The error occurred in #getTargetResultHasValidParents() which called .every()
on data without checking if it was undefined. When the API returned undefined
items (e.g., after deleting the last child), this caused:
TypeError: can't access property "every", e is undefined
The fix adds a guard to check if data is undefined before calling .every(),
returning false in that case to trigger the proper error handling flow.
* Address code review feedback on terminal fallback method
- Change error throwing to silent return for graceful failure handling
- Remove target pagination state updates from offset-only loading method
- Update JSDoc to clarify that method does not throw errors
* Add migration to fix umbracoPropertyData column casing.
* Improve migration with column existence check and logging
- Add ILogger to log when column is renamed
- Check if column exists with incorrect casing before renaming
- Use fluent Rename API instead of raw SQL
- Add XML remarks documentation
?? Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Clarify what old and new column name really is
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kjac <kja@umbraco.dk>
# Conflicts:
# src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
* Add migration to fix umbracoPropertyData column casing.
* Improve migration with column existence check and logging
- Add ILogger to log when column is renamed
- Check if column exists with incorrect casing before renaming
- Use fluent Rename API instead of raw SQL
- Add XML remarks documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Clarify what old and new column name really is
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kjac <kja@umbraco.dk>
Use AddComponent for OpenAPI security scheme registration
Fixes security requirements being serialized as empty objects in the
OpenAPI document by using the document's AddComponent method instead
of directly manipulating the SecuritySchemes dictionary.
Update table view icon to 'icon-table'
Replaces the 'icon-list' icon with 'icon-table' for all table view manifests across multiple packages to improve consistency and better represent the table view visually.
* Add validation property to PropertyEditorSettingsProperty
Introduces a 'validation' field to the PropertyEditorSettingsProperty interface, allowing configuration of mandatory status and custom mandatory messages for property editor settings.
* Pass validation property to umb-property component
* add menu context and breadcrumbs for document type folders
* add menu context and breadcrumbs for media type folders
* add menu context and breadcrumbs for media type folders
* add menu context and breadcrumbs for partial view folders
* add menu context and breadcrumbs for partial view folders
* add menu context and breadcrumbs for script folders
* Register menu structure workspace contexts and breadcrumbs for document blueprints
* fix menu alias
* remove from blueprints
* fix wrong path when navigating from an inner folder to an outer
* remove debugger
* fix structure link between variant to invariant
* fix up path generation
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* fix: deprecates the upgrade checker
* fix: removes any deprecated UI that no longer has a function for upgrade checks in the backoffice
* chore: generates new api types
* chore: deprecates types
* chore: returns direct task
* docs: explains deprecation
* chore: deprecated model
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Fix preview showing published version when Save and Preview is clicked multiple times
Fixes#20981
When clicking "Save and Preview" multiple times, the preview tab would show the published version instead of the latest saved version. This occurred because:
1. Each "Save and Preview" creates a new preview session with a new token
2. The preview window is reused (via named window target)
3. Without a URL change, the browser doesn't reload and misses the new session token
4. The stale page gets redirected to the published URL
Solution: Add a cache-busting parameter (?rnd=timestamp) to the preview URL, forcing the browser to reload and pick up the new preview session token. This aligns with how SignalR refreshes work.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Improve Save and Preview to avoid full page reloads when preview is already open
When clicking "Save and Preview" multiple times with a preview tab already open, the entire preview tab would reload. This enhancement makes it behave like the "Save" button - only the iframe reloads, not the entire preview wrapper.
Changes:
- Store reference to preview window when opened
- Check if preview window is still open before creating new session
- If open, just focus it and let SignalR handle the iframe refresh
- If closed, create new preview session and open new window
This provides a smoother UX where subsequent saves don't cause the preview frame and controls to reload, only the content iframe refreshes via SignalR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Close preview window when ending preview session
Changes the "End Preview" behavior to close the preview tab instead of navigating to the published URL. This provides a cleaner UX and ensures subsequent "Save and Preview" actions will always create a fresh preview session.
Benefits:
- Eliminates edge case where preview window remains open but is no longer in preview mode
- Simpler behavior - preview session ends and window closes
- Users can use "Preview website" button if they want to view published page
Also removes unnecessary await on SignalR connection.stop() to prevent blocking if the connection cleanup hangs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix preview cookie expiration and add proper error handling
This commit addresses cookie management issues in the preview system:
1. **Cookie Expiration API Enhancement**
- Added `ExpireCookie` overload with security parameters (httpOnly, secure, sameSiteMode)
- Added `SetCookieValue` overload with optional expires parameter
- Marked old methods as obsolete for removal in Umbraco 19
- Ensures cookies are expired with matching security attributes
2. **PreviewService Cookie Handling**
- Changed to use new `ExpireCookie` method with explicit security attributes
- Maintains `Secure=true` and `SameSite=None` for cross-site scenarios
- Uses new `SetCookieValue` overload with explicit expires parameter
- Properly expires preview cookies when ending preview session
3. **Frontend Error Handling**
- Added try-catch around preview window reference checks
- Handles stale window references gracefully
- Prevents potential errors from accessing closed window properties
These changes ensure preview cookies are properly managed throughout their
lifecycle and support both same-site and cross-site scenarios (e.g., when
the backoffice is on a different domain/port during development).
Fixes#20981🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Track document ID for preview window to prevent reusing window across different documents
When navigating from one document to another in the backoffice, the preview window reference was being reused even though it was showing a different document. This meant clicking "Save and Preview" would just focus the existing window without updating it to show the new document.
Now we track which document the preview window is showing and only reuse the window if:
1. The window is still open
2. The window is showing the same document
This ensures each document gets its own preview session while still avoiding unnecessary full page reloads when repeatedly previewing the same document.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove updates to ICookieManager and use Cookies.Delete to remove cookie.
* Fix file not found on click to save and preview.
* Removed further currently unnecessary updates to the cookie manager interface and implementation.
* Fixed failing unit test.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Created condition for workspace content type unique.
* Changed import.
* Revert import.
* Updated name in the alias example and also import.
* Update src/Umbraco.Web.UI.Client/examples/entity-content-type-condition/index.ts
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Update src/Umbraco.Web.UI.Client/examples/entity-content-type-condition/workspace-view-unique.element.ts
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Moved the manifest definition to the manifest file.
* Changed default export.
* Updated example element to render the real GUID.
* Fixed import.
* Replaced CONTENT_WORKSPACE for PROPERTY_STRUCTURE_WORKSPACE context.
* Moved content type unique condition to the content type folder.
* Fixed import.
* final adjustments
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Adding the sorter controller, and fixing some ui elements so you are able to drag the hostname elements around to sort them
* Fixed sorting
* Changed the html structure and tweaked around with the css to make it look better.
Added a description for the Culture section.
Alligned the rendered text to allign better with the name "Culture and Hostnames"
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts
Forgot to remove this after I was done testing
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/culture-and-hostnames/modal/culture-and-hostnames-modal.element.ts
Changing grid-gap to just gap
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Removed the disabled and readonly props I added since they are not needed.
Removed the conditional rendering that was attached to the readonly and disabled properties
* Removed the item id from the element and changed css and sorter logic to target the hostname-item class instead
* Updated test
* Bumped helpers
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* Adds choose directive to @umbraco-cms/backoffice/external/lit
This can then allow choose to be imported like so
import { html, customElement, LitElement, property, css, choose } from '@umbraco-cms/backoffice/external/lit';
* Exports all of Lits directives for @umbraco-cms/backoffice/external/lit
Also puts them in alphabetical order to help add any new ones Lit may add in the future
* Regenerate delivery api claud memory file for updated file lines and inclusion of Secure Cookie-Based Token Storage
* Add delivery api memory file
* claude memory file for in memory modelsbuilder project
* Claud memory file for Imagesharp project
* Claude memory file for legacy image sharp project
* Claude memory files for Persistence projects
* Remaining claude memory files
* Log Viewer: Refactor log types chart to use Lit repeat directive
- Import and use repeat directive for better performance
- Add _logLevelKeys state property to track log level keys
- Update setLogLevelCount() to populate _logLevelKeys
- Replace .map() with repeat() in render method for legend and donut slices
- Update willUpdate to observe both filter and response changes
- Resolves TODO comment about using repeat directive
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Donut Chart: Add inline numbers and fix tooltip positioning
- Add showInlineNumbers property to optionally display numbers inside slices
- Implement #getTextPosition() method to calculate text position at slice center
- Render SVG text elements when showInlineNumbers is enabled
- Fix tooltip positioning to appear near cursor (changed from x-10, y-70 to x+10, y+10)
- Recalculate container bounds on each mouse move to handle window resize
- Add pointer-events: none to tooltip to prevent mouse interference
- Add CSS styling for slice numbers (user-select: none)
- Enable inline numbers by default in log viewer log types chart
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Donut Chart: Add clickable slices and visible description
- Add href property to donut-slice element for clickable slices
- Wrap SVG paths in <a> tags when href is provided
- Update Circle interface to include href property
- Add showDescription property to optionally display description text
- Render description as visible text below the chart
- Add CSS styling for description text
- Update log-types-chart to build search URLs with log level and date range
- Observe dateRange from context to build accurate search URLs
- Enable clickable slices and visible description in log-types-chart
Now clicking on a donut slice navigates to the search view filtered by that log level and the current date range.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: uses whole link
* Log Viewer: Fix log types chart layout for larger screens
Add media query to switch from column to row layout on screens wider than 768px. This ensures the legend and donut chart are displayed side by side on desktop resolutions instead of stacked vertically.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: improves mock function
* chore: formatting
* fix: ensures the donut chart works responsively
* feat: adds support for SVGAElement in the router
* adds key for description
* chore: adds test data
* feat: displays numbers in the legend instead of the chart
* chore: restores functionality with lower-cased keys
* fix: adds translation to 'log messages'
* chore: removes unused method
* feat: ensures that the log levels follow the generated LogLevelModel enum from the server, which requires to map the keys as JSON camelCase's the keys
* fix: uses correct property
* fix: reverts back to the original behavior to calculate a relative URL (rather than the automatic .toString() that gets a qualified URL)
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: uses fullUrl for router
* fix: properly translates new aria-label
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added tests for notification emails for content
* Bumped version
* Updated tests for notification permission in content
* Added appsettings.json for smtp tests
* Added smtp test project
* Updated nightly E2E test pipeline yaml file to run smtp project in the pipeline
* Fixed command to run smtp4dev in Docker
* Fixed pipeline
* Only run smtp tests on Linux
* Debugged
* Debugging
* Added step to stop smtp4dev container
* Debugging
* Updated port
* Reverted tests
* Added more tests for notification emails
* Formatted code
* Fix css for login screen dark mode
* Removes the outer-layout wrapper, moving the flexbox to the host
Sets the fallback for `--umb-auth-backdrop` to `--uui-color-surface`
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* fix: adds localization to the log viewer
* fix: missing log viewer keys for English
* fix: translations for Danish
* fix: removes unused keys and replaces polling keys
* fix: lowercases values to match what was there before
* Fix validation for url and anchor of multi url picker
* fix codesence warning
* remove redundant validation
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
* Allowed selection of all available fields in Examine search results, and fix layout issue when not all records have all fields.
* Updates from code review.
Add menu item registration examples
Introduces example implementations for registering action, link, and entity menu items in the backoffice. Includes manifests and API to demonstrate how to extend the menu system.
* Updated the content-name element to use the DocumentItemDataResolver.
* Import sorting
* Defaults the entity-type to "document"
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Adds localization manifests for region-specific cultures
This is to support backwards-compatibility and v13 upgradability.
* Removed `uiCulture` from Vietnamese localizations
since it duplicated the English fallback texts.
* 'en' localization file formatting
* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
---------
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds localization manifests for region-specific cultures
This is to support backwards-compatibility and v13 upgradability.
* Removed `uiCulture` from Vietnamese localizations
since it duplicated the English fallback texts.
* 'en' localization file formatting
* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update Swashbuckle to v10
* Regenerate backoffice api client
* Add missing space for consistency
* Simplify nullability check
* Small improvement
Didn't notice that these classes were internal, so tried keeping compatibility, but it wasn't needed.
* Fix failing integration test
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Remove unnecessary comma
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: adds correct fallback for dates to avoid console error
* fix: resolves a TODO by using UmbStringState over rxjs Subject
* Refactor log viewer search to use UmbStringState and improve architecture
- Replace RxJS Subject with UmbStringState to follow Umbraco patterns
- Move debounced search observation to messages list component
- Only triggers when component is mounted (logs are visible)
- Prevents unnecessary API calls on other views
- Simplify search input to just update context state
- Add semantic form structure with role="search" for accessibility
- Add visually-hidden submit button for keyboard navigation
- Allow re-running same query via form submission (bypasses debounce)
- Follow same architecture pattern as date range selector
This resolves the TODO to not use RxJS directly and significantly improves
separation of concerns where the data consumer (messages list) owns the
fetching logic.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add visible refresh button to log viewer search input
- Add refresh button with icon-refresh next to save and clear buttons
- Allows users to re-run search with same query (bypasses debounce)
- Remove form structure that couldn't work due to Shadow DOM boundaries
- Simplify parent component by removing form submission logic
- Keep role="search" for accessibility
The refresh button provides a more discoverable UI than the hidden submit
button approach and avoids Shadow DOM event bubbling issues.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix debouncing by adding local state in search input
- Add local UmbStringState to debounce user input (250ms)
- Only update context filterExpression after debounce
- Remove debouncing from messages list (now handled at input level)
- Saved searches and refresh button still bypass debounce for immediate feedback
This restores the expected debouncing behavior while maintaining the clean
architecture where the messages list triggers searches based on context changes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: cleans up in docs
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated block list tests as the “Add Block” button is hidden after reaching the maximum limit.
* Updated validation option due to UI changes
* Updated tests for current user profile as waitForNetworkToBeIdle() is removed
* Fixed flaky tests
* Bumped version
* Updated tests for current user profile
* Bumped version
* Preserve existing Examine FieldDefinitionCollection if it already exists (#20267)
* Fix missing bracket
* Minor tidy/addition of comments; addition of unit tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
(cherry picked from commit 908974c6ac)
* Preserve existing Examine FieldDefinitionCollection if it already exists (#20267)
* Fix missing bracket
* Minor tidy/addition of comments; addition of unit tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* add empty trash icon and use it for empty trash-bin and delete from trash-bin
* package lock
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add MemberType/MemberTypeContainer to supported EntityContainer object types
* Implement MemberTypeContainerRepository
* Update and add member type container API endpoints
* Complete server and client-side implementation for member type container support.
* Fix FE linting errors.
* Export folder constants.
* Applied suggestions from code review.
* Updated management API authorization tests for member types.
* Resolved breaking change on copy member type controller.
* Allow content types to be moved to own folder without error.
* Use flag providers for member type siblings endpoint.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Ensure redirects with domains are stored with the domain node id prefix.
* Handle removal of self-referencing redirect when domains are used.
* Use entity path to save further queries for retrieving ancestor IDs.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Applied refactoring suggested in code review.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Use empty folder under temp as localized text source folder in non umbraco core integration tests.
* Added clarifying comment to the GetLocalizedTextService override for tests
Handles rich text blocks created with TinyMCE in convert local links migration.
Refreshes internal datatype cache following migration requiring cache rebuild.
# Conflicts:
# src/Umbraco.Infrastructure/Migrations/MigrationPlanExecutor.cs
Handles rich text blocks created with TinyMCE in convert local links migration.
Refreshes internal datatype cache following migration requiring cache rebuild.
Handles rich text blocks created with TinyMCE in convert local links migration.
Refreshes internal datatype cache following migration requiring cache rebuild.
* Removed skips for tests whose related issues have been fixed.
* Remove skip tags and update tests for content with list view
* Removed skip tags
* Added comment and change to fixme for tests that need to implement later
* Removed skip tag
* Bumped version
* configure max chars for textbox
* min 1
* Adds server-side check for text box min and max character validation.
* Applied suggestion from code review.
* Bumped version of test helper
* Fixed test that was creating a text string data type with too large a maximum characters setting.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
* Replace dependency track bom script with devops task
* Introduce new url variable in order to fix new task uri
The initial variable contained the api path (/api) in the URL.
Redact back-office PKCE codes from the server (#20847)
* Redact back-office PKCE codes from the server
* Update src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Redact back-office PKCE codes from the server
* Update src/Umbraco.Cms.Api.Common/DependencyInjection/HideBackOfficeTokensHandler.cs
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Removes npm commands from the MSBuild of the CSPROJ of the umbraco-extension dotnet new template
Was agreed by the community package team to remove this, as this DX can cause more issues than actually help users in our opinion
* Removed the unused value - good catch by Copilot
* Adding fix for self-referncing redirects for 17
* Using umbraco context on failing tests
* Tests to see if self referencing redirects gets deleted
* Refactoring and adding correct tests.
* Expanding tests for RedirectTrackerTests.cs
* Optimize by only retrieving th list of existing URLs for a content item if we have a valid route to create a redirect for.
* Extract method refactoring, added explanatory comment, fixed warnings and formatting.
* Resolved warnings in RedirectService.
* Minor naming and formatting refactor in tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Move access/refresh tokens to secure cookies (#20779)
* feat: adds the `credentials: include` header to all manual requests
* feat: adds `credentials: include` as a configurable option to xhr requests (and sets it by default to true)
* feat: configures the auto-generated fetch client from hey-api to include credentials by default
* Add OpenIddict handler to hide tokens from the back-office client
* Make back-office token redaction optional (default false)
* Clear back-office token cookies on logout
* Add configuration for backoffice cookie settings
* Make cookies forcefully secure + move cookie handler enabling to the BackOfficeTokenCookieSettings
* Use the "__Host-" prefix for cookie names
* docs: adds documentation on cookie settings
* build: sets up launch profile for vscode with new cookie recommended settings
* docs: adds extra note around SameSite settings
* docs: adds extra note around SameSite settings
* Respect sites that do not use HTTPS
* Explicitly invalidate potentially valid, old refresh tokens that should no longer be used
* Removed obsolete const
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Remove configuration option
* Invalidate all existing access tokens on upgrade
* docs: updates recommended settings for development
* build: removes non-existing variable
* Skip flaky test
* Bumped version of our test helpers to fix failing tests
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* Added form control support to color picker.
* Avoid submit when readonly is true.
* Added mandatory support.
* Added form control support to date picker.
* Removed an unused import.
* Added form control and mandatory support to document picker.
* Added form control support to Eye dropper.
* Added. mandatory support for multi url picker also bind inner input in the eye dropper.
* Removed unused import.
* fix update of value
* fixing not needed override of get and set methods
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Added mandatory support for block grid property editor.
* Added form control and mandatory support to code editor.
* Added form control and mandatory support to markdown editor.
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Implemented input-with-alias in the content-type-design-editor.
* Added auto-generate-alias property to the input and revert deletion of checkAliasAutoGenerate method.
* Added form-validation-message.
* Added validation to the input-with-alias element to avoid special characters.
* Chenged right and left position of the infobox.
* Added focus support to open the modal.
* Moved tabindex out the constructor and added support for enter and space keys.
* Removed isLoding condition from the rich media input and let the thumbnail handle the loader.
* Removed unused import.
* change loader and adjust lit property configuration
* update reflect configuration
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* chore(mock): adds missing try/catch around document lookup
* fix: lets the 'save and preview' button extend the 'save' button to follow the same logic in terms of when it enables/disabled - it did not have much logic before
* fix: runs validation from the server when save and previewing to ensure the UI shows what is missing
Update icon usage in collection menu and example data
Replaces <uui-icon> with <umb-icon> in the default collection menu item element to support colors. Also updates example picker data source items to showcase color support.
* Exclude the relate parent on delete relation type from checks for related documents and media on delete, when disable delete with references is enabled.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Applied suggestions from code review.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: adds the `credentials: include` header to all manual requests
* feat: adds `credentials: include` as a configurable option to xhr requests (and sets it by default to true)
* feat: configures the auto-generated fetch client from hey-api to include credentials by default
* Add OpenIddict handler to hide tokens from the back-office client
* Make back-office token redaction optional (default false)
* Clear back-office token cookies on logout
* Add configuration for backoffice cookie settings
* Make cookies forcefully secure + move cookie handler enabling to the BackOfficeTokenCookieSettings
* Use the "__Host-" prefix for cookie names
* docs: adds documentation on cookie settings
* build: sets up launch profile for vscode with new cookie recommended settings
* docs: adds extra note around SameSite settings
* docs: adds extra note around SameSite settings
* Respect sites that do not use HTTPS
* Explicitly invalidate potentially valid, old refresh tokens that should no longer be used
* Removed obsolete const
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* sql column type map include dateonly and timeonly
* Split Mapper and add check null value
* Minor code tidy resolving a few warnings.
* add spaces
* clean code
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix for partial view caches not being cleared when content is published/unpublished
* Update src/Umbraco.Core/Cache/Refreshers/Implement/ContentCacheRefresher.cs
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Change logic for clearing partial view cache
* Changed logic to only clear partial cache when content is published/unpublished or trashed
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Adds new dictionary/localization item for the clipboard dialog clear all prompt
* Removes the wrapping uui-box and moved inside the component itself
* Adds Clear Clipboard button and logic
* Adds uui-box from outer components consuimg this into this component
* Adds a header to uui-box
* Adds a conditional uui-button when we have items in clipboard
* Adds confirm dialog/prompt to ask if user wants to clear all items
* Adds in general_clipboard item to use in the UUI-box header
* Removes extra space & moves the requestItems outside the for loop
* Be a better citizen
Make sure the promise for the modal is caught and we return out early if user explictiy cancels modal or presses ESC
* Cleanup my noisy comments for a re-review
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* WiP blocklist migration
* Mostly working migration
* [WIP] deconstructed the migration to prefetch and process all data that requires the old definitions
* Working singleblock migration
* Abstracted some logic and applied it to settings elements too.
* Align class and file name.
* Minor code warning resolution.
* More and better comments + made classes internal where it made sense
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add MemberType/MemberTypeContainer to supported EntityContainer object types
* Implement MemberTypeContainerRepository
* Prepare base controller for MemberTypeTreeControllerBase.
* Revert "Prepare base controller for MemberTypeTreeControllerBase."
This reverts commit ad213a23ad.
* Added foldersOnly flag in readiness for support in 17.1.
* Added foldersOnly flag in readiness for support in 17.1 (2).
---------
Co-authored-by: Ronald Barendse <ronald@barend.se>
* Added integration tests for PropertyTypeUsageService and adjusted assert in management API permissions test.
* Commented or fixed management API integration tests verifying permissions where we were asserting on an error response.
Added 'label attribute to the uui-button in the umb-news.card.element + Removing the redundant text for uui-button since label attribute is now present
* Fix block list inline mode
https://github.com/umbraco/Umbraco-CMS/issues/20618
* Fixed potential runtime errors
* Code cleanup
* Fixed Code Health Review
* Revert some changes
Commented out unused state properties and related code.
* Remove commented-out state property in block workspace view
* fix localization
* no need for question mark after ids, they should be presented as required
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Fix block list inline mode
https://github.com/umbraco/Umbraco-CMS/issues/20618
* Fixed potential runtime errors
* Code cleanup
* Fixed Code Health Review
* Revert some changes
Commented out unused state properties and related code.
* Remove commented-out state property in block workspace view
* fix localization
* no need for question mark after ids, they should be presented as required
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Add errorDetail property to umb-entity-item-ref
Add optional errorDetail property to display additional context
(such as file paths or IDs) in error states. This enhances the
error display to show both the error message and relevant details.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Make _removeItem protected in UmbPickerInputContext
Change #removeItem from private to protected to allow subclasses
to reuse the removal logic while customizing the confirmation dialog.
This enables better extensibility for specialized picker contexts.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Fix static file picker to show error state for missing files
Update umb-input-static-file to observe statuses and render based
on item state (loading, error, success). When a static file is
missing (API returns empty array), displays error state with alert
icon and file path detail using umb-entity-item-ref.
Also adds standalone property support for proper single-item styling.
Fixes#19329🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Show file path in static file remove confirmation dialog
Override requestRemoveItem in UmbStaticFilePickerInputContext to
display the file path instead of "Not found" in the confirmation
dialog when removing missing static files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Show GUID in document picker error state
Display the document GUID as errorDetail when a document is
not found (deleted/gone). This provides useful context for
editors to identify which document was referenced.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Show GUID in document picker remove confirmation dialog
Display the document GUID instead of "Not found" in the remove
confirmation dialog when the document no longer exists. This
provides useful context for editors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: apply the temp model which the context uses
* Refactor: Move requestRemoveItem logic to base UmbPickerInputContext
Eliminated duplicate code across three picker contexts by:
- Adding protected getItemDisplayName() method to base class
- Moving requestRemoveItem implementation to base class
- Removing duplicate implementations from document, member, and static file pickers
- Static file picker overrides getItemDisplayName() to show file path
Net reduction: 19 lines of code (69 removed, 50 added)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Document Type Picker: Show error state for missing items (fixes#20367)
Apply the same error state handling to the document type picker that was
implemented for static files, documents, and members. When a referenced
document type is missing or deleted:
- Show error state with the GUID as errorDetail
- Allow removal with proper confirmation dialog
- Use umb-entity-item-ref for error display
- Use uui-ref-node-document-type for successful items
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Additional pickers: Show error states for missing items in user, language, media-type, member-type, member-group, and user-group pickers
Apply the same error state handling pattern to six additional picker types:
- user-input: Users
- input-language: Languages
- input-media-type: Media types
- input-member-type: Member types
- input-member-group: Member groups
- user-group-input: User groups
All pickers now:
- Observe statuses from UmbRepositoryItemsManager
- Show error state with GUID when referenced item is missing/deleted
- Use umb-entity-item-ref for error display
- Use specialized components (uui-ref-node, umb-user-group-ref, etc.) for successful items
- Allow removal with proper confirmation dialog showing GUID
Maintains code reusability by using the base class requestRemoveItem method
with getItemDisplayName() for consistent error handling across all pickers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Lint: Remove unused 'when' imports from input-media-type and user-group-input
* Refactor: Add #renderItem helper method to all pickers for consistency
- Add #renderItem to user-input (extracted from inline repeat callback)
- Change _renderItem to #renderItem in user-group-input for consistency
- Change _renderItem to #renderItem in input-static-file for consistency
All 10 pickers now use consistent #renderItem helper method pattern,
improving code readability and maintainability as suggested by @nielslyngsoe
* `import` sorting
* Corrected (old) JSDoc typos
* Markup tidy-up
* exported `UmbPropertyEditorUIStaticFilePickerElement` as `element`
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Moves the _data.updateCurrent() call inside the updateLayoutBlock conditional
in setMasterTemplate(). This prevents spurious change detection when loading
templates from the server, while maintaining proper change tracking when users
actually modify the master template via the UI.
This completes the fix started in PR #20529 which added the updateLayoutBlock
parameter but inadvertently left the data model update outside the conditional.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
* Added custom validation for missing password and user/email
* Changed some of the logic behind custom validation, so it now uses aria-errormessage
* fix: imports from src folder instead
* build(deps-dev): bump vite to 7.2.0
* formatting
* fix: moves the form into the login.page.element.ts component to better control submission
* fix: creates elements globally
* fix: adds id back to form
* fix: no need to store references to all form elements
* fix: errormessage should show with password field in a span as well
* fix: checks validity of form
* fix: constructs form in auth.element.ts anyway and append localization to validation and add oninput and onblur
* chore: fixes import paths
* fix: fixes special case where ?status was not reset
* fix: changes wording in english
* fix: removes duplicate en-us keys
* feat: adds ariaLive and role attributes
* fix: always clears the text
* fix: username required validation should switch between username and email
* package-lock.json updated on (re)install
* Renamed SVG eye icon filenames
to be conventional and kebab-cased.
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Fix config value access in UmbSliderPropertyValuePreset
Updated the `UmbSliderPropertyValuePreset` class to ensure the `.value` property is accessed for configuration items. This change improves the accuracy of retrieving `enableRange`, `min`, `max`, and `step` values, addressing potential bugs in value processing.
Co-authored-by: Luuk Peters <Luuk.Peters@proudnerds.com>
* Add setter to allow handling of requests to subscribe to newsletter on install.
* Correct serialization of newsletter subscription request.
* Fix serialization and use the Umbraco.EmailMarketing service for newsletter signup.
* Remove logging of user when setting telemetry level.
* Applied suggestions from code review.
* Fix memory leak with IOptionsMonitor.OnChange and non-singleton registered components.
* Dispose disposable data editors in ValueEditorCache.
* Removed unnecessary refactoring and clarified code comments.
* fix: Tiptap Media Picker: Skip media picker modal when editing existing images
Fixes the media picker workflow to match v13 behavior where clicking
an existing image directly opens the alt text/caption editor instead
of forcing users to re-select the same image from the media library.
Also fixes caption text extraction to properly read from the figcaption
node using Tiptap's NodeSelection API instead of unreliable attribute-based
approach.
Changes:
- Skip media picker when currentMediaUdi exists (lines 77-92)
- Extract caption from NodeSelection.node using descendants() (lines 55-73)
- Add NodeSelection export to tiptap externals for proper typing
* Refactor: Extract nested logic from media picker execute method
Reduces cyclomatic complexity from 15 to 1 by extracting conditional
logic into focused private helper methods. Addresses CodeScene warnings
for complex method and nested conditionals (bumpy road smell).
Created helper methods:
- #extractMediaUdi, #extractCaption, #findFigcaptionText
- #getMediaGuid, #updateImageWithMetadata
No functional changes - improves maintainability and testability.
* Added skip tag for the failing tests due to the issues and added waits for the flaky tests
* Commentted code as the reference items displays randomly
* Bumped version
* Added more waits to avoid the flaky tests
* Updated tests for setting culture and hostnames since the first content already has the default domain
* Fixed flaky tests
* Updated tests since the reload step is flaky
* Added more waits for the flaky tests in Windows
* Need to publish first document before set domain for second document
* Make permission tests run in the pipeline
* Added step to ensure the rollback action is completed
* Reverted npm command
* Added skip tag for the permission tests
* Fixed test for the culture and hostname permission
* Removed waits as it is includes in test helper
* Fixed test for adding a media in RTE Tiptap property editor
* Updated test helper function to avoid the flaky tests releated to block
* Added more waits to ensure image uploaded
* Bumped version
* Bumped version
* Reverted
* Reverted code
* Bumped version of test helper
* Bumped version
* Reverted code
* Added more waits to avoid flaky tests
* Added more waits
* Updated nightly pipeline: remove v17/dev, run different app setting tests by default and not run Relation Type in Linux as they are too flaky
* Added more waits
* Added npm command for testWindows
* Added more waits after creating a folder
* Add MoveFile it IFileSystem and implement on file systems.
* Rename media file on move to recycle bin.
* Rename file on restore from recycle bin.
* Add configuration to enabled recycle bin media protection.
* Expose backoffice authentication as cookie for non-backoffice usage.
Protected requests for media in recycle bin.
* Display protected image when viewing image cropper in the backoffice media recycle bin.
* Code tidy and comments.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Introduced helper class to DRY up repeated code between image cropper and file upload notification handlers.
* Reverted client-side and management API updates.
* Moved update of path to media file in recycle bin with deleted suffix to the server.
* Separate integration tests for add and remove.
* Use interpolated strings.
* Renamed variable.
* Move EnableMediaRecycleBinProtection to ContentSettings.
* Tidied up comments.
* Added TODO for 18.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Make the RTE treat an "empty" value as a non-value
* Additional tests
* Add tests for invariant and variant content.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Localized RTE property-editor UI label, removing "[Tiptap]"
* Updated acceptance test
* Localized the button label in the data-type and property-editor picker modals
* Based on @copilot suggestion, localized the property-editor UI label in the other places
* Added mandatory property to number range property editor and bind it to the inner input.
* Added mandatory message support.
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Added request cache to content and media lookups in mult URL picker.
* Allow property editors to cache referenced entities from block data.
* Update src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add obsoletions.
* Minor spellcheck
* Ensure request cache is available before relying on it.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
* Added request cache to content and media lookups in mult URL picker.
* Allow property editors to cache referenced entities from block data.
* Update src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add obsoletions.
* Minor spellcheck
* Ensure request cache is available before relying on it.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
* Generate BOM files on build
* Upload BOM to Dependency Track
* Move Backoffice BOM generation to right after install
The build and/or pack steps are deleting files that are needed for the BOM to be generated properly.
* Split the BOM uploads into different jobs
* Fix wrong usage of parameters
* Move order of dependency track stage
* Fix wrong umbracoVersion value
* Small fixes
* Log curl response headers
* Correct version sent to dependency track
* Adjusted curl flags
* Fix bom file path
* Fix dotnet bom file name
* Add Login UI to dependency track
* Generate BOM for E2E Tests
* Move dependency track stage
* Move acceptance test .env generation to e2e install template
Needed as the post install script is expecting this to exist.
* Use major version if public release
* Missing ')'
* Reverted npm install command changes in static assets project
* Generate BOM files on build
* Upload BOM to Dependency Track
* Move Backoffice BOM generation to right after install
The build and/or pack steps are deleting files that are needed for the BOM to be generated properly.
* Split the BOM uploads into different jobs
* Fix wrong usage of parameters
* Move order of dependency track stage
* Fix wrong umbracoVersion value
* Small fixes
* Log curl response headers
* Correct version sent to dependency track
* Adjusted curl flags
* Fix bom file path
* Fix dotnet bom file name
* Add Login UI to dependency track
* Generate BOM for E2E Tests
* Move dependency track stage
* Move acceptance test .env generation to e2e install template
Needed as the post install script is expecting this to exist.
* Use major version if public release
* Missing ')'
* Reverted npm install command changes in static assets project
* enforce update of children when collection
* only load one above and below collection children
* take 50 above a target for default experience
* revert reset target
* remove old impl
* Generate BOM files on build
* Upload BOM to Dependency Track
* Move Backoffice BOM generation to right after install
The build and/or pack steps are deleting files that are needed for the BOM to be generated properly.
* Split the BOM uploads into different jobs
* Fix wrong usage of parameters
* Move order of dependency track stage
* Fix wrong umbracoVersion value
* Small fixes
* Log curl response headers
* Correct version sent to dependency track
* Adjusted curl flags
* Fix bom file path
* Fix dotnet bom file name
* Add Login UI to dependency track
* Generate BOM for E2E Tests
* Move dependency track stage
* Move acceptance test .env generation to e2e install template
Needed as the post install script is expecting this to exist.
* Use major version if public release
* Missing ')'
* Reverted npm install command changes in static assets project
* enforce update of children when collection
* only load one above and below collection children
* take 50 above a target for default experience
* revert reset target
* remove old impl
* Added request cache to content and media lookups in mult URL picker.
* Allow property editors to cache referenced entities from block data.
* Update src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add obsoletions.
* Minor spellcheck
* Ensure request cache is available before relying on it.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
Add 'not trashed' condition to document bulk actions
Introduces the UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS to various document-related bulk action manifests, ensuring actions like duplicate, move, publish, unpublish, and trash are only available for entities that are not already in the recycle bin.
* Better title for icon colors
* Add name for legacy colors
* Translations of colors
* Fixed import, adding missing colour, added Italian translations.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Implimented an inline toggle button to show/hide your password, also changed the css to accommodate these changes
* Cleaned the css
Added the svg's to their own const for easy reuse
Added localization for the arialabel on the button
Seperated the createFormLayoutItem so there is a seperate for the password input
Moved all the conditional logic in the onclick event to fit inside one if/else statement
* Removed old logic that added a 100ms timeout that would sometimes be enough for localization to load, and replaced it with a function.
The function will try and resolve the promise by checking if the localize.terms methods returns a changed value, if not then it retries every 50ms or untill it hits a max retry of 40/2 seconds.
* Re adding the hide for -ms-reveal to support Microsoft Edge browsers
* Removed a console.log
* Alligned the button behavior so it fits better with what we have in the uui libary.
Now the button is always visible instead of appearing on hover or when in focus
* Update src/Umbraco.Web.UI.Login/src/auth.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Login/src/auth.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @iOvergaard
* Apply suggestion from @iOvergaard
* Adding the requested changes via my own fork (#20664)
Changed the logic for waitForLocallization Added the svg's as files that are imported instead of having the raw svg in the code
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Have to control of the state store navigation for custom sections or overrides
* revert wording
* move logic and update comment
---------
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Added mandatory support to property-editor-ui-number.
* Added form control to property-editor-ui-tags
* Added validator to the slider when value is missing and support for mandatory and mandatory message.
* Removed unnecessary ternary.
* Removed white space lit error.
* Fix tags input to handle undefined items array
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* utility
* ability to replace
* deprecate removeStatus
* no need to call this any longer
* Sort statuses and ensure not appending statuses, only updating them
# Conflicts:
# src/Umbraco.Web.UI.Client/src/packages/core/repository/repository-items.manager.ts
* change property value to an object
* add const for picker data source type
* Add value editor and converter server-side
* register schema for property editor + move settings ui
---------
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Trees: Restore backward compatibility for file system based tree controllers (closes#20602) (#20608)
* Restore backward compatibility for file system based tree controllers.
* Aligned obsoletion messages.
* Reverts nullability update on ConvertNotificationToRequestPayload.
* Remove unused help controller
* Correct documentation links
* Link to the new release site for compares
* Remove unused translation key with reference to Our
* Update NoNodes / NotFound to point to the forum instead of Our
* Change dashboards form Our to Forum and de-emphasize Discord as a support channel
* Removes Help controller reference
* Forgot to rename the css Id
* Update src/Umbraco.Web.UI.Client/src/assets/lang/ar.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix typo in Community Forum help menu item name
* Refer to releases instead of a download page
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update the default dashboard with better content and clearer headings
* Obsolete the HelpController instead
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add ID when updating background job
* Reduce default period to 5 seconds
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Currently it's not possible to use characters like "_" and "-" in aliases due to this check - At least that is was @nul800sebastiaan told me 😇
Suggested fix for #20622
* Preview Device: refactored config
Fixed "flip" icon style.
Removed "shadow" as unnecessary.
Renamed "className" to "wrapperClass" to be descriptive.
* Preview element CSS refinement
* Preview element: load in private extensions
* Added "Preview Environments" preview-app
Made `unique`, `culture` and `segment` observable in the context.
* Aligned preview-app design
with `hidden` attribute and design consistency.
* Created "Preview" package
* Relocated "Preview Apps" and Context to the new package
* Deprecated `UmbDocumentPreviewRepository` (for v19)
as the methods have moved to `UmbPreviewRepository`.
* Removed Preview Sessions event listeners
* Changed localization from "End" to "Exit"
* chore: consumes context only when needed
* feat: uses the UmbPreviewRepository instead
* feat: adds localization to errors and ensures the function does not randomly throw
* feat: prevents creating a new repository for every click
* feat: prevents potential memory leak by adding a signal to the events added to each iframe update
* feat: adds a custom interface to prevent typescript errors
* feat: ensures new string states are checked properly
* docs: adds comment to avoid confusion
* feat: sets up scaling once per iframe load rather than on each update
* fix: ensures that you can go back to the default segment again
* feat: closes popovers when clicking on the iframe (losing blur) and if selecting an item (expect for devices)
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Not show the empty tile when filtering is active.
* Added mandatory property to the icon picker.
* Avoid deselecting the icon on second click when not showing the empty option.
* Extends the form control mixin to the icon picker.
* Used super.value.
* Support mandatory from settings config.
* Removed mandatoryConf.
* remove requestUpdate
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Removes preview sessions concept
Fixes#19443 and #19471.
The implementation of exiting sessions was a design flawed.
The v13 feature worked due to an implementation bug.
Exiting preview mode should be a deliberate action by the user.
* Added check to only find .css files in FileSystemTreeServiceBase.cs
* Marking GetFiles as virtual and overriding it in StyleSheetTreeService.cs to only find .css files
* Redone tests to fit new format
* Fix tests to use file extensions
* Adding file extensions to all other relevant tests
* Adding file filter to remaining trees
* Adding tests to ensure invalid filetypes wont show
* Encapulation and resolved minor warnings in tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added check to only find .css files in FileSystemTreeServiceBase.cs
* Marking GetFiles as virtual and overriding it in StyleSheetTreeService.cs to only find .css files
* Redone tests to fit new format
* Fix tests to use file extensions
* Adding file extensions to all other relevant tests
* Adding file filter to remaining trees
* Adding tests to ensure invalid filetypes wont show
* Encapulation and resolved minor warnings in tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Use tryExecute for delete API call
Replaces direct await of #delete with tryExecute to improve error handling in the delete method of UmbManagementApiDetailDataRequestManager.
* utility
* ability to replace
* deprecate removeStatus
* no need to call this any longer
* Sort statuses and ensure not appending statuses, only updating them
# Conflicts:
# src/Umbraco.Web.UI.Client/src/packages/core/repository/repository-items.manager.ts
* utility
* ability to replace
* deprecate removeStatus
* no need to call this any longer
* Sort statuses and ensure not appending statuses, only updating them
* hotfix: ensures that local urls stay relative so we land up on the correct backoffice host that the user initiated the preview session from originally
* feat: since ensureAbsoluteUrl is never supplied anymore, we can remove the parameter altogether
* Remove unused dependency
* Expose IsExternal for URLs
* feat: adds localize controller
* chore: generates api models
* feat: marks the internal preview default url as relative, so that the `<base>` tag is taken into consideration - that way the URL will open on whatever host is active
* Remove IsExternal from the API again
* regenerate types
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Add 'Trashed' state to document workspace view
Introduces a new 'Trashed' label and tag for documents in the workspace view. Updates localization to include the 'Trashed' term for improved clarity when displaying trashed documents.
* Show trashed state in media workspace info view
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Be consistent in use of GetOrCreateAsync overload in exists and retrieval.
Ensure nullability of ContentCacheNode is consistent in exists and retrieval.
* Applied suggestion from code review.
* Move seeding to Umbraco application starting rather than started, ensuring an initial request is served.
* Tighten up hybrid cache exists check with locking around check and remove, and use of cancellation token.
* feat: replaces manual WebSocket with the actual SignalR library on the preview context
* feat: informs the developer what went wrong in preview mode
* feat: awaits the stop connection before proceeding
* feat: ensures no existing connection exists
* clean up
* localizations
* group user permission by entity type
* adjustments
* fix lint errors
* Support granular permissions without entity type
Updated granular permission handling to allow permissions that are not tied to a specific entity type. Adjusted rendering logic and manifest interface to support undefined or empty forEntityTypes, and added UI for displaying ungrouped granular permissions.
* revert for now
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Reduce log level of image cropper converter to avoid flooding logs with expected exceptions.
* Don't run publish branch long running operation on a background thread such that UmbracoContext is available.
* Revert to background thread and use EnsureUmbracoContext to ensure we can get an IUmbracoContext in the URL providers.
* Updated tests.
* Applied suggestion from code review.
* Clarified comment.
* Reduce log level of image cropper converter to avoid flooding logs with expected exceptions.
* Don't run publish branch long running operation on a background thread such that UmbracoContext is available.
* Revert to background thread and use EnsureUmbracoContext to ensure we can get an IUmbracoContext in the URL providers.
* Updated tests.
* Applied suggestion from code review.
* Clarified comment.
Fixes SQL error to ensure database relation between user group media start folder and deleted media item is removed.
# Conflicts:
# src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs
* Tiptap toolbar config: enable removal of unregistered extensions
* Tiptap statusbar config: enable removal of unregistered extensions
* Tiptap toolbar config: Typescript tidy-up
* Tiptap toolbar sorting amend
Removed the need for the `tiptap-toolbar-alias` attribute,
we can reuse the `data-mark`.
* Tiptap extension config UI amend
If the extension doesn't have a `description`,
then add the `alias` to the title/tooltip, to give a DX hint.
* Tiptap toolbar: adds `title` to placeholder skeleton
* Added missing `forExtensions` for Style Select and Horizontal Rule toolbar extensions
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/toolbar-configuration/property-editor-ui-tiptap-toolbar-configuration.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/statusbar-configuration/property-editor-ui-tiptap-statusbar-configuration.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Be consistent in use of GetOrCreateAsync overload in exists and retrieval.
Ensure nullability of ContentCacheNode is consistent in exists and retrieval.
* Applied suggestion from code review.
* Move seeding to Umbraco application starting rather than started, ensuring an initial request is served.
* Tighten up hybrid cache exists check with locking around check and remove, and use of cancellation token.
(cherry picked from commit 81a8a0c191)
* Be consistent in use of GetOrCreateAsync overload in exists and retrieval.
Ensure nullability of ContentCacheNode is consistent in exists and retrieval.
* Applied suggestion from code review.
* Move seeding to Umbraco application starting rather than started, ensuring an initial request is served.
* Tighten up hybrid cache exists check with locking around check and remove, and use of cancellation token.
* Store local time zone as UTC and do not throw validation error when stored time zone is different
* Additional fixes when switching between date time editors with and without time zone
* Additional fixes
* Ensure that an update is triggered when the expected value does not match the stored value
This will happen when switching between editors (with and without time zone) or switching between a specific time zone to the editor's local time zone.
* Fix inconsistencies with null and undefined
* Fix inconsistencies between date/time provided to the client and returned in the value converter (when switching between editors)
* Fix unit tests and small bug
* Adjust integration test
* Small improvement
* Update test data
* Adjust logic so that time zone offsets are updated every time the date value changes
* Do not pre-select time zone when switching between unspecified and time zone editors
* Tiptap toolbar config: enable removal of unregistered extensions
* Tiptap statusbar config: enable removal of unregistered extensions
* Tiptap toolbar config: Typescript tidy-up
* Tiptap toolbar sorting amend
Removed the need for the `tiptap-toolbar-alias` attribute,
we can reuse the `data-mark`.
* Tiptap extension config UI amend
If the extension doesn't have a `description`,
then add the `alias` to the title/tooltip, to give a DX hint.
* Tiptap toolbar: adds `title` to placeholder skeleton
* Added missing `forExtensions` for Style Select and Horizontal Rule toolbar extensions
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/toolbar-configuration/property-editor-ui-tiptap-toolbar-configuration.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/statusbar-configuration/property-editor-ui-tiptap-statusbar-configuration.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* register structure context for recycle bin
* Update manifests.ts
* export consts
* move href construction to context + override for document and media
* Preview Exit: Gets the page's published URL on exit for redirect
* Preview Open Website: Uses the page's published URL
* Tweaked the published URL logic
* Code amends based on @copilot's suggestions
(cherry picked from commit d5a2f0572e)
* Preview Exit: Gets the page's published URL on exit for redirect
* Preview Open Website: Uses the page's published URL
* Tweaked the published URL logic
* Code amends based on @copilot's suggestions
* make document and media readonly when trashed + reload the entity
* introduce restore event + remove readonly
* handle media audit log todos
* disable content type picker when trashed
* disable template picker when trashed
* Introduce configurable batch size for indexing
* Stop using Examine indexing events for reporting index rebuild operation completeness (it is volatile)
* Block List: adds `$index` support for UFM labels
* Block Grid: adds `$index` support for UFM labels
* Block RTE: adds `$index` support for UFM labels
Which is always zero `0`.
But has been wired up if we do implement the index order in future.
* Updated tests
* E2E: Updated acceptance tests to match changes (#20493)
* Updated tests to match changes
* More updates
* Bumped version
* Reverted change
* feat: adds first draft of a context consume decorator
* feat: uses an options pattern
* feat: changes approach to use `addInitializer` and `queueMicroTask` instead
* feat: adds extra warning if context is consumed on disconnected controllers
* feat: example implementation of consume decorator
* feat: adds support for 'subscribe'
* feat: initial work on provide decorator
* docs: adds license to consume decorator
* feat: adds support for umbraco controllers with `hostConnected`
* feat: uses asPromise to handle one-time subscription instead
* test: adds unit tests for consume decorator
* feat: adds support for controllers through hostConnected injection
* feat: adds support for controllers through hostConnected injection
* test: adds unit tests for provide decorator
* docs: adds more documentation around usage and adds a few warnings in console when it detects wrong usage
* feat: removes unused controllerMap
* docs: adds wording on standard vs legacy decorators
* docs: clarifies usage around internal state
* feat: adds proper return types for decorators
* docs: adds more types
* feat: makes element optional
* feat: makes element optional
* feat: uses @consume in the log viewer to showcase
* chore: cleans up debug info
* feat: renames to `consumeContext` and `provideContext` to stay inline with our own methods
* chore: removes unneeded typings
* chore: removes not needed check
* chore: removes not needed check
* test: adds test for rendered value
* feat: splits up code into several smaller functions
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* docs: augments code example for creating a context
* Update src/Umbraco.Web.UI.Client/src/packages/log-viewer/workspace/views/search/components/log-viewer-search-input.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Made card element it is own reusable component and passing the data as property.
* Created the umb-news-container element to handle all the priority grouping.
* Added hover styles to normal-priority cards.
* Removed unused variable.
* add pickable to vs code dictionary
* set up types for pickable filters in data sources
* pass search pickable filter to search result
* apply filter config in document data source example
* add pickable filters to custom tree example
* Update input-entity-data.context.ts
* remove unused
* Update types.ts
* Added request caching to media picker media retrieval, to improve performance in save operations.
* WIP: Update or insert in bulk when updating property data.
* Add tests verifying UpdateBatch.
* Fixed issue with UpdateBatch and SQL Server.
* Removed stopwatch.
* Fix test on SQLite (failing on SQLServer).
* Added temporary test for direct call to NPoco UpdateBatch.
* Fixed test on SQLServer.
* Add integration test verifying the same property data is persisted as before the performance refactor.
* Log expected warning in DocumentUrlService as debug.
(cherry picked from commit 12adfd52bd)
* Added request caching to media picker media retrieval, to improve performance in save operations.
* WIP: Update or insert in bulk when updating property data.
* Add tests verifying UpdateBatch.
* Fixed issue with UpdateBatch and SQL Server.
* Removed stopwatch.
* Fix test on SQLite (failing on SQLServer).
* Added temporary test for direct call to NPoco UpdateBatch.
* Fixed test on SQLServer.
* Add integration test verifying the same property data is persisted as before the performance refactor.
* Log expected warning in DocumentUrlService as debug.
* Remove Microsoft.CodeAnalysis.CSharp from Infrastructure project
This was only needed for runtime compilation and thus is no longer needed in Infrastructure.
It also caused dependency problems with EF Core Design in previous versions.
* Disable CPM for UI project to better reflect consumers
This will ensure that we face any potential dependency issues consumers are also likely to run into.
* Add `Microsoft.CodeAnalysis.CSharp` reference to `Umbraco.Cms.DevelopmentMode.Backoffice`
* Remove Microsoft.CodeAnalysis.CSharp from Infrastructure project
This was only needed for runtime compilation and thus is no longer needed in Infrastructure.
It also caused dependency problems with EF Core Design in previous versions.
* Disable CPM for UI project to better reflect consumers
This will ensure that we face any potential dependency issues consumers are also likely to run into.
* Add `Microsoft.CodeAnalysis.CSharp` reference to `Umbraco.Cms.DevelopmentMode.Backoffice`
* added hovering and focus border to RTE
* fix main to OG
* fix to main again
* I'm going to cry
* Missing localiztion feature, maybe UmbLitElement?
* added localization controller to fetch localized version
* localization successful for viewActionsFor and CreateFor
* clean up button text
* Changed label for content header to display proper name
* clean up code
* Included button labels for media section
* clean code
* Relocated localization keys,
as `actions_viewActionsFor` already existed.
Also made into a function, to support a fallback label.
* Simplified the "Create for" label/localization
Removed the need for a `getCreateAriaLabel()` method.
* Removed the double-localizations (of `actions_viewActionsFor`)
as the "umb-entity-actions-bundle" component handles this now.
* imports tidy-up
* Simplified localization key condition
* switched to new localization key for other sections for new labeling
* Bumped `@umbraco/playwright-testhelpers` 16.0.55
https://github.com/umbraco/Umbraco.Playwright.Testhelpers/releases/tag/release%2F16.0.55
---------
Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Block List: adds `$index` support for UFM labels
* Block Grid: adds `$index` support for UFM labels
* Block RTE: adds `$index` support for UFM labels
Which is always zero `0`.
But has been wired up if we do implement the index order in future.
Add conditional registration for Entity Data Picker
Introduces an entry point for the Entity Data Picker property editor that registers its manifests only if picker data sources are present, preventing an unusable UI from appearing by default.
* Adding controller
* Lower case route to match other endpoints
* Adding service and typed output
* Renaming to NewsDashboard
* Moving more stuff to service
* Removing unused code
* Some refactoring in accordance with better architecture
* Created repository and mock data source for the news dashboard also display some data in the UI.
* Minor refactoring: naming, aligning with existing controller patterns.
* Update OpenApi.json.
* Update typed client sdk and types.
* Provide language to API endpoint, just in case we want to localize news in the future.
* Obsoleted configuration
* Moved mock data to mocks folder and updated repository to use the actual response model and service from the Api
* Prepared news repository with server data source.
* Rendered news items according to required group structure.
Added TODOs for remaining tasks.
* Fixed FE build issues.
* Update src/Umbraco.Core/Constants-Configuration.cs
* Fixed grid spacing, sanitize code and make the styles closer to the v13.
* Added container query and padding to the card body.
* Fix padding
* Fixed title according to priority.
* Relocated/renamed the news server data-source file
* Simplified the news repo/data-source classes
by extending `UmbControllerBase`, the host constructor is handled for us.
* Added `types.ts` export type files
* Refactored interface name + typing
* Added `uui-loader` component
* Tweaked styles, added box-shadow to cards
Added flexbox gap to the card body.
* Sorted import order
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Adding controller
* Lower case route to match other endpoints
* Adding service and typed output
* Renaming to NewsDashboard
* Moving more stuff to service
* Removing unused code
* Some refactoring in accordance with better architecture
* Created repository and mock data source for the news dashboard also display some data in the UI.
* Minor refactoring: naming, aligning with existing controller patterns.
* Update OpenApi.json.
* Update typed client sdk and types.
* Provide language to API endpoint, just in case we want to localize news in the future.
* Obsoleted configuration
* Moved mock data to mocks folder and updated repository to use the actual response model and service from the Api
* Prepared news repository with server data source.
* Rendered news items according to required group structure.
Added TODOs for remaining tasks.
* Fixed FE build issues.
* Update src/Umbraco.Core/Constants-Configuration.cs
* Fixed grid spacing, sanitize code and make the styles closer to the v13.
* Added container query and padding to the card body.
* Fix padding
* Fixed title according to priority.
* Relocated/renamed the news server data-source file
* Simplified the news repo/data-source classes
by extending `UmbControllerBase`, the host constructor is handled for us.
* Added `types.ts` export type files
* Refactored interface name + typing
* Added `uui-loader` component
* Tweaked styles, added box-shadow to cards
Added flexbox gap to the card body.
* Sorted import order
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: engjlr <enl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Configure document/media items to listen for `Trashed` server-events for cache invalidation
* Fire reload event on restore destination tree/menu
* Removed "trashed" part of the code comment
* Add explicit references to Microsoft.CodeAnalysis.* packages to fix conflicts when installing Microsoft.EntityFrameworkCore.Design
This allows consumers to simply install Microsoft.EntityFrameworkCore.Design without having to manually install specific versions to deal with transitive dependency problems.
* Disable CPM for UI project to better reflect consumers
* Update src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add property editor data source extension types
Introduces types and extension interfaces for property editor data sources, including manifest and API definitions. Updates the main property-editor types export to include the new data source types.
* add test data sources
* wip collection and item repos
* export consts
* fix picker modal token
* make global components file
* render picker in data type
* wire up repositories
* append editor data source alias to data type detail model
* fix global manifest declaration
* make optional
* fix types
* register collection item picker modal element + wip collection menu extension
* register collection menu for property editor data source
* wire up modal tokens
* fix circular
* register as global element
* register default kind for collection menu
* wip fleshing out collection menu
* pass props + listen for selection events
* fix imports
* accept icon in manifest
* extend base type
* use correct data to calculate length
* export types
* add load more button
* wire up load more
* remove debugger
* add search for property editor data sources
* only select one data source
* rename file
* add entity type
* add manifest for search result item
* fix imports/exports
* fix manifest imports
* wire up data source value with workspace
* remove debugger
* wip property editor + input
* move data-source files
* more specific extension types
* remove copy from file name
* allow settings in manifests
* export types
* merge settings
* fix ui alias
* remerge if data source is removed
* Update data-type-details-workspace-view.element.ts
* reset data
* Update data-type-workspace.context.ts
* update merging + move mapping to data source
* Fix mutation of data.values in data type detail mapping
Refactored #mapServerResponseModelToEntityDetailModel to avoid mutating the original data.values array when removing the editorDataSourceAlias. This ensures the original server response remains unchanged and improves data integrity.
* add forDataSourceTypes to manifest
* update interfaces
* test data source implementations
* only show data source select if property editor supports it
* remove custom context
* remove unused token
* use generic collection item picker modal
* remove custom modal
* export types
* render data source alias on data type into view
* pass data source alias
* allow data source alias
* allow data source alias
* pass data source alias
* add prop for data source alias
* Add property editor data source alias support
* Add editor data source alias to property context
Introduces support for storing and retrieving the editor data source alias in UmbPropertyContext. Updates UmbPropertyElement to use the context for managing the data source alias and ensures the alias is set on the property editor element.
* pass data source alias to input
* pass data source alias to context
* update js docs
* split types from token file
* fix import
* update error message
* add more test sources
* Refactor repository manager initialization logic
Changed the initialization flow in UmbRepositoryItemsManager to support optional repository alias and deferred repository setup. Added setItemRepository and getItemRepository methods for explicit repository management, and moved repository initialization logic to a dedicated private method.
* remove support for passing a filter
* wip wire up input with modal
* add constant
* test user data source
* add todo
* require entityType on webhook items
* add entityType
* use id as unique
* add default icon
* wire up search
* add search to media
* pass config
* support configuration in data sources + temp test cases
* remove temp text
* change to one generic extension type with a data type sub type
* search in label
* pass filter args to collection item picker
* clean up
* aligning interfaces
* iterate status instead of item
* simplify examples
* add types for config
* move to examples
* add custom data examples for collection and tree
* update imports
* add manifests for collection and tree custom data examples
* add type guards
* add type guards
* Update types.ts
* add return type
* remove debuggers
* make observables optional
* add null checks for observables
* use statuses
* extend picker input context
* map config
* use data to set value when there is no observable
* store as string array
* Add getDefaultApiConstructor to tree item element
* make it optional
* fix search types
* add fallback icon and name
* remove unused imports
* pass stored value to input
* rename file
* remove unused config value
* make api observable
* add search to custom collection example
* render fallback item
* fix import order
* add fallback render to tree item element
* Update tree-item.element.ts
* Revert "Update tree-item.element.ts"
This reverts commit 3458877de9.
* Revert "add fallback render to tree item element"
This reverts commit b30219d3ed.
* move from data type to property editor
* align file names
* introduce picker-property-editor module
* remove custom types
* use basic types
* use tree item type
* Update input-entity-data.context.ts
* update types
* add interface for item model
* force unique on collection item model
* require an item model in picker context
* allow icon to be null
* extend item model from user group item model
* add entity type to mapped data
* Update user-group-item.server.data-source.ts
* align static file models
* correct types for user picker
* extend item model
* fix types
* more type fixing
* align models
* align models
* fix types
* add utils for fallback name and icon
* add todo
* use fallback name and icon functions
* Update default-picker-search-result-item.element.ts
* add fallback tree item if none is registered
* add search to example
* extract data source config and pass to api
* align naming
* temp type cast
* move search module into core
* fix illegal imports
* add missing const exports
* make property-editor-data-source module
* register property editor data source ref item + render description
* remove console log
* remove indention
* simplify data source type
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/entity-data-picker/input/input-entity-data.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/property-editor-data-source/input/input-property-editor-data-source.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/collection/menu/default/default-collection-menu.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* add todo
* hide add button when readonly
* check correct amount config
* Update input-entity-data.element.ts
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* added hovering and focus border to RTE
* fix main to OG
* fix to main again
* I'm going to cry
* Missing localiztion feature, maybe UmbLitElement?
* added localization controller to fetch localized version
* localization successful for viewActionsFor and CreateFor
* clean up button text
* Changed label for content header to display proper name
* clean up code
* Included button labels for media section
* clean code
* Relocated localization keys,
as `actions_viewActionsFor` already existed.
Also made into a function, to support a fallback label.
* Simplified the "Create for" label/localization
Removed the need for a `getCreateAriaLabel()` method.
* Removed the double-localizations (of `actions_viewActionsFor`)
as the "umb-entity-actions-bundle" component handles this now.
* imports tidy-up
* Simplified localization key condition
---------
Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Add `Expiry` header to emails, set default expiry to 30 days and allow user config via `appsettings`
* Remove `IsSmtpExpirationConfigured` as it will always have a value
* Check for `emailExpiration` value
* Removed `EmailExpiration` default value as it should be opt-in
* Simplify SMTP email expiration condition
* Fix APICompat issue
* Add implementation to `NotImplementedEmailSender`
* Rename `emailExpiration` to `expires` to match the SMTP header
* Obsolete interfaces without `expires` parameter, delegate to an existing method.
* Set expiry TimeSpan values from user configurable settings with defaults
* Fix formating
* Handle breaking changes, add obsoletion messages and simplify interfaces.
* Fix default of invite expires timespan (was being parsed as 72 days not 72 hours).
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added unique color checker to color picker.
* Added Unittest for duplicates
* optimized for codescene
* removed the bump and simplified the function
* Fixed behaviour for duplicate checks so unit test passes.
A little refactoring.
* Adds continue so invalid colors aren't checked for duplicates.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Adjust the `JsonBlockValueConverter` to handle conflicts with 'values' property (due to old data schema)
* Simplify code
* Add unit test to verify change.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Adjust the `JsonBlockValueConverter` to handle conflicts with 'values' property (due to old data schema)
* Simplify code
* Add unit test to verify change.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added screen readers notification support
* Making the sr-live div not visible for users
* Moved aria-live outside the repeat
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* V16: Cache Version Mechanism (#19747)
* Add RepositoryCacheVersion table
* Add repository
* Add Cache version lock
* Add GetAll method to repository
* Add RepositoryCacheVersionService
* Remember to add lock in data creator
* Work my way out of constructor hell
This is why we use DI folks. 🤦
* Add checks to specific cache policies
* Fix migration
* Add to schema creator
* Fix database access
* Initialize the cache version on in memory miss
* Make cache version service internal
* Add tests
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add missing obsoletions
* Prefer full name
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fixed merge
* V16/feature/move last synced id to db (#19884)
* Foundation work for moving last synced id
* register manager and repo in dependency injection
* Fixing to make tests work
* Replacing the use of the old LastSyncedFileManager.cs with the new LastSyncedManager.cs
* Testing to delete out of sync id and old entries
* changing some stuff to please the reviewer.
* Inverted saving methods id check and fixed documentation mishaps
* Loadbalancing: Add Cache Sync service to allow us to roll forward isolated caches when backoffice is load balanced. (#20398)
* Split cache refreshers into internal and external caches
* Add obsolete constructor for CacheInstructionsPruningJob
* Add xml docs
* Move lastID management into CacheInstructionService
* Cache last synced ids in memory
* Lock when processing instructions
* Sync caches when out of sync
* Fix constructors for ICacheSyncService
* Cache version on request
* Register caches as synced when instructions are processed
* Rename CacheVersionAccessor to IRepositoryCacheVersionAccessor
* Set caches as synced before actually syncing the caches
* Set caches as synced before syncing, within scope, this should also lock the cache version from being written to whilst updating caches
* Only check version for backoffice requests
* Clear request cache when caches are syned
* Default to using NOOP cache version service
* Don't generate local identity in database server messenger anymore
* Fix ambiguous constructor
* Add helper method to switch to load balanced isolated caches
* Fix LastSyncedManagerTests
* Fix RepositoryCacheVersionServiceTests
* Fix DefaultCachePolicyTests
* Use correct constructor in FullDataSetRepositoryCachePolicy
* Minor cleanup
* Add XML docs
* Add more xml docs
* Apply suggestions from code review
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
---------
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Fix migration plan
* fix tests
* Fix integration tests
* Fix changes from github review
* Move premigrations to v17
* Make lock constantws sequential
* Fix comment
* Make IRepositoryCacheVersionService and ICacheSyncService protected on EntityRepositoryBase
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Nicklas Kramer <nik@umbraco.dk>
Co-authored-by: NillasKA <kramernicklas@gmail.com>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* #20035 Updated validation context example to reflect issue
* Fixes#20035 by handling returned promise
* just catch if it was rejected
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* entity signs folder
* update package.json
* entity sign extension type
* implement entity sign extension
* POC document has collection sign
* implement icon kind
* rename file
* note about this being wrong
* move type
* change import
* entity sign bundle element
* implement icon kind label
* Display icon and show popover on hover
* Fix the popover logic
* Moving the sign icon to the iconContainer to handle position
* fix missing document tree icon
* revert removal of icon slot render
* remove unused styles
* document tree item - inherit styles from the base element
* correctly extend styles
* revert document tree item icon change
* move icon container html
* add method to get an icon name
* Adding delay to the popover when opens
* Add animation to popover when it opens
* Making the parent of the entity bundle trigger popover on hover
* Display 2 icons over the main icon
* Updating some styles
* Position one icon on top of the other and add css style variables
* Changing popover-container for position-anchor
* generate server types
* Using css properties to display and animate the signs
* Stacked icons using grid property
* Use translate property to move the icons around
* Added fallback styles for firefox
* formatting of state properties
* implement entity flags across content types
* lint fixes
* fix import extension mess
* await both properties for this to work
* transfer flags to entity sign bundle ext initializer
* is-protected entity sign
* Made signs infobox show downward.
* Changed px to rems
* Change the manifest for the actual signs we will display
* add icon color, remove unused label, add weight
* changes styles + animation + slotted icon inside
* Overwrite pending changes when schedule is active and added green color to schedule.
* adjust animation
* add background for sign
* avoid re-rendering when properties are being set
* Bind the flags to each sign manifest.
* increase signs offset
* fix document tree item draft style
* Removed unused exports.
* Remove duplicated hover timer logic.
* Added eslint disable line to keep the empty method for future implementation.
* rename class
* Rename interface for optional entity flags
* make alias more explicit to prevent future collisions
* include alias in field name to make it clear that we do not except all colors
* align function names with conventions
* always include flags in document items
* compose tree types
* set up entity-flag module and move related types
* change label
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Show selected icon and color(if any) when open the modal.
* Add a button inside the modal that clears the value
* Deselect the value if we click the already selected icon.
* Add placeholder icon and some localization for labels
* Remove unused variable
* Added config for the placeholder icon in case no icon is selected.
* remove use of modals in collections
* add parent path to support absolute path generation
* add note
* make tree load more minimalistic
* set type and expand inherited styles
* also set title
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/table/document-table-collection-view.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* create actions should not open as modal
* remove unused import
* fix router getActivePath
* make expand open the collection
* setTargetTakeSize to low when Collection parent
* expose typeUnique
* fix opening collection
* remove log
* active manager
* export
* impl active manager
* prepare for search param redirects
* fixed collapse feature
* set routes to undefined
* preserveQuery
* ensureSlash
* make a hard redirect for collections
* only if anscenstors are present in data.
* not full match anyway
* only forceShow on hasCollection
* remove umb-section-sidebar-context-menu
* rename to isMenu
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace-split-view.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/tree-item/document-tree-item.context.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* added hovering and focus border to RTE
* fix main to OG
* fix to main again
* I'm going to cry
* Added label for splitviewdivider
* Added localization to divider label and updated common lang files
* Removes unused import
---------
Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Serverside generated preview URLs
* Add URL provider notation to UrlInfo
* Change preview URL generation to happen at preview time based on provider alias
* Update XML docs
* Always add culture (if available) to preview URL
* Do not log user input (security vulnerability)
* Fix typo
* Re-generate TypeScript client
from Management API
* Deprecated `UmbDocumentPreviewRepository.enter()` (for v19)
Fixed TS errors
Added temp stub for `getPreviewUrl`
* Adds `previewOption` extension-type
* Adds "default" `previewOption` kind
* Relocated "Save and Preview" workspace action
reworked using the "default" `previewOption` kind.
* Added stub for "urlProvider" `previewOption` kind
* Renamed "workspace-action-default-kind.element.ts"
to a more suitable filename.
Exported element so can be reused in other packages,
e.g. documents, for the new "save and preview" feature.
* Refactored "Save and Preview" button
to work with first action's manifest/API.
* Reverted `previewOption` extension-type
Re-engineered to make a "urlProvider" kind for `workspaceActionMenuItem`.
This is to simplify the extension point and surrounding logic.
* Modified `saveAndPreview` Document Workspace Context
to accept a URL Provider Alias.
* Refactored "Save and Preview" button
to extend `UmbWorkspaceActionElement`.
This did mean exposing certain methods/properties to be overridable.
* Used `umbPeekError` to surface any errors to the user
* Renamed `urlProvider` kind to `previewOption`
* Relocated `urlProviderAlias` inside the `meta` property
* also throw an error
* Added missing `await`
* Fix build errors after forward merge
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Start work
* Introduce dto
* Start making repository
* Add migrations
* Implement fetchable first job
* Fix up to also finish tasks
* Refactor jobs to distributed background jobs
* Filter jobs correctly on LastRun
* Hardcode delay
* Add settings to configure delay and period
* Fix formatting
* Add default data
* Add update on startup, which will update periods on startup
* Refactor service to return job directly
* Update src/Umbraco.Infrastructure/Services/Implement/DistributedJobService.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Infrastructure/BackgroundJobs/DistributedBackgroundJobHostedService.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Infrastructure/BackgroundJobs/DistributedBackgroundJobHostedService.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Remove unused
* Move jobs and make internal
* make OpenIddictCleanupJob.cs public, as it is used elsewhere
* Minor docstring changes
* Update src/Umbraco.Core/Persistence/Constants-Locks.cs
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
* ´Throw correct exceptions
* Update xml doc
* Remove business logic from repository
* Remove more business logic from repository into service
* Remove adding jobs from migration
* fix creation
* Rename to ExecuteAsync
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Fix failing SQLServer integration tests
Adjusted the tests so that the created content is retrieved again after creation, instead of using the returned IContent.
This is needed because SQLServer, when using datetime, rounds to the closest .000, .003, or .007, which would cause the comparisons to fail.
We should consider moving away from datetime to datetime2, as the former should be avoided according to Microsoft.
https://learn.microsoft.com/en-us/sql/t-sql/data-types/datetime-transact-sql?view=sql-server-ver17
* fix: Identified everywhere the bugs happen and implemented the InGroupOf() extension to successfully batch the SQL queries
* Added helper function in case this batching functionality is in future scopes
* Accidently deleted a groupIds.Any() check while adding BatchFetch helper function
* Removed helper function and instead utilising built in FetchByGroups extension method
* Member type container in management API
* Fix naming
* Update service
* Fix services
* Register IMemberTypeContainerService in DI container
Added a new service registration for `IMemberTypeContainerService`
in the `AddCoreServices` method of `UmbracoBuilder.cs`.
* Replace auditRepository with auditService in constructor
* Add MemberTypeContainer to UdiEntityType mapping
---------
Co-authored-by: georgebid <91198628+georgebid@users.noreply.github.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Remove `umb-media-picker-create-item` component
it was not being used internally.
There was previously an issue due to a routing issue,
(in that the Media Picker modal wasn't routed),
so the Media create workspace wouldn't work.
This could be resolved in future and see this feature return.
* add interface for item data resolver
* export interface
* add interface to Document item data resolver implementation
* allow to pass a item data resolver to trash action
* pipe resolver to modal
* pass resolver to document trash manifest
* use resolver in modal when available
* Bump Azure.Identity from 1.13.2 to 1.16.0
* Bump BenchmarkDotNet from 0.14.0 to 0.15.4
* Bump Bogus from 35.6.3 to 35.6.4
* Bump HtmlAgilityPack from 1.12.1 to 1.12.4
* Bump MailKit from 4.11.0 to 4.14.0
* Bump MessagePack from 3.1.3 to 3.1.4
* Bump Microsoft.AspNetCore.Mvc.Testing from 9.0.4 to 9.0.9
* Bump Microsoft.Data.SqlClient from 6.0.1 to 6.1.1
* Bump Microsoft.Extensions.Caching.Hybrid from 9.8.0 to 9.9.0
* Bump Microsoft.Extensions.Logging.Debug from 9.0.4 to 9.0.9
* Bump Microsoft.NET.Test.Sdk from 17.13.0 to 18.0.0
* Bump ncrontab from 3.3.3 to 3.4.0
* Bump Nerdbank.GitVersioning from 3.7.115 to 3.8.118
* Bump OpenIddict packages from 6.2.1 to 7.1.0
* Bump Serilog from 4.2.0 to 4.3.0
* Bump Serilog.Sinks.File from 6.0.0 to 7.0.0
* Bump Swashbuckle.AspNetCore from 8.1.1 to 9.0.6
* Bump System.Data.Odbc from 9.0.4 to 9.0.9
* Bump System.Data.OleDb from 9.0.4 to 9.0.9
* Bump Microsoft.IdentityModel.JsonWebTokens from 8.8.0 to 8.14.0
* Bump SixLabors.ImageSharp.Web from 3.1.5 to 3.2.0
- Implicit global usings were made opt-in (https://github.com/SixLabors/ImageSharp.Web/pull/391)
* Bump NJsonSchema from 11.0.2 to 11.5.1
* Bump Microsoft packages from 10.0.0-preview.7.25380.108 to 10.0.0-rc.1.25451.107
* Remove Azure.Identity package reference as implicitly referenced versions are no longer vulnerable
* Remove System.Runtime.Caching package reference as it is not used
* Remove System.Net.Http package reference as it is not used
* Set 'allowPrerelease' to true
Global.json was showing as invalid due to a pre-release version being referenced while 'allowPrerelease' was set to 'false'. This can be set to 'false' again later on.
* Remove System.Security.Cryptography.Xml package reference as implicitly referenced versions are no longer vulnerable
* Remove System.Text.RegularExpressions package reference as implicitly referenced versions are no longer vulnerable
* Remove Microsoft.IdentityModel.JsonWebTokens package reference as implicitly referenced versions are no longer vulnerable
* Remove System.Text.Encodings.Web package reference as it is not used
* Remove Microsoft.Data.SqlClient package reference as implicitly referenced versions are no longer vulnerable
* Remove Lucene.Net.Replicator package reference as implicitly referenced versions are no longer vulnerable
* Remove Microsoft.Extensions.Caching.Memory package reference where not used
* Add EFCore migration for OpenIddict v7 update
* Apply suggestion from @kjac
Cosmetic update: Removed blank line as suggested by Copilot
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Added tests for changing own password
* Updated tests for current user profile
* Bumped version
* Make CurrentUserProfile tests run in the pipeline
* Added step to ensure the error notification toast not displays
* Reverted npm command
* Added tests for media delivery api
* Added tests for content delivery api
* Fixed import
* Updated skip tag and issue link for the failing tests
* Bumped version
* Split delivery api tests into 2 files
* Updated tests for media delivery Api
* Cleaned up
* Fixed comments
* Fixed comments
* term example
* better localization options
* localize range
* ensure range value handling
* extract lox high from value setting
* further improvements
* stop requiring entity-type for values
* setup for parsing blueprints as values to the value preset manager
* write test for blueprint values in value preset controller
* deprecate scaffold method in order to use a new more generic name
* Avoid manipulating the incoming data
* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* use max here
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added tests for duplicate a content
* Bumped version
* Make all tests for duplicating a content run in the pipeline
* Fixed comments
* Reverted npm command
* Added tests for readOnlyGuard rules
* Added backoffice override files for readOnlyGuard tests
* Bumped version
* Added project for ExtensionRegistry tests in playwright configs
* Updated nightly E2E test pipelines to run Extension Registry tests
* Updated nightly E2E test pipeline
* Updated nightly E2E test pipeline
* Updated playwright configs
* Updated nightly E2E test pipeline
* Add test for Entity Action Extension to retrieve entityType and unique (#20020)
* Add entity action test to get unique and entity type
* update test entity action
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
* Added job to run the Extension Registry tests in the nightly pipeline
* Cleaned up
* Restructure AdditionSetup folder for extension registry
* Updated yaml file for nightly E2E pipeline
* Updated json file for lock action
* Skip test for content delivery API
* Updated port
* Comment out others to run only extension registry tests
* Updated port
* Remove retrieve action folder to test
* Reverted nightly E2E test pipeline
* Reverted
* Updated umbraco package json
* Reverted
* Renamed AdditionalSetup folder
* Renamed folder
* Added appsetting.json file
* Updated appsettings.json
* Updated appsettings.json
* Added debug step
* Added step to build backoffice
* Reverted
* Only spec.ts file run in the extension registry project
* Property Editor: Add tests for create and using custom property editor (#20213)
* Property Editor: tests for create and using custom property editor
* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/PropertyEditorTest.spec.ts
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/PropertyEditorTest.spec.ts
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/PropertyEditorTest.spec.ts
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
* update review from Nhu
* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/CustomPropertyEditor.spec.ts
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
* Update tests/Umbraco.Tests.AcceptanceTest/tests/ExtensionRegistry/CustomPropertyEditor.spec.ts
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
* fix comment from Nhu
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
* Format code
* Fixed
* Format code
* Format code
* Format code
* Updated indentation
* Fixed comments
* change the name of test
---------
Co-authored-by: NguyenThuyLan <116753400+NguyenThuyLan@users.noreply.github.com>
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* term example
* better localization options
* localize range
* ensure range value handling
* extract lox high from value setting
* further improvements
* Update src/Umbraco.Web.UI.Client/src/assets/lang/en.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: adds new repository for document by id segment options
* chore: mocks up the new endpoint
* feat: all 'null' segments should appear on all languages
* feat: uses new endpoint in content detail workspace base
* feat: maps up the name of the segment
* chore: mock segment data
* feat: adds filter on available segments
* feat: do not alter behavior depending on "undefined" and "null"
* chore: updates mock handler
* feat: ensures that the segments are loaded based on an override method (because they only work for documents) and that they use a generic type (to avoid circular imports)
* feat: refines the segment filter
* chore: updates deprecated model
* feat: treats all culture-less segments as applying to everything
* docs: updates console warn for developers
* Add a bit more spacing and align button in block grid areas config
* Remove unnecessary blank line in CSS
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Use EndpointMetadata to check for existing MapToApiAttribute at runtime
* fix api breaking change
* revert MethodInfoApiCommonExtensions.cs
* remove empty line in ActionDescriptorApiCommonExtensions.cs
* Add xml comments to ActionDescriptorApiCommonExtensions
* Revert boy scout refactoring to primary constructur
* Better xml comments in ActionDescriptorApiCommonExtensions
---------
Co-authored-by: Marcus Wilhelmson <marcus.wilhelmson@consid.se>
Change to layout of default content dashboard.
I have removed the max width on the wrapper and increased the padding on the small pods to match the larger pod. This improves consistency with all other default dashboards in other sections of the CMS, none of which had a max width applied and where all pods had larger padding.
Co-authored-by: Paul <paul@madebycrunch.com>
* initial notes
* flat mapper impl
* first tests passed
* return incoming value to ensure it does not result in an error from an extension
* define the manifest type on UmbPropertyValueResolver
* finish property value flat-mapper
* make sure also to map values with no extension
* clean up test
* export controller
* fix block editor property resolver
* fix mapper types
* ensureVariantsData method
* ensure Block List only updates if it has an update
* ensure varians across for shared across segment and shared across cultures
* fix variant selector hints for segments
* fix hints in variant selector for segmented variants
* Ports fix to regression of the caching of null representations for missing dictionary items.
* Fixed error raised in code review.
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Ports fix to regression of the caching of null representations for missing dictionary items.
* Fixed error raised in code review.
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Adjust data type workspace UI when opening a data type that has an editor or editor UI that could not be found
* Also display a custom UI in a document property where the editor UI could not be found
* Fix circular dependency
* Small renames
* provide data-path for property editor picker
* update console warning
* Text copy changes
* add comment to element
* Fix editor alias not updating when selecting a different property editor UI
* Remove outdated comment
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* refactor code
* display language name for empty names
* ensure all culture variants when entering a segment-shared value, shared across cultures
* Revert parts of "ensure all culture variants when entering a segment-shared value, shared across cultures"
This reverts commit 0e64f72695.
* Upgrade to Tiptap v3
* Uses `@ts-expect-error` to ignore the TS complication errors
These can be removed once Tiptap has resolved the TypeScript definitions.
* Off-topic: corrected `flags` property in the mock data
Added in PR #19915
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/link/link.tiptap-extension.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Webhooks: Removal of client-side deprecations for v17
* User: Removal of client-side deprecations for v17
* UFM: Removal of client-side deprecations for v17
* Tiptap: Removal of client-side deprecations for v17
* Templating: Removal of client-side deprecations for v17
* RTE: Removal of client-side deprecations for v17
* Relations: Removal of client-side deprecations for v17
* Search: Removal of client-side deprecations for v17
* Property Editors: Removal of client-side deprecations for v17
* URL Picker: Removal of client-side deprecations for v17
* Members: Removal of client-side deprecations for v17
* Media: Removal of client-side deprecations for v17
* Extension Insights: Removal of client-side deprecations for v17
* Documents: Removal of client-side deprecations for v17
* Media: Removal of client-side deprecations for v17
(part 2)
* Data Types: Removal of client-side deprecations for v17
* Core: Removal of client-side deprecations for v17
* Content: Removal of client-side deprecations for v17
* Clipboard: Removal of client-side deprecations for v17
* Blocks: Removal of client-side deprecations for v17
* Mocks: Removal of client-side deprecations for v17
* Libs: Removal of client-side deprecations for v17
* Apps: Removal of client-side deprecations for v17
* DevOps: Removal of client-side deprecations for v17
* Document Publishing Workspace: Removal of client-side deprecations for v17
Refactored to use `UmbDocumentPublishingWorkspaceContext`
* Reverted/modified some of my TODO comments
* Updated TODO comment
* Code cleanup sweep of TODO comments and tweaks
* Updated OpenApi.json, re-gen TS client
Tried to fix up mock data.
* Refactored the document variant name/fields
* Implemented co-pilot suggestions
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Retrieve only ISO codes from the database rather than full language objects if that's all we need.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Removed repository updates and migrated the new service method to an extension method.
* Fixed issue after merge.
* Removed left-over using
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Add migration to create missing tabs
In v13, if a tab had groups in both a composition and the content type, the tab might not exist on the content type itself.
Newer versions require such tabs to also exist directly on the content type. This migration ensures those tabs are created.
Also fixes an issue in LeftJoin where nested sql arguments were being discarded.
* Small fixes
* WIP: Integration test.
* Added asserts to show the current issue with the integration test.
* Adjusted the integration test
* Added logging of result. Minor re-order and extraction refactoring in integration test.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Started the implementation of the new date time property editor
* Display picked time in local and UTC
* Adjustments to the way the timezones are displayed and the picker is configured
* Filter out `Etc/` (offset) timezones from the list
* Additional adjustments
* Introduced date format and time zone options (all, local or custom)
* Adjustments to the property editor configuration and value converter
* Use UUICombobox instead of UUISelect for displaying time zone options. Display UTC offset instead of short offset name in label.
* Allow searching by offset
* Ignore case when searching for time zone
* Store dates consistently (always same format)
* Add custom PropertyIndexValueFactory for the new property editor
* Adjustments when switching between time zone modes
* Small fixes and cleanup
* Started improving time zone config selection
* Small adjustments
* Remove selected time zones from the list + display label instead of value
* Localizing labels
* Remove unwanted character
* Fix incorrect order of custom time zones list
* Small fixes (mostly validation)
* Rename input time zone component
* Small adjustments
* Using model for stored value
* Save examine value as ISO format
* Adjusting class names for consistency
* Small fixes
* Add default data type configuration
* Rename `TimeZone` to `UmbTimeZone`
* Fix failing tests
* Started adding unit tests for DateWithTimeZonePropertyEditor
* Additional tests
* Additional tests
* Additional tests
* Fixed searches with regex special characters throwing errors
* Remove offset from generic UmbTimeZone type and added new type specific for the property editor
* Adjust property editor to show error when selected time zone is no longer available, instead of pre-selecting another one
* Do not preselect a time zone if a date is stored without time zone
This most likely means that the configuration of the editor changed to add time zone support. In this case we want to force the editor to select the applicable time zone.
* Fix failing backoffice build
* Added tests for DateTimeWithTimeZonePropertyIndexValueFactory
* Improved picker validation
* Remove unused code
* Move models to their corresponding places
* Renaming `DateTimeWithTimeZone` to `DateTime2`
* Fix data type count tests
* Simplifying code + adjusting value converter to support old picker value
* Adjustments to property editor unit tests
* Fix validation issue
* Fix default configuration for 'Date Time (Unspecified)'
* Rename validator
* Fix comment
* Adjust database creator default DateTime2 data types
* Update tests after adjusting default data types
* Add integration test for DateTime2 returned value type
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Aligning DateTime2Validator with other JSON validators. Added new model for API.
* Removed unused code and updated tests
* Fix validation error message
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Splitting the new date time editor into multiple (per output type)
* Adjust tests in DateTime2PropertyIndexValueFactoryTest
* Update value converter tests
* Group the new date time tests
* Adjust new property editor tests
* Adjust property editor integration tests
* Update data editor count tests
* Naming adjustments
* Small fixes
* Cleanup
- Remove unused files
- Remove 'None' option from configuration and update all the tests
* Update luxon depedencies
* Move GetValueFromSource to the value converter
* Add new property editor examples to mock data
* Re-organizing the code
* Adjustments from code review
* Place the date time property index value factories in their own files
* Small adjustments for code consistency
* Small adjustments
* Minor adjustment
* Small fix from copilot review
* Completed the set of XML header comments.
* use already existing query property
* fail is form control element is null or undefined
* using lit ref for querying and form control registration
* state for timeZonePickerValue and remove _disableAddButton
* Adjustments to form control registration
* Remove unused declaration
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Add removeStatus method to repository manager
Introduces a removeStatus method to UmbRepositoryItemsManager, allowing removal of a status by its unique identifier.
* Remove item status on picker input removal
Calls removeStatus on the item manager when an item is removed from the picker input selection to ensure its status is updated accordingly.
* PropertyType constructor sets the DataTypeKey if passed IDataType has identity
* Updated unit tests to verify behaviour.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added the ability to set the telemetry level for an unattended install
Added 'UnattendedTelemetryLevel' to 'UnattendedSettings'
Renamed 'CreateUnattendedUserNotificationHandler' to 'PostUnattendedInstallNotificationHandler'
Set the telemetry level in the unattended install notification handler
* Add DefaultValue attribute to 'UnattendedTelemetryLevel'
* Added UnattendedTelemetryLevel to template.
* Updated cli and ide hosts.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Updated steps to verify the error validation message
* Updated default extension for Tiptap
* Removed skip tag for fixed smoke tests
* Bumped version
Fix property write guard to use correct variant ID
Replaces the use of propertyVariantId with _datasetVariantId in the property write guard check to ensure permissions are evaluated for the correct variant.
Fix property write guard to use correct variant ID
Replaces the use of propertyVariantId with _datasetVariantId in the property write guard check to ensure permissions are evaluated for the correct variant.
* Initial adjustment of the projects with package vulnerabilities that errored, to change to ignore the four specific Nuget vulnerability warnings in Debug mode (but not Release) as per https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1901-nu1904 (NU1901,NU1902,NU1903,NU1904)
* Fixed formatting errors with tests
* No trailing whitespace
* Move NuGet vulnerability warnings error suppression to Directory.Build.props, combine WarningsNotAsErrors and fix minor issues
* Update Umbraco.JsonSchema.csproj
Removed unwanted change
* Update Umbraco.JsonSchema.csproj
Removed unwanted change
* Revert unecessary changes since merge
* Tweak more unecessary changes
* Small tweaks
* Remove space
* Reverted spacing changes
* Remove no longer required warning exclusions
* Reverted unwanted change
* Reversed order
* A few tweaks to reduce warnings in Umbraco.TestData
* More warnings removed as no longer an issue
---------
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Emma Garland <emma.garland@rocksolidknowledge.com>
Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
* Update Readme to signpost the Forum (#20268)
Update README.md with information about the forum
Making a small change to the Readme to signpost the Forum now that it's the place to go for help/questions
* Adding SourceWidth and SourceHeight to ImageUrlGenerationOptions
* Update src/Umbraco.Web.Common/Extensions/FriendlyImageCropperTemplateExtensions.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* QA Skip the known failing smoke test to avoid blocking other PRs (#20269)
Added skip for the failing smoke test
---------
Co-authored-by: Owain Williams <owaingdwilliams@gmail.com>
Co-authored-by: Jason Elkin <jasonelkin86@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Update README.md with information about the forum
Making a small change to the Readme to signpost the Forum now that it's the place to go for help/questions
* fix: adds a <form> element around the consent/telemetry step to ensure proper form handling
also adds a submit action so that you can continue with click of ENTER
* fix: adds umbFocus to select inputs to allow the user to proceed with tabbing too much around, i.e. they will start within the form
* set value to undefined when empty
* fix nullable checks
* ensure promise rejection when validation fails
* avoid js error when detailStore is not present
* implement editor as form control
* remove unused
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Display the latest update date in document collection view
* Don't consider "" as a missing option when initializing the drop down list.
* Don't flag "" as a missing option when validatng server-side.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Improve GetManagementApiUrl to use the globally defined default version if not specified on the controller
* Add a test to check logic introduced in #20083
* Update tests/Umbraco.Tests.Integration/ManagementApi/Trees/DocumentTypeSiblingControllerTests.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Update tests/Umbraco.Tests.Integration/ManagementApi/Trees/DocumentTypeSiblingControllerTests.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* It worked before i must have broken it somehow. Commit as checkpoint
* Adding a reference from Web.UI.csproj to TestData to allow composers to be composed
* Changing readme and removing project reference
* Adding member types sibling endpoints
* Introducing sibling endpoint for Partial Views and logic.
* Introducing sibling endpoint for stylesheets
* Introducing sibling endpoint for scripts
* Introducing FileSystemTreeServiceBase.cs
* Introducing interfaces for implementation specific services
* Introducing services for specific trees
* Modifying controller bases to fit new interface and logic.
* Obsoleting old constructors related to PartialView
* Obsoleting ctors related to Stylesheets
* Obsoleting ctors related to scripts
* Adding tests for scriptsTreeService
* Adding tests for siblings
* Removing unused dependencies
* Removing signs and replacing it with flags
* Fixing breaking changes by obsoletion
* Fixing more breaking changes
* Registering missing service
* Fixing breaking changes again
* Changing name of method GetSiblingsViewModels
* Rewritten tests for less bloat and less duplicate code
* Expanding tests to include other methods from service
* Test refactoring: avoided populating file systems that weren't under test, updated encapsulation, renaming, further re-use.
* Management API: Expanding the existing sibling endpoints to support trashed entities (#20154)
* Refactoring existing logic to include trashed items
* Including tests for trashed entities
* Groundwork for trashed siblings
* Documents trashed siblings endpoint
* Controller for Media trashed items
* Expanding tests to include a test for trashed siblings
* Code review corrections
* Resolving code review
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Directly convert from double or float when possible. Also fixes string parsing to work on all cultures. Fixes#20214
* Added unit tests to verify behaviour.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* setup files
* allow Unproviding as a valid word
* setup context
* declare new module
* clean up on destroy
* implement keydown listener
* rename to all
* Revert "rename to all"
This reverts commit 5384408d5f.
* revert shortcuts revert
* move view initialization to submittable workspace base
* comment on destroy thingy
* submit workspace shortcut
* rename to action
* observe parent activation to make sure children follows along.
* fix comment to make AI happy
* implement modal view and titles
* fix getting title from token
* rename context alias
* use controller not context here
* provide modal view at modal element
* implement view context at app level
* Refactor view inheritance logic
* reverse children to be activated loop
* note on global shortcuts
* additional note
* Adjusted the UTC SQL Server migration to convert time zone ids to the correct format
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Small rename
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Reworks update of user groups on a user by updating in place rather than deleting and re-adding.
Ensure user groups affected by the update are invalidated in the repository cache.
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* added hovering and focus border to RTE
* fix main to OG
* fix to main again
* I'm going to cry
* added hovering and focus border to RTE
* fix indentation
* Refactored to set `--umb-tiptap-edge-border-color` variable
so that the toolbar and statusbar can pick up the state changes.
* Applies `transition` to the toolbar/statusbar components
---------
Co-authored-by: Oskar kruger <obk@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* added hovering and focus border to RTE
* fix main to OG
* fix to main again
* I'm going to cry
* added dynamic label to expand/collapse button on parent/child treeitems
---------
Co-authored-by: Oskar kruger <obk@umbraco.dk>
* align naming
* mute updates
* lower threshold
* add expansion model with target
* add function to link entries
* fix self import
* export constants
* update js docs for entity expansion manager
* link entries
* fix import
* do not export from menu here
* fix import
* fix import
* align how we register manifests
* add specific managers for section sidebar menu
* use structure items
* dot not expand current item
* Refactor section sidebar menu to use programmatic extension slot
Replaces the template-based <umb-extension-slot> with a programmatically created UmbExtensionSlotElement for improved performance and UX.
* add section context extension
* register menu as section context instead of hardcoding
* rename folder
* align naming
* export extension slot elements
* fix typings
* destroy extension slot element when host is disconnected
* Added user start node restrictions to sibling endpoints.
* use entry model
* move and rename
* register global context to hold menu state across sections
* temp observe section specific expansions
* temp observe section specific expansions
* add method to collapse multiple items
* Further integration tests.
* Tidy up.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* bind expansion to section
* make entity expansion manager generic
* Revert previous update.
* add helper method
* remove temp test data
* Retrieves item counts before and after the target for sibling endpoints and returns in API response.
* Applied previous update correctly.
* Removed blank line.
* Fix build and test asserts following merge.
* add getItem method
* Update OpenApi.json.
* generate new server types
* include last item in target
* add target pagination type
* return totalBefore and totalAfter
* call siblings endpoint for documents
* add method to load children with target
* rename to item
* wip target pagination manager
* add button to load prev tree items
* render prev and nexts buttons for tree items
* Update tree-load-prev-button.element.ts
* add util to append to unique array
* add state method to prepend data
* implement methods to load next and prev items
* add methods to interface
* Update tree-item-element-base.ts
* Update tree-item-context-base.ts
* remove unused
* align methods
* update types
* add jsdocs
* add deprecation notice
* fix jsdocs
* fix import
* Update tree-data-source.interface.ts
* remove duplicate type
* clean up
* fix page calculations
* remove unused
* clean up
* pass full entry to event
* add type for menu item expansion
* export types
* add menuItem alias
* Update types.ts
* support menu item expansion entry
* add const for menu item alias + use for breadcrumb and menu item
* add data type menu item alias const + apply to breadcrumb
* move to correct manifest
* add menu item alias to expand entries
* Update manifests.ts
* add menu structure kind types
* add kind to manifests
* add menu item context
* filter menu items
* handle menu item expansion
* clean up
* fix order
* add example dashboard and entity action
* import types
* align model type names
* align naming
* use ui component
* add guard for menu item entry
* use correct type
* Update section-sidebar-menu.element.ts
* Update entity-expansion.manager.ts
* export constants
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add menu item alias
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add alias
* add kind
* fix import path
* do not expand menu from modal
* collect all menu-item files in one folder
* fix lint errors
* Update content-detail-workspace-base.ts
* clean up
* rename to example
* add button to collapse everything within a section
* return correct data from base
* recalculate after
* fix breadcrumb for non-variant structure
* reload entity
* destroy
* remove self
* Updated acceptance tests to check if a caret button is open before clicking
* Bumped version of test helpers
* use const
* add target paging for tree root items
* more specific field names
* update field name
* add model for offset pagination
* add request to model name
* correct
* using Event Contsants for event map
* comment
* clean event listeners before adding new ones
* use createObservablePart
* add paging type guards
* add types
* add check for unique
* add comment
* pass data type id
* wip reload tree logic
* move start + end target logic to target pagination manager
* use target pagination manager in tree item context
* remove local references to start, end and base targets
* calculate before and after when reloading
* clean up
* support children in tree item context
* add methods to observe an expansion entry
* reload structure when item is created
* UX adjustments
* add controller alias to observer
* Update default-tree.context.ts
* Update default-tree.context.ts
* Update default-tree.context.ts
* test targets in document type tree data source
* when reloading only send the target if its part of the current items
* wip tree request manager
* make data source base a controller
* add tree request helper for document types
* use request helper in data source
* clear more data when clear is called
* when reopening a tree item - reuse previous state
* add tree item children manager
* split to manager
* clean up
* only return an entity model when getting target
* allow entity model as target
* add null checks
* add method for getSiblingsFrom
* implement target for tree data request manager
* Update default-tree.context.ts
* set parent for tree root
* reload if target is new
* add types for tree data request manager
* implement request manager for document tree
* use request manager for media tree
* add request manager for data type tree
* move into folder
* move into folder
* move into folder
* add target support for document blueprint
* add request manager for template tree
* add request manager for media type tree
* add hasChildren flag for root
* make start node its own thing
* move hasChildren logic to children manager
* Create tree-item-expansion.manager.ts
* use expansion manager
* align tree item managers
* Update tree-item-context-base.ts
* support take 0
* add methods to get new targets
* add retries
* add button loading states
* fix next start and end
* reset baset target
* use clear when restting children
* throw error if parent doesn't match request
* show notifcation when children is reset
* only render menu context for non trashed document and media items
* use correct import
* fix types
* update interfaces and imports to fix circular dependencies
* move into tree-item folder
* rename file
* Update tree-item-context-base.ts
* move token out of context file to remove circular dependency
* set take size to 50
* remove unused
* export const
* correct default value
* check on both sides after a new base target
* `import type` sort ordering
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Remove redundant call to #loadTreeRoot in tree context
* Update tree root requests to use take: 0
Changed all tree repository requestTreeRoot methods to call getRootItems with { take: 0 } instead of { take: 1 }. This ensures that no items are fetched when only the total count is needed to determine if children exist, improving efficiency.
* Add user data delete endpoint to the management API
* Fix typo and remove unused umbracoMapper
* Applied changes from code review.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix sql syntax issues
* unify all dtos, fix autoIncrement for NPoco.Insert and .BulkInsert
* fix Copilot review comments
* fix sql syntax in TrackedReferencesRepository.GetPagedDescendantsInReferences()
* remove changes in TemplateServiceTests
* Tweaks and fixes from first review.
* Reverted changes outside scope of PR.
* Use FirstOrDefault over SelectTop.
* Fix delete member issue.
* Fixed issue with create of webhooks.
* Reverted changes to default data install.
* Removed unused method.
* Rationalised use of quoting helpers.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix nullability issue.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* set property type unique on context
* set the value
* observe property type unique from content picker property editor
* remove unused
* observe data type unique
* wip picker memories
* append memory option to the picker data model
* split into methods
* initialize memory context
* rename arg
* make memory module
* export constants
* allow nested memories
* pass memory from input document to picker context
* Update property-editor-ui-content-picker.element.ts
* fix import
* prefix with interaction
* clean up
* fix import
* rename module
* Update vite.config.ts
* update module name
* observe after search is initialized
* use memory manager in all places
* make picker modal base element
* update types
* add memory for document picker property editor
* store tree item picker expansion state in interaction memory
* Update picker-modal-base.element.ts
* remove the memory if we have no expansion state
* delete memory if it doesn't include anything
* clear picker input memories if nothing comes from the modal
* Refactor interaction memory handling in picker input
Moved the passing of interaction memories from the document picker input context to the core picker input context. Renamed the method for setting memories from the modal for clarity and consistency.
* only dispatch an event if the value changes
* remove unused
* observe to support close on escape
* add comments
* fix type error
* fix typings
* Replaces data type-based memory keys with config hash-based keys
* dont store picker search in interaction memory
* Rename interaction memory key in picker modal base
* Remove error throw for missing interaction memory
* Refactor interaction memory handling in content picker
Replaces the single 'memory' property with an 'interactionMemories' array and updates event handling to support multiple interaction memories. Adjusts property types, event listeners, and child component bindings to accommodate this change.
* Refactor content picker to use interaction memories
Replaces the previous memory handling with a new approach using interaction memories, including unique hash generation based on config. Updates event handling and property names to align with the new interaction memory model, improving state management and consistency.
* remove debugger
* rename const
* wip media picker memories
* remove args
* simplify memory model
* update internal value before dispatching event
* remove unused
* Update property-type-based-property.element.ts
* rename method
* simplify types
* implement location memory for media picker
* temp type cast
* set location memory when using the breadcrumb
* remove code duplication
* bubble memories from input media to input content
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/property-editor-ui-content-picker.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix import
* remove unused method
* Refactor content picker interaction memory management
Introduced UmbPropertyEditorUiInteractionMemoryManager to encapsulate interaction memory logic for property editors. Updated the content picker property editor to use this new manager, removing duplicated memory management code and improving maintainability.
* Refactor interaction memory management in pickers
Replaces custom interaction memory logic in document and media picker property editors with the shared UmbPropertyEditorUiInteractionMemoryManager. Updates unique memory key prefixes for consistency and simplifies related event handling. This improves maintainability and standardizes memory management across property editors.
* export context token
* add js docs
* remove timestamp
* add tests for interaction memory manager
* Added tests for the property editor ui interaction memory manager
* Rename memories to memoriesForPropertyEditor
Renamed the 'memories' property to 'memoriesForPropertyEditor' in the interaction memory manager and updated all references in related property editor components and tests for clarity and consistency.
* Separated out `import type`s + ordering
* remove interaction memory implementation in modal context
* remove interactionMemories from modal interface
* revert to using the umbOpenModal helper
* align property and event name
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Preserve additional URL path in split view navigation
Enhances the split view manager to retain any additional pathname segments when updating the browser history, ensuring that navigation state beyond the variant part is preserved.
* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-split-view-manager.controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* format
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: gets hints and assigns to variants to enable the view to show a badge if there is a hint
* feat: find the first hint on the non-active variant
* feat: protect against non-variants
* feat: ignore invariant variants
* feat: adds a render method for hints
* chore: removes comment
* only add a new hint if the weight is higher
* Remove tags with backspace
* Unused varible
* Manage focusable tag and tabindex updates
* `import`s tidy-up
* Adds `tabindex` and focus outline for each tag
* Removed the tag wrapper container
No longer required.
* Adds support for "Delete" key
* Disables `autocomplete` for new tag input
This conflicts with the suggestions prompt.
* Reverted removal of the tag wrapper container
Required as a "skip tags" tabbing feature
* Uses `UmbChangeEvent`
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Added appsettings
* Added test setup for different config
* Added appsettings for external login
* Added acceptance tests
* Updated pipelines
* Updated solution file
* V15 QA Added external login provider tests and split pipeline into templates (#20049)
* Added setup for external login
* Started on yaml
* Added test file
* Updated pipeline
* Use env vars
* Added env variables and commented out test we don't need to run
* Removed list from matrix
* Updated condition
* Updated package path
* Updated testFolder
* double slash
* Updated condition
* Updated condition again
* Added port
* Removed redundant values
* Set as env vars
* Added env vars beneath matrix
* Get env
* Updated naming
* Updated usage of values
* Added a check for client id, to see if value set
* Moved env out of pool
* Tried moving env
* Trying to fix the env being empty
* Removed env
* Updated name of variable
* Fixed A cyclical reference
* Updated typo
* More logging
* Reverted change
* Added env
* Added env to tests
* Cleaned up
* Added yaml template files
* Updated nighly pipepline to use templates
* Updated sln
* Split yaml into templates for e2e setup
* Updated pipeline
* Updated solution file
* Set value
* Added if statement
* Added variables
* Set default values
* Updated values
* Updated condition
* Run multiple tests
* Added env
* Updated from parameter to variable
* Fixed condition
* Fixed condition to use actual value
* Updated npx wait on command
* Updated pwsh
* Updated port again
* Updated port value
* Updated wait on
* Updated condition
* Restructured
* Updated var
* Updated run application steps
* Added echo
* Updated to boolean
* Updated conditions
* Updated test template usage
* Added databaseType
* Added another databaseType
* Split up templates
* Fixed indentation
* Updated condition
* updated path
* removed build from path
* Updated conditions for azureAd
* Fixed indentation
* Updated to single qoutes
* Cleaned up
* Removed unused file
* Clarified namin
* Moved
* Updated pipeline, not done
* Updated locator
* Updated pipelines
* Updated test helpers package
* Skipped build stage for default app settings tests
* Updated password var
* Updated locators
* Updated defaultconfig build setup
* Split E2E stage in two
* Added parameter for skipping integration tests
* Cleaned up
* Added ASPNETCORE_URLS
* V15 QA acceptance tests with appsettings (#19550)
* Start of appsetting
* Updated setup of playwright
* Adjusted the pipeline
* Updated appsetting
* Added install test
* Added comments
* Updated pipeline
* Updated development app settings
* Commented tests out
* comment
* Added if statement
* Updated pipeline
* Fixed condition
* Changed to production
* Added a log
* Updated copy item
* Added
* Updated app settings
* Updated pipeline
* Moved playwright login
* Updated pipeline
* Updated app setting
* Updated nightly
* Updated appsettings
* Updated get
* Updated wait on
* Updated appsettings
* Updated connection string
* Updates
* Skips code
* Updated variable
* Updated pipeline
* We want to always retain the trace, to see if the test runs as expected on the pipeline
* Added a temporary wait till port is open
* Fixed condition
* Added missing tcp for wait on
* Updated URL env
* Updated setup
* Fixed string
* Updated locator
* Split tests into SQLite and SQLServer
* Updated pipeline to run all tests
* Retain trace on failure
* Added testFolder var
* Added appsettings and program for delivery api tests
* Updated playwright config
* Split test runners into defaultconfig and different app settings
* Added delivery api tests
* Cleaned up tests
* Bumped version
* Updated pipeline
* Small fixes
* Added password
* Updated connection string
* Fixed
* Removed quotes
* Removed unnecessary connection string
* Added missing password
* Cleaned up
* Cleaned up
* Cleaned up
* Updated to use helpers
* Bumped version
* Updated helper usage
* Added password to variables and a condition
* Added check
* Indented value
* Fixed condition
* More updates
* Updated variable
* Removed settings
* Updated delivery api tests
* Bumped version
* Updated test
* Removed unnecessary variables
* Updates based on copilot comments
* Fixed merge conflict
* Fixed env creation step
* Bumped version
* Updated tests to use new helper
* Updated helper
* Updated to string
* Moved logic to conditions
* bumped version
* Use new name for helper
* Remove echo
* Added variable
* Initial implementation of non existing property editor
* Adjust `MissingPropertyEditor` to not require registering in PropertyEditorCollection
* Add `MissingPropertyEditor.name` back
* Remove unused dependencies from DataTypeService
* Removed reference to non existing property
* Add parameterless constructor back to MissingPropertyEditor
* Add validation error on document open to property with missing editor
* Update labels
* Removed public editor alias const
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/missing/manifests.ts
* Add test that checks whether the new MissingPropertyEditor is returned when an editor is not found
* Also check if the editor UI alias is correct in the test
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Share property editor instances between properties
* Only store missing property editors in memory in `ContentMapDefinition.MapValueViewModels()`
* Add value converter for the missing property editor to always return a string (same as the Label did previously)
* Small improvements to code block
* Adjust property validation to accept missing property editors
* Return the current value when trying to update a property with a missing editor
Same logic as for when the property is readonly.
* Fix failing unit tests
* Small fix
* Add unit test
* Remove client validation
* UI adjustments
* Adjustments from code review
* Adjust test
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* First Go at the single block property editor based on blocklistpropertyeditor
* Add simalar tests to the blocklist editor
Also check whether either block of configured blocks can be picked and used from a data perspective
* WIP singleblock Valiation tests
* Finished first full pass off SingleBlock validation testing
* Typos, Future test function
* Restore accidently removed file
* Introduce propertyValueConverter
* Comment updates
* Add singleBlock renderer
* Textual improvements
Comment improvements, remove licensing in file
* Update DataEditorCount by 1 as we introduced a new one
* Align test naming
* Add ignored singleblock default renderer
* Enable SingleBlock Property Indexing
* Enable Partial value merging
* Fix indentation
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Avoid throwing an exception on getting references when migrating content with changed data types.
* Reintroduced generic catch to avoid functional breakage
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Renaming the providers, collection builder and model
* Renaming the items using signs
* Renaming in controllers
* Renaming mapping flags
* Renaming sign tests to flags
* Changing the test files names from signs to flags
* Updated a couple more references.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Support querystring and anchor for local links in Delivery API output (#20142)
* Support querystring and anchor for local links in Delivery API output
* Add default implementation for backwards compat
* Add default implementation for backwards compat (also on the interface)
* Fix default implementation
* Add extra tests proving that querystring/postfix can be handled for local links in both legacy and current format.
* Tiptap RTE: prevent `undefined` value
If the `value` becomes `undefined`, then the block data can't be tracked (for undo/redo).
The scenario comes when a user "selects all" contents, cuts it, and pasted it back in.
Fixes#20076
* Tiptap RTE: fixes selection white text bug
* Tiptap RTE: amends heading styles (for first-child)
* Reload section root on repeated header section click
Adds logic to reload the root of a section if its header is clicked while already active. This improves navigation consistency by resetting the section view when the user clicks the current section again.
* Update backoffice-header-sections.element.ts
* fix: moves current user config repository and related dependencies to the 'current-user' package
previously, it was not exported, so is not a breaking change
* chore: moves current-user-allow-mfa condition to the 'current-user' package to avoid circular dependencies (and because it naturally belongs there)
* feat: exports all current-user config-related items
* chore: move to 'current-user'
* chore: make sure to export all constants
* feat: exports all current-user config-related items
* fix: observes the current-user config for the 'keepUserLoggedIn' value and simply try to refresh the token when the worker makes an attempt to log out the user
* fix: moves current user config repository and related dependencies to the 'current-user' package
previously, it was not exported, so is not a breaking change
* chore: moves current-user-allow-mfa condition to the 'current-user' package to avoid circular dependencies (and because it naturally belongs there)
* fix: checks for `keepUserLoggedIn` directly
* Revert "chore: moves current-user-allow-mfa condition to the 'current-user' package to avoid circular dependencies (and because it naturally belongs there)"
This reverts commit 17bebfba41.
* Revert "fix: moves current user config repository and related dependencies to the 'current-user' package"
This reverts commit 0c11462898.
* Revert "feat: exports all current-user config-related items"
This reverts commit a6586aff1d.
* fix: avoids depending on 'resources'
* redirect to the last visited path in a section
* Update src/Umbraco.Web.UI.Client/src/apps/backoffice/components/backoffice-header-sections.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update backoffice-header-sections.element.ts
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adding a check to see if the posted value's source path isn't null or empty.
* Moving validation logic to proper files
* Moved logic to a required validator
* Adding tests to ensure validation works
* Minor tidy up: XML header comments, re-use in tests, clarified test names.
* Adding unit tests for file upload validation
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Initial implementation of non existing property editor
* Adjust `MissingPropertyEditor` to not require registering in PropertyEditorCollection
* Add `MissingPropertyEditor.name` back
* Remove unused dependencies from DataTypeService
* Removed reference to non existing property
* Add parameterless constructor back to MissingPropertyEditor
* Add validation error on document open to property with missing editor
* Update labels
* Removed public editor alias const
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/missing/manifests.ts
* Add test that checks whether the new MissingPropertyEditor is returned when an editor is not found
* Also check if the editor UI alias is correct in the test
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Share property editor instances between properties
* Only store missing property editors in memory in `ContentMapDefinition.MapValueViewModels()`
* Add value converter for the missing property editor to always return a string (same as the Label did previously)
* Small improvements to code block
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* dont rellay on only resolved based on properties, but also scan the CompositionPropertyTypes to resolve compistion inside the black
* Refactored to helper method.
---------
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Adding signs to variants and adjusting HasPendingChangesSignProvider.cs
* HasPendingChangesSignProvider.cs now populates variants & refactoring to move logic to DocumentPresentationFactory.cs
* Working HasScheduleSignProvider.cs to provide variant signs
* Refactoring ISignProvider.cs to take an IEnumerable again
* Moving code from controllers to factories
* Refactoring HasPendingChangesSignProvider.cs to use the right Interface method
* Refactoring HasScheduleSignProvider.cs to be less bloated, and more readable (hopefully)
* Refactoring tests to look at variants and include a list
* Changing instantiation to be better
* Fixed minor logic issue in HasScheduleSignProvider.cs
* Refactoring to include just 1 database call.
* Adjusting tests to use the new methods.
* Reverted breaking changes
* Added `cultures` property to the Segment models
* Added new endpoint to return the segments of a specific document.
* Mark additional properties and methods as obsolete
* Small indentation fix
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Converting DateTime.MinValue to sqlDateTime's minimum value
* Changing code to be a bit less hacky
* Changing hard coded value to a variable based on SqlDateTime
* Removing unused code
* Moving date converter logic to DateTimePropertyEditor.cs
* Replacing tests with proper version
* Removing unused import
* Removing unused imports again
* Creating new logic, to ensure formatting is more precise.
* Rewriting tests to be more precise and include testing on odd format separators
* Used parsing to determine timeonly date picker data type configuration format.
Fixed casing on key for data type configuration format.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added tests for create content with content picker with predefined allowed types
* Added tests for content with multi node tree picker
* Bumped version
* Make all tests for content with multi node tree picker run in the pipeline
* Reverted
* Reverted npm command
Fixes#20029.
If a dropdown property-editor is not marked as mandatory
and is in single-mode, then an empty option is added to
the top of the dropdown, so that the value can be unset.
This doesn't apply to multiple-mode, as values can be deselected.
* Fix spell error from Segmment to Segment
* Change for fix the misspell interface in a non breaking way
---------
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
* fix style and localization
* Update src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix class name as well
* minor fixes to sorting of tabs
* clean up
* add data-marks
* Updated package version to include test fixes for tab name
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* fix style and localization
* Update src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix class name as well
* add data-marks
* Updated package version to include test fixes for tab name
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* Changed to use TryParse
* Changed to be a null check instead
* Update to "is false" syntax and add unit tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Updates RTE mock data
* UFM: Adds fallback for "monospace" font-family
* Removes the Font Family/Sizes Menu extension
This feature is not ready yet.
* Tighten up Tiptap config buttons style
* Fixes bug with Collections context-token
Unrelated to Tiptap, but causes data-types to throw an error.
Bug introduced in PR #20033
* Deprecations for v17
* Create the document URLs lock database record introduced in 16 but required in a 15 migration.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Revert "Apply suggestions from code review"
This reverts commit 0a4ee48787.
* Revert "Create the document URLs lock database record introduced in 16 but required in a 15 migration."
This reverts commit 42ccaf985e.
* Moved lock record creation to premigration to ensure it's available when rebuilding URLs when migrating through 15 to latest.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
* Fix issue with newly created template under an existing one.
* feat: allows to set masterTemplate as preset
* fix: create new sub-templates with a preset already set for the master template (if applicable)
* fix: always resets master template, because you could be coming from an existing editor
* fix: always set the master template even if it is null
* fix: adds updateCurrent to also update the underlying _data model
also refactor function a bit
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Tiptap RTE: Migration to auto-enable new capabilities
The server-side migration to compliment the client-side feature #20042
* Updated db creation script
with latest RTE capabilities
* Corrected class name typo "Capabilities" 🤦
* Updated default RTE install with TextDirection and TextIndent capabilities
* Tiptap RTE: Starter Kit separation
- Created extensions for each Tiptap capability/extension
- Deprecated native `StarterKit` Tiptap extension
- Re-organized all Tiptap extensions into their own feature folders
- Other minor amends/tweaks to improve accessibility
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/view-source/manifests.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/toolbar-configuration/property-editor-ui-tiptap-toolbar-configuration.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/property-editors/statusbar-configuration/property-editor-ui-tiptap-statusbar-configuration.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Minor lint
* Mark the "external" Tiptap exports as deprecated
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* todos
* navigation context
* replace raw manifests with view context
* Array State has method
* rename to hint and much more
* Notes for later
* correcting one word
* more notes
* update JS Docs
* update tests for getHasOne
* fix context api usage
* update code for v.16
* correct test
* export UMB_WORKSPACE_VIEW_CONTEXT
* minor corrections
* rename to _hintMap
* refactor part 1
* update version number in comment
* clear method for array states
* declare hint import map
* mega refactor
* final corrections for working POC
* clean up path logic
* implement scaffold
* propagation and inheritance from view to workspace
* separate types from classes
* refactor to view context
* rename editor navigation context to editor context
* propagate removals
* clean up notes
* Hints for Content Tabs
* use const path
* handle gone parent
* added comments on something to be looked at
* hints context types
* contentTypeMergedContainers
* lint fixes
* public contentTypeMergedContainers
* refactor property structure helper class
* a few notes for Presets
* set variant ID instead of parsing it to the constructor
* do not inject root to the path
* adjust structure manager logic
* UmbPropertyTypeContainerMergedModel type update
* correct mergedContainersOfParentIdAndType
* refactor to utilize new observable for better outcome and performance
* fix lint errors
* fix missing import
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/hint/context/hints.controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* clean up
* remove console.log
* declare new exports of core
* Update src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor-tab.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* clean up
* fix const export
* remove root from hints path
* also check for invariant
* name more as legacy
* fix eslint
* fix container id setting
* fix resetting inherited property
* fix re-rendering problem
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* todos
* navigation context
* replace raw manifests with view context
* Array State has method
* rename to hint and much more
* Notes for later
* correcting one word
* more notes
* update JS Docs
* update tests for getHasOne
* fix context api usage
* update code for v.16
* correct test
* export UMB_WORKSPACE_VIEW_CONTEXT
* minor corrections
* rename to _hintMap
* refactor part 1
* update version number in comment
* clear method for array states
* declare hint import map
* mega refactor
* final corrections for working POC
* clean up path logic
* implement scaffold
* propagation and inheritance from view to workspace
* separate types from classes
* refactor to view context
* rename editor navigation context to editor context
* propagate removals
* clean up notes
* Hints for Content Tabs
* use const path
* handle gone parent
* added comments on something to be looked at
* hints context types
* contentTypeMergedContainers
* lint fixes
* public contentTypeMergedContainers
* refactor property structure helper class
* a few notes for Presets
* set variant ID instead of parsing it to the constructor
* do not inject root to the path
* adjust structure manager logic
* UmbPropertyTypeContainerMergedModel type update
* correct mergedContainersOfParentIdAndType
* fix lint errors
* fix missing import
* Update src/Umbraco.Web.UI.Client/src/packages/core/hint/context/hints.controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* clean up
* remove console.log
* fix validation context initialization
* add member workspace view consts
* setup validation badges for member workspace root fields
* declare new exports of core
* Update src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/value-validator/valueValidator.controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* add comment
* fix example
* fix comment
* fix member workspace failed request
* remove console log
* enable server side validation
* fix circlular dependency
* fix lint errors
* export conts
* fix import
* clean up
* fix type
* fix password validation case
* chore(eslint): reorders imports and cleans unused variables
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* wip section menu expansion
* make section context local to each section
* split kind manifest from element file
* make generic entity expansion manager
* wip menu context
* add collapsed and expanded events
* Export new expansion entity event modules
* rename events
* dispatch events
* Set tree expansion changes in the menu context
* expand menu from workspace
* do not allow undefined
* make menu item feature folder
* Update menu-variant-tree-structure-workspace-context-base.ts
* menu: pass expansion as prop to prevent dependency on the section sidebar
* use correct event
* Add event listener support to extension slot element
Introduces an 'events' property to UmbExtensionSlotElement, allowing dynamic assignment and removal of event listeners on extension components. Event listeners are added when extensions are permitted and removed on disconnect, improving extensibility and event handling for extension slots.
* Add entity expansion event handling to sidebar menu
Introduces handlers for entity expansion and collapse events in the section sidebar menu. This change enables the menu to respond to expansion state changes by updating the context accordingly.
* Optimize expansion state updates in menu components
Introduces a local expansion state to both section sidebar and tree menu item components to prevent unnecessary updates and rerenders. This improves performance by ensuring state updates only occur when needed.
* only check if we have a local state already
* add bulk expand method
* use bulk expand method
* align naming
* mute updates
* lower threshold
* add expansion model with target
* add function to link entries
* fix self import
* export constants
* update js docs for entity expansion manager
* link entries
* fix import
* do not export from menu here
* fix import
* fix import
* align how we register manifests
* add specific managers for section sidebar menu
* use structure items
* dot not expand current item
* Refactor section sidebar menu to use programmatic extension slot
Replaces the template-based <umb-extension-slot> with a programmatically created UmbExtensionSlotElement for improved performance and UX.
* add section context extension
* register menu as section context instead of hardcoding
* rename folder
* align naming
* export extension slot elements
* fix typings
* destroy extension slot element when host is disconnected
* use entry model
* move and rename
* register global context to hold menu state across sections
* temp observe section specific expansions
* temp observe section specific expansions
* add method to collapse multiple items
* bind expansion to section
* make entity expansion manager generic
* add helper method
* remove temp test data
* include last item in target
* remove unused
* pass full entry to event
* add type for menu item expansion
* export types
* add menuItem alias
* Update types.ts
* support menu item expansion entry
* add const for menu item alias + use for breadcrumb and menu item
* add data type menu item alias const + apply to breadcrumb
* move to correct manifest
* add menu item alias to expand entries
* Update manifests.ts
* add menu structure kind types
* add kind to manifests
* add menu item context
* filter menu items
* handle menu item expansion
* clean up
* fix order
* add example dashboard and entity action
* import types
* align model type names
* align naming
* use ui component
* add guard for menu item entry
* use correct type
* Update section-sidebar-menu.element.ts
* Update entity-expansion.manager.ts
* export constants
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add menu item alias
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add menuItemAlias to manifest
* add alias
* add kind
* fix import path
* do not expand menu from modal
* collect all menu-item files in one folder
* fix lint errors
* Update content-detail-workspace-base.ts
* clean up
* rename to example
* add button to collapse everything within a section
* fix breadcrumb for non-variant structure
* reload entity
* destroy
* remove self
* Updated acceptance tests to check if a caret button is open before clicking
* Bumped version of test helpers
* use const
---------
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Removing obsoleted code from ApiMediaQueryService.cs
* Removing obsoleted code from ApiRichTextMarkupParserTests.cs
* Removing obsoleted code from ContentCacheRefresher.cs
* Removing obsoleted code from ContentFinderByUrlAlias.cs and adjusting its tests to use the new logic
* Removing obsoleted code from ContentFinderByUrl.cs & its dependencies
* Removing obsoleted code from ApiRichTextMarkupParserTests.cs
* Removing obsoleted code from DocumentCache.cs & its dependencies
* Removing obsoleted code from MediaCache.cs & its dependencies
* Removing obsoleted code from PublishedCacheBase.cs & its dependencies
* Removing obsoleted code from RenderNoContentController.cs and its tests
* Removing obsoleted code from UmbracoRouteValueTransformer.cs
* Removing obsoleted constructors from DefaultUrlProvider.cs
* Removing accidental bookmark
* Introducing a helper method to get the root keys in ApiMediaQueryService.cs
* Removing obsoleted code from Cache classes
* Removing unused imports
* Refactoring to meet the CR
* Added attribute to controller
* Fixing missing using statement
* Removing obsoleted constructor from ExternalLoginService.cs and making usages fit
* Removing obsoleted method from IContentTypeFilter.cs
* Removing obsoleted methods from IContentEditingService.cs
* Removing obosoleted code from DocumentUrlService.cs
* Removed obsoleted code from DataTypeService.cs
* Removed obsoleted code from PublishStatusService.cs
* Removing obsoleted code from the IContentPublishingService.cs and its dependencies. Also implementing a TODO in the service implementation
* Removing obsoleted code from IRelationService.cs
* Removing obsoleted code from ContentPublishingService.cs
* Removing obsoleted code from ContentEditingService.cs
* Removing obsoleted code from Constants-DataTypes.cs
* Removing obsoleted code from IAction.cs and its implementations
* Removing obsoleted code from IContentService.cs
* Removing obsoleted code from DomainUtilities.cs
* Removing obsoleted code from IIndexedEntitySearchService.cs and dependencies
* Removing obsoleted code from UrlProvider.cs
* Removing obsoleted code from AliasUrlProvider.cs
* Removing obsoleted code from ApiContentRouteBuilder.cs
* Removing obsoleted code from ApiPublishedContentCache.cs
* Removing obsoleted class TemplateQueryResult.cs
* Removing obsoleted code from ApiContentBuilder.cs
* Removing obsoleted code from HealthCheck.cs
* Removing obsoleted code from ContentTypeEditingService.cs
* Removing obsoleted code from NewDefaultUrlProvider.cs
* Removing obsoleted code from PublishedElementPropertyBase.cs
* Removing obsoleted code from WebhookRequestService.cs
* Bumping to obsolete in V18, due to usage in class that will be removed in V18
* Removing obsoleted code from PropertyValidationService.cs
* Removing obsoleted code from AddUnroutableContentWarningsWhenPublishingNotificationHandler.cs
* Removing obsoleted code from IMemberService.cs
* Removing obsoleted code from DocumentCache.cs
fix: pins the @hey-api/* versions to that of the Backoffice client
This is a quick fix to handle the NPM error that is currently there because the Backoffice NPM client has moved on to another version. There will be a more comprehensive fix for 16.3, however this PR aims to make the 16.2 UmbracoExtension usable without running custom commands.
* Prevents the removal of all user groups from a user.
* Add additional user group when removing
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* rename and implement fallbackRender
* re introducing method as part of the name
* rename impls
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andrej Davidovič <andrejd@cdata.com>
* Removing obsoleted code from ApiMediaQueryService.cs
* Removing obsoleted code from ApiRichTextMarkupParserTests.cs
* Removing obsoleted code from ContentCacheRefresher.cs
* Removing obsoleted code from ContentFinderByUrlAlias.cs and adjusting its tests to use the new logic
* Removing obsoleted code from ContentFinderByUrl.cs & its dependencies
* Removing obsoleted code from ApiRichTextMarkupParserTests.cs
* Removing obsoleted code from DocumentCache.cs & its dependencies
* Removing obsoleted code from MediaCache.cs & its dependencies
* Removing obsoleted code from PublishedCacheBase.cs & its dependencies
* Removing obsoleted code from RenderNoContentController.cs and its tests
* Removing obsoleted code from UmbracoRouteValueTransformer.cs
* Removing obsoleted constructors from DefaultUrlProvider.cs
* Removing accidental bookmark
* Introducing a helper method to get the root keys in ApiMediaQueryService.cs
* Removing obsoleted code from Cache classes
* Removing unused imports
* Refactoring to meet the CR
* Added attribute to controller
* Fixing missing using statement
* Fix: custom block view rendering
* chore: formatting
* chore: formatting
* chore: marks render method as class property to bind it properly to the class so it can run private methods and does not lose its context
see also #extensionSlotRenderMethod
---------
Co-authored-by: Andrej Davidovič <andrejd@cdata.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Removing ContentFinderByUrlAndTemplateTests.cs and dependencies
* Removing ContentFinderByAliasTests.cs
* Removing ContentFinderByAliasWithDomainsTests.cs
* Removing ContentFinderByIdentifierTestsBase.cs
* Removing ContentFinderByIdTests.cs
* Fixing ContentFinderByKeyTests.cs & ContentFinderByPageIdQueryTests.cs to work with new code
* Removing ContentFinderByUrlTests.cs & ContentFinderByUrlWithDomainsTests.cs
* Fixing ContentFinderByPageIdQueryTests.cs to actually test the result rather than force the result
* Removing comment and adding test scenario
* fix: uses isAuthorized to check if user is logged in before terminating the observer
* feat: adds new function to redirect to stored path
* fix: always redirect to stored path even on failure
the user may have landed up on the page by mistake
* Revert "fix: always redirect to stored path even on failure"
This reverts commit 0c0cc0253c.
* fix: sends back the result
* fix: waits for the initial authorization request to come back before listening to the authorization signal (and then only listen once for it)
also check if the request was null, which means we can safely redirect the user
* docs: clarify what happens
* chore: converts the promise code to async/await pattern
* fix: tokenResponse should validate its internal object state
* feat: allows function to force a window redirect
* fix: checks if the user happens to already be authorized, because then we do not need a new code check
* Update src/Umbraco.Web.UI.Client/src/packages/core/utils/path/stored-path.function.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix issue dragging tiptap toolbar buttons
* Moved the `.items` CSS rules to the group element
* Refactored the toolbar-group element
- Renamed "toolbar-item-click" event to "remove", to show intent
- Reordered the method names alphabetically
- Renamed `value` to `items`, to show intent
- Removed `toolbarValue`, as not required
- Added `data-mark` for menu/styleMenu buttons
* Renamed/relocated "umb-tiptap-toolbar-group-configuration" element
* Updated tag name
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* build(deps): bump @hey-api/openapi-ts to 0.81.1 and pin the version to ensure compatibility between backoffice and extensions
* chore: regenerate api types and replace where necessary
* feat: pin version of @hey-api/openapi-ts and regenerate umbraco-extension files
* chore: removes unused 'client' field
* build(deps-dev): bump @hey-api/openapi-ts to 0.81.1 for the login app
* Removing obsoleted code from ApiMediaQueryService.cs
* Removing obsoleted code from ApiRichTextMarkupParserTests.cs
* Removing obsoleted code from ContentCacheRefresher.cs
* Removing obsoleted code from ContentFinderByUrlAlias.cs and adjusting its tests to use the new logic
* Removing obsoleted code from ContentFinderByUrl.cs & its dependencies
* Removing obsoleted code from ApiRichTextMarkupParserTests.cs
* Removing obsoleted code from DocumentCache.cs & its dependencies
* Removing obsoleted code from MediaCache.cs & its dependencies
* Removing obsoleted code from PublishedCacheBase.cs & its dependencies
* Removing obsoleted code from RenderNoContentController.cs and its tests
* Removing obsoleted code from UmbracoRouteValueTransformer.cs
* Removing obsoleted constructors from DefaultUrlProvider.cs
* Removing the RadioValueEditor.cs & RadioValueValidator.cs obsoleted classes.
* Removing obsolete constructor from MultipleValueValidator.cs
* Removing obsolete constructor from EmailValidator.cs
* Removing obsoleted code from DataValueReferenceFactoryCollection.cs
* Removing obsoleted code from ApiContentBuilderBase.cs
* Fixing constructor missing attribute
* Making use of the TryGet result
* Fixing use of obsoleted constructor
* Removing silly bookmark comment
* Fixing deleted code and restructuring to use new cache
* Making use of TryGetRootKeys bool, to return null if false.
* Extending code to use new constructor
* Updated PublishedContentQuery.cs to return empty array
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* fix: adds documentation to the UmbImagingRepository and makes the internal store optional, and deprecates an old method
* fix: uses new method to request thumbnails
* fix: ensures the internal data store has at least been attempted to be consumed before proceeding
* feat: adds methods to clear cached resized images
* feat: awaits the store before attempting to clear cache
* fix: attempts to clear the imaging cache when a media item entity is updated or deleted
* fix: awaits the store
* fix: set unique as property
* fix: ensures that the imaging component reloads its thumbnail if it has already been loaded once
* chore: removes duplicate check for isLoading
* chore: cleans imports
* feat: marks method as internal so that we may change it later on
* disable eslint check
* Allow open split view using the keyboard
* Add localize method to the label
* Add a method to localize terms with a language parameter
* adjust localization wording
* support segments in label
* localize texts
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Removing obsoleted code from MigrationPlanExecutor.cs & Interface
* Removing obsoleted code from EmailAddressPropertyEditor.cs
* Removing obsoleted class CacheRebuilder.cs
* Removing obsoleted code from TextBuilder.cs
* Removing obsoleted class ICacheRebuilder.cs
* Removing obsoleted code from SerilogLogger.cs
* Removing the use of Infrastructure IBackgroundTaskQueue.cs and replacing usage with the Core replacement
* Removing obsoleted code from the FileUploadPropertyEditor.cs
* Removing obsoleted code from BlockValuePropertyValueEditorBase.cs
* Removing obsoleted constructors and methods from MultiNodeTreePickerPropertyEditor.cs and TextHeaderWriter.cs
* Removing obsoleted code from CacheInstructionService.cs
* Bumping obsoleted code from MigrationBase.cs to V18
* Removing obsoleted code from EmailSender.cs
* Removing obsoleted code from BlockEditorVarianceHandler.cs
* Removing obsoleted code from IBackOfficeApplicationManager.cs
* Removing obsoleted code from RedirectTracker.cs & RichTextEditorPastedImages.cs
* todos
* navigation context
* replace raw manifests with view context
* Array State has method
* rename to hint and much more
* Notes for later
* correcting one word
* more notes
* update JS Docs
* update tests for getHasOne
* fix context api usage
* update code for v.16
* correct test
* export UMB_WORKSPACE_VIEW_CONTEXT
* minor corrections
* rename to _hintMap
* refactor part 1
* update version number in comment
* clear method for array states
* declare hint import map
* mega refactor
* final corrections for working POC
* clean up path logic
* implement scaffold
* propagation and inheritance from view to workspace
* separate types from classes
* refactor to view context
* rename editor navigation context to editor context
* propagate removals
* clean up notes
* Hints for Content Tabs
* use const path
* handle gone parent
* added comments on something to be looked at
* hints context types
* contentTypeMergedContainers
* lint fixes
* public contentTypeMergedContainers
* refactor property structure helper class
* a few notes for Presets
* set variant ID instead of parsing it to the constructor
* do not inject root to the path
* adjust structure manager logic
* UmbPropertyTypeContainerMergedModel type update
* correct mergedContainersOfParentIdAndType
* fix lint errors
* fix missing import
* Update src/Umbraco.Web.UI.Client/src/packages/core/hint/context/hints.controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-validation-to-hints.manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Persist and expose Umbraco system dates as UTC (#19705)
* Updated persistence DTOs defining default dates to use UTC.
* Remove ForceToUtc = false from all persistence DTO attributes (default when not specified is true).
* Removed use of SpecifyKind setting dates to local.
* Removed unnecessary Utc suffixes on properties.
* Persist current date time with UtcNow.
* Removed further necessary Utc suffixes and fixed failing unit tests.
* Added migration for SQL server to update database date default constraints.
* Added comment justifying not providing a migration for SQLite default date constraints.
* Ensure UTC for datetimes created from persistence DTOs.
* Ensure UTC when creating dates for published content rendering in Razor and outputting in delivery API.
* Fixed migration SQL syntax.
* Introduced AuditItemFactory for creating entries for the backoffice document history, so we can control the UTC setting on the retrieved persisted dates.
* Ensured UTC dates are retrieved for document versions.
* Ensured UTC is returned for backoffice display of last edited and published for variant content.
* Fixed SQLite syntax for default current datetime.
* Apply suggestions from code review
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Further updates from code review.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* Migrate system dates from local server time to UTC (#19798)
* Add settings for the migration.
* Add migration and implement for SQL server.
* Implement for SQLite.
* Fixes from testing with SQL Server.
* Fixes from testing with SQLite.
* Code tidy.
* Cleaned up usings.
* Removed audit log date from conversion.
* Removed webhook log date from conversion.
* Updated update date initialization on saving dictionary items.
* Updated filter on log queries.
* Use timezone ID instead of system name to work cross-culture.
---------
Co-authored-by: Laura Neto <12862535+lauraneto@users.noreply.github.com>
* extend controller base
* extend controller base
* add package for management api
* add signalr as external package
* connect to server event hub
* do no act on undefined
* add event subject
* correct alias
* export token
* add helper methods
* cache server responses
* fix import
* use helpers
* add detail request manager
* implement for document type
* implement for data type
* add method for update
* add support for create method
* align code
* Update detail-request.manager.ts
* move explicit naming
* move into folder
* collect server code in folder
* add implementation for data type request manager
* implement for document type
* only cache when we have connection to the server events
* poc inflight request cache
* clean up
* update
* add management api inflight request cache
* Update document-type-detail.server.request-manager.ts
* Update src/Umbraco.Web.UI.Client/src/packages/management-api/detail/detail-data.request-manager.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* extend controller base
* extend controller base
* add package for management api
* add signalr as external package
* connect to server event hub
* do no act on undefined
* add event subject
* correct alias
* export token
* add helper methods
* cache server responses
* fix import
* use helpers
* add detail request manager
* implement for document type
* implement for data type
* add method for update
* add support for create method
* align code
* Update detail-request.manager.ts
* move explicit naming
* move into folder
* collect server code in folder
* add implementation for data type request manager
* implement for document type
* only cache when we have connection to the server events
* update
* fix imports
* introduce item cache
* call trough get items controller
* remove log
* add unit tests for item cache
* Create cache.test.ts
* use sync method to lookup data type item
* use correct alias
* remove unused code
* data type item cache
* add client document type item cache
* add client cache for dictionary items
* add media item client cache
* add client cache for media type item
* add client cache for member and member type items
* add member group item cache
* split detail cache invalidation from request manager
* introduce item cache invalidation manager
* remove arg
* add data type item cache manager
* add memeber group item cache invalidation manager
* remove unused
* invalidate documents when document types changes
* align naming
* add method to get unique
* add dictionary item cache manager
* use server model instead of mapping
* call method
* update args
* update document type item cache invalidation
* add cache invalidation for member items
* update
* update
* update
* add item caching for languages
* add template item cache
* cache stylesheet items
* add caching for script items
* cache partial view items
* cache user items
* cache user group items
* add document blueprint item cache
* Removed readonly Signs property to re-align client models.
* Regenerate client types.
* Applied changes from code review.
* cache static file items
* add webhook item cache
* update mocks with signs data
* update mocks
* fix lint error
* fix eslint errors
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Removing obsoleted class GlobalSettingsExtensions.cs
* Removing obsoleted methods and usage from ObjectExtensions.cs
* Removing a ton of obsoleted methods from PublishedContentExtensions.cs
* Removing obsoleted constructors
* Removing obsoleted tag on private method that's still in use.
* dropdown keyboard accessibility issue
* Eslint update
* Improve accessibility of the app language dropdown.
* Bring back combobox list element
* Add keyboard support for arrowup and arrowdown
* use change event for value change
* Change button element for a div as trigger
* Unused import
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Create sign provider collection and call registered providers on rendering a page of tree item view models.
Re-work tree controller constructors to provide registered providers as a collection.
* Stub implementation of sign provider for documents with a scheduled publish pending.
* Complete implementation of tree sign for pending scheduled publish.
* Added integration test for new method on IContentService.
* Added unit test for HasScheduleSignProvider.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Tidied usings and clarified method header comments.
* Adding a fixed prefix to all future signs, and removing the provider property
* Adding a sign for protected tree documents.
* Adding IsProtectedSignProviderTest.cs & correcting HasScheduleSignProviderTests.cs to no longer assert the provider
* Fixing minor things in accordance with CR
* Adding collection items compatibility
* Introduced IHasSigns interface to provide more re-use across trees and collections.
Fixed updates to base content controllers (no need to introduce a new type variable).
Removed passing entities for populating tree signs (we aren't using it, so simplifies things).
* Refactoring a bit to make existing code less duplicated and fixing some constructor obsoletion
* Introducing a has pending changes sign.
* Applying changes based on CR
* Introducing tests for HasPendingChangesSignProvider.cs and stopped the use of contentService
* Introducing tests for HasPendingChangesSignProvider.cs and slight logic change
* Introduced HasCollectionSignProvider.cs and tests.
* Introducing collection signs to Media Tree & Media Collection items
* Introducing Plain Items and tests. Refactoring tests as well
* Introduced alternative CanProvideSigns() implementation on IsProtectedSignProvider.cs
* Slight refactoring to reduce bloating.
* Adding [ActivatorUtilitiesConstructor] since it threw an error otherwise
* Minor cleanup.
* Updated OpenApi.json.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: NillasKA <kramernicklas@gmail.com>
* Updated hey-api as the client-fetch is bundled as part of @hey-api/openapi-ts in newer versions
* Regenerated a new package-lock.json file
* Fix typescript issue
* Update templates/UmbracoExtension/Client/package.json
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Updated client dependencies
* Vite, TypeScript, hey-api
* Chalk & Cross-Env for the generate-client script
* Explicitly remove package-lock.json as it will be out of sync due to UMBRACO_VERSION_FROM_TEMPLATE
* Regenerated Hey API client that now ships client rather than dependancy
* Vite and Hey-API were already out of date (updated to the very latest)
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* extend controller base
* extend controller base
* add package for management api
* add signalr as external package
* connect to server event hub
* do no act on undefined
* add event subject
* correct alias
* export token
* add helper methods
* cache server responses
* fix import
* use helpers
* add detail request manager
* implement for document type
* implement for data type
* add method for update
* add support for create method
* align code
* Update detail-request.manager.ts
* move explicit naming
* move into folder
* collect server code in folder
* add implementation for data type request manager
* implement for document type
* only cache when we have connection to the server events
* update
* fix imports
* introduce item cache
* call trough get items controller
* remove log
* add unit tests for item cache
* Create cache.test.ts
* use sync method to lookup data type item
* use correct alias
* remove unused code
* split detail cache invalidation from request manager
* introduce item cache invalidation manager
* remove unused
* invalidate documents when document types changes
* align naming
* add method to get unique
* use server model instead of mapping
* call method
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* extend controller base
* extend controller base
* add package for management api
* add signalr as external package
* connect to server event hub
* do no act on undefined
* add event subject
* correct alias
* export token
* add helper methods
* cache server responses
* fix import
* use helpers
* add detail request manager
* implement for document type
* implement for data type
* add method for update
* add support for create method
* align code
* Update detail-request.manager.ts
* move explicit naming
* move into folder
* collect server code in folder
* add implementation for data type request manager
* implement for document type
* only cache when we have connection to the server events
* update
* fix imports
* Create cache.test.ts
* use sync method to lookup data type item
* use correct alias
* fix some test which are not running
* resolve code review comments
* Moved cleaned up tests to unit tests (as they are unit tests, not integration tests).
Removed tests marked as no longer necessary.
Update tests name to better reflect test case.
* Made explict test faster so it could run on the pipeline.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* move variant fragment split logic into splitview manager
* further centralise split logic into umbVariantId
* show segment selector if any exist
* invariant null
* chore: run eslint:fix
* chore(eslint): generate a UBM_ constant
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Bind 'action-executed' event handler to class instance
Updated the event listener for 'action-executed' to bind the handler to the class instance, ensuring correct 'this' context when the event is triggered.
* fix: make it clear that the clearUploads button is used to "Clear file(s)" and not necessarily remove them (from the dropzone)
* fix: adds extra null-check to avoid browser error on failed uploads
* fix: adds check that no media files are added twice (or more) to the media picker
* fix: adds try/catch around confirm modal to avoid browser error in case user cancels
* fix: change from deprecated 'complete' event to 'change' event and filter out non-successful files
* chore: sort imports
* feat: renders the 'add' button even if the limits have been exceeded
* feat: shows all values as cards even if the media item does not exist so the user has a chance to update the value
* feat: shows all values as cards even if the media item does not exist so the user has a chance to update the value
* feat: adds localization to the media picker context
* feat: uses the media picker context to control the picker
this also fixes an issue where already selected items were not preselected when opening the picker again
* feat: adds a bit of margin between the dropzone and media picker itself
* clean up old stuff in validation form control mixin
* ensure validation trigger when value is changed
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/content-picker/property-editor-ui-content-picker.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added configuration option UseStrictDomainMatching, which allows control over whether content is routed without a matching domain.
* Fixed typo in comment.
* Addressed comments from code review.
* Optimize document and media seeding by looking up from database in batches.
* Ensure null values aren't stored in the cache when checking existance.
* Fixed failing integration tests.
* Resolved issue with not writing to the L1 cache on an L2 hit.
* Tidied up and populated XML header comments.
* Address issue raised in code review.
* Content picker search with start node configured not taking user start nodes into account (#19800)
* Fix users being able to see nodes they don't have access to when using the picker search
* Readability and naming improvements
* Additional fixes
* Adjust tests
* Additional fixes
* Small improvement
* Replaced the root ids with constants
* Update src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
# Conflicts:
# src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs
# src/Umbraco.Web.BackOffice/Trees/ContentTreeController.cs
# src/Umbraco.Web.BackOffice/Trees/MediaTreeController.cs
# src/Umbraco.Web.BackOffice/Trees/MemberTreeController.cs
# tests/Umbraco.Tests.Integration/Umbraco.Examine.Lucene/UmbracoExamine/BackOfficeExamineSearcherTests.cs
* Add new constructor without unused and obsolete parameters
* Use non obsolete constructor in tests
* Add `dataTypeId` as parameter in document and media search endpoints to get `ignoreUserStartNodes` value
* Update backend API generated typed client
* Updated picker search to pass in data type unique
* Move data type retrieval to UmbPickerContext
* Adjust the controller constructors to make it non breaking
* Adjust controller methods to make non-breaking.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix moving properties between groups sometimes clearing their values
* Small adjustment
* Fix failing integration test
The mapping method was only setting the property group when it was not null, but for orphaned properties we want to specifically set it to null.
* Adjust 'Can_Move_Properties_To_Another_Container' integration test to check more scenarios and that values are kept
* Adjust to add isElement variable in test (as previously)
* build(eslint): replace local rules with naming conventions
* revert relative js extension imports
* remove unused local rule
* build(eslint): uses recommended setup for import plugin
* chore(eslint): conver const to function to follow naming conventions
* chore: removes old file
* build(eslint): allows Ufm as prefix
* build(eslint): allows 'name' and 'extensions' as exports (umbraco-package.ts)
* build(eslint): typescript rules should ignore storybook
* chore(eslint): ignores eslint for vite definitions
* build(eslint): allows UPPER_CASE for properties
* build(eslint): ignores umbraco-package.ts files (unconventional exports)
* chore(storybook): fixes property editor stylesheet picker
* build(eslint): allows Manifest as prefix on interfaces
* build(eslint): allows underscore on protected members
* build(eslint): allows Meta as prefix on interfaces
* build(eslint): allows PascalCase for public members
* build(eslint): disables enforcement of booleans with verbs for now as it is too harsh
* chore(eslint): add private modifiers as required
* deprecates invalid constant name to replace with Umb prefix
* renames MediaValueType to comply with naming conventions
* chore(eslint): disable naming conventions for local router-slot package
* chore(eslint): follow naming conventions
* chore(eslint): disable naming conventions for property editor interfaces
* chore(eslint): follow naming conventions
* chore(storybook): fix story
* chore(eslint): follow naming conventions
* build(eslint): allows `_host` as public variable
* chore(eslint): follow naming conventions
* build(eslint): allows double leading underscore on public members
* build(eslint): matches #private and public modifiers
* build(eslint): ignores language files
* chore(eslint): ignores umbraco package file
* chore(eslint): follow naming conventions
* storybook lang
* chore(eslint): follow naming conventions
* chore(eslint): follow naming conventions
* chore(eslint): make _manager a little more open
* chore(eslint): some properties should be protected
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-image-cropper/image-cropper.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* proxy type for UrlParametersRecord
* _items deprecated property
* bring back ConditionTypes type
* bring back _items for trash bulk action
* ignorer deprecated proxies
* keep settingsDataContentTypeKey for satefy
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Tiptap RTE: Set row/group min-height to prevent layout shift
* Added `box-sizing: border-box`
* Adds loaded state to the editor
so that the border only appears once it's ready.
* Refactored toolbar to reduce the number of re-renders
* Refactored statusbar to reduce the number of re-renders
* RTE mock data updates
* TODO comment typo correction
* Corrected typo in class name
This could technically be a breaking-change, but since the class name
conflicted with the exported `UmbTiptapToolbarFontFamilyExtensionApi`,
then no one could use it anyway. ¯\_(ツ)_/¯
* Tiptap extension code tidy-up
Also, makes use of `this.name` instead of hardcoded strings.
* Tiptap RTE: Makes embedded-media truly inline
by using a `<span>` instead of a `<div>`.
* Cosmetically aligns the selection styles
* Adds `UmbEmbeddedMediaOptions` to strongly-type the `inline` option
* Added tests for updating a variant block list with invalid text
* Added tests for updating a variant block grid with invalid text
* Bumped version of test helper
* Make the tests for updating content with invalid text in a block run in the pipeline
* Cleaned up
* Updated test text
* Reverted npm command
* Fix CheckboxList UI not updating when values are set programmatically
* WIP
* Added unit tests for the new functionality in the checkbox list element.
As requested by Copilot, here are some unit tests to ensure this addition passes all of the possible edge cases mentioned.
* Small change based on CoPilot feedback
Removed a check that was redundant and removed a unit test that was also not needed for the current PR and fixed one of the other tests.
* Fixing code quality issues highlighted in the unit tests
* Fix CheckboxList UI not updating when values are set programmatically
* WIP
* Standardizes property editor UI state management
Introduces a utility for managing the state of property editor UI elements
when their values are set programmatically.
This ensures that UI components like dropdowns, checkbox lists, and selects
correctly reflect the selected values, especially when these values are
updated via code rather than direct user interaction.
The changes include:
- A mixin to simplify state updates
- A helper function to ensure values are handled as arrays
- Consistent state updating logic across components.
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/select/property-editor-ui-select.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Removed the hard coded label
* Fixed the short-circuit issue raised by co-pilot
* Fixing more co-pilot suggestions
Also cleaned up the test files based on the JSDocs suggestions.
* Update src/Umbraco.Web.UI.Client/src/packages/property-editors/dropdown/property-editor-ui-dropdown.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactors checkbox and dropdown tests
Refactors checkbox-list and dropdown property editor UI tests to share common test utilities, reducing code duplication and improving maintainability.
Uses Sets for faster selection lookup in `updateItemsState` function.
* Fixing CodeScene suggestion based on "String Heavy Function Arguments"
* Fix for an issue that was stopping the Bellissima build.
* Improves property editor UI state updates
Ensures UI updates in checkbox list, dropdown and select property editors only occur when necessary.
Avoids unnecessary re-renders by comparing the updated state with the current state, and only triggering an update if there are actual changes.
This improves performance and prevents potential issues caused by excessive re-rendering.
* Changes based on feedback from @nielslyngsoe
* removing unnecessary call to requestUpdate
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Removed two unnecessary delete clauses when removing content types (they are looking for user group Ids, but we are deleting a content type).
* Renamed table name constant with obsoletion to better reflect name and contents of table.
* Added granular permission for property value records to delete clauses when deleting a document type.
* Delete property value permissions for removed property types.
* Added integration tests to verify behaviour.
* Added `action` kind for `menuItem` extension-type
* Adds `<umb-tiptap-menu>` component
* Adds support for `menu` extensions to the `<umb-cascading-menu-popover>` component
* Adds support for `menu` extensions to the `tiptapToolbarExtension` extension-type
* Adds support for `menu` extensions to the `<umb-tiptap-toolbar-menu>` component
* Adds manifests for table column/row menus
Deprecates the `umb-tiptap-table-column-menu` and `umb-tiptap-table-row-menu` components.
* Adds table column menu actions
* Adds table row menu actions
* Adds table cell menu actions
* Adds table (general) menu actions
* Replaces table toolbar menu with the new `menu` extensions
* Adds `UMB_TIPTAP_RTE_CONTEXT`
so that the menu actions can access the Editor instance.
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/table/actions/table-properties.action.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* `UmbTiptapMenuElement` doesn't use the `editor` property
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds support for the "folders only" flag on retrieving siblings of a node.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated test code.
* Removed double secondary ordering by node Id and ensured we include this clause for all sort orders.
* Ensure that ordering by node Id is always added only once and last, and only if it's not already been included in the order by clause.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated the block editor validation message
* Updated tests for schedule publishing after unselecting all languages
* Added tests for sibdlingsOfType extension
* Updated tests due to test helper changes
* Bumped version of test helper
* Added release tag for regression issue
* Make tests for siblingsOfType run in the pipeline
* Reverted npm command
* Provides an abstraction for creating the JavaScriptEncoder used in SystemTextConfigurationEditorJsonSerializer.
* Generalised JSON serialization encoder factory to work for all System.Tex.Json serializers.
Added the serializer's name as a parameter to allow for different encodings per serializer if required.
* Fixed tests by removing use of obsolete constructors.
* Removed name parameter and used a generic type instead.
* RTE: Restore deleted blocks
Maintains a state of unused (deleted) blocks,
that could be restored later, e.g. with Tiptap RTE's undo action.
Fixes#19637
* Updated with @copilot suggestions
* Fixes restored block state on variant documents
* Removed this as these tests are covered in other files
* Added release tags
* Make all tests with @smoke and @release tags run in the pipeline
* Updated npx command
* Updated npx command
* Updated npx command
* Fixed failed tests related to document type folder
* Cleaned up
* Used grep in yaml file instead of package.json file
* Updated yml file
* Updated testCommand
* Fixed command
* Added releaseTest command
* Added another job to run regression test in the release build
* Fixed comments
* Updated name of test job
* Make all release tests run in the pipeline
* Updated warning message
* Reverted npm command
* feat: makes tree stores optional and deprecates dependent methods
* allow `Example` as class prefix
* docs: updates example to remove the treeStore
* deprecates the usage of treeStore contexts
* chore: adds deprecation warnings to all existing tree stores
Fixed issue with syntax highlighting in code editor (#19414)
(cherry picked from commit 3f3c9f8823)
Co-authored-by: Andy Butland <abutland73@gmail.com>
* build: move typescript specific eslint rules to the `**/*ts.` pattern to avoid errors for .js files
* allow `Example` as class prefix
* allow `example-` as custom element prefix
* Removed `eslint-disable-next-line` comments
from the Example classes.
* Code formatting/tidy-up of Example classes
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Updated relation type tests
* Created tests
* Bumped version
* Fixed tests
* Fixed tests
* Fixes based on comments
* Added waits to figure out why tests fail on pipeline
* Added a reload to check if test passes on pipeline
* Added reloads
* Removed reload page
* Reverted smokeTest command
* Use unrestricted text field when creating data types based on the CheckboxList property editor.
Initialize default checkbox list data type with the unrestricted text field for storage on new installs.
Migrate existing data type and property data.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Correctly use constant.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Added user start node restrictions to sibling endpoints.
* Further integration tests.
* Tidy up.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Revert previous update.
* Retrieves item counts before and after the target for sibling endpoints and returns in API response.
* Applied previous update correctly.
* Removed blank line.
* Fix build and test asserts following merge.
* Update OpenApi.json.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Fixes#19654
Adds the propertyAlias to the VariationContext so that products implementing the GetSegment method are aware which propertyAlias it's being called for
* Re-implement original variation context for backwards compatibility
* Fixes hidden overload method
Ensures the `GetSegment` method overload is not hidden when a null `propertyAlias` is passed.
* Resolve backward compatibility issues.
* Improved comments.
---------
# Conflicts:
# src/Umbraco.PublishedCache.NuCache/Property.cs
* delete internal stories
* more clean up
* more cleanup
* move to generic components
* clean up
* move body layout
* move story
* Move icon stories
* remove prefilled color
* Update icon.element.ts
* rename story
* Replace UUIFormControlMixin with UmbFormControlMixin
Refactors all relevant input and form control components to use the new UmbFormControlMixin from '@umbraco-cms/backoffice/validation' instead of the deprecated UUIFormControlMixin. This change improves consistency and aligns with updated validation handling in the codebase.
* Revert "Merge branch 'v16/bugfix/use-umb-form-control-mixin' into v16/docs/storybook-clean-up"
This reverts commit 7fa70b87c7, reversing
changes made to 8fe7391790.
* simplify name
* Add discard changes modal stories
* add error viewer modal
* fix stories
* rename
* fix date story
* add story for input with alias
* add story for popover layout
* add story for dropdown
* add args
* register core manifests
* register entity action bundle + list
* add stack example
* clean up
* Create data-type-input.stories.ts
* change overview story to docs
* rename to docs
* rename to docs
* Update icon.stories.ts
* Update preview.js
* remove overview story
* rename default story
* load more manifests
* import all manifests
* Update preview.js
* Update preview.js
* provide all stores + global contexts
* Update data-type-input.stories.ts
* add user input and ref stories
* add storybook auth context
* set the initial storybook language
* use isoCode param
* fix input-language component
* delete broken stories
* fix icon picker story
* fix mock member ids
* Fix query parameter name in item handler
Changed the query parameter from 'paths' to 'path' in the item handler to correctly retrieve item paths from the request. This ensures the handler processes requests as expected.
* Update user item handler to use user mock DB
Replaces the document mock database with the user mock database in the user item handler to ensure correct data source is used for user-related requests.
* Add config to checkbox list story
Introduces a sample configuration to the checkbox list Storybook story, providing predefined options for demonstration and testing purposes.
* Add config to select property editor story
Introduces a sample UmbPropertyEditorConfigCollection to the select property editor Storybook story, providing predefined options for demonstration and testing purposes.
* Add config to radio button list Storybook story
Introduces a sample UmbPropertyEditorConfigCollection to the radio button list
* Refactor slider story to use config collection
Replaces inline config array with UmbPropertyEditorConfigCollection for the slider property editor story.
* Delete property-editor-ui-label.stories.ts
* Group releated UIs
* Remove multi-url picker Storybook file
* add input stylesheet story
* add back localization stories
* Delete property-editor-config.stories.ts
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* update workspace example
* Update readme for workspace counter example
* update workspace counter examples readme
* Update examples workspace counter to include some testing
* Update glob pattern for text examples for windows
* Remove date object conversion as valueEditors don't seem to need it
* Update fault summary reference
* Added justification comment.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Cleanup obsoleted methods
* Add a way to disable UmbracoFile default sink
* Abstract LogViewService so only UmbracoFile sink related things are in the default interface implementation.
* Abstract LogViewRepository so only UmbracoFile sink related things are in the default interface implementation.
* Move GetGlobalLogLevelEventMinLevel to base
* Removed unused internal class and obsoleted its base
* Added missing XML header comments and resolved warnings in service and repository classes.
* Made private method static.
* Addressed issues raised in code review.
* Expose repository from the service base class.
* Restored further obsoleted code we can't remove yet.
* Removed log viewer tests on removed class. We have integration tests for the new service.
* Obsoleted ILogViewer interface.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Adds CSS variables to `umb-input-tiptap`
to set the min/max height/width of the RTE.
* Moves "dimensions" config to the base RTE element
so can be reused with other RTE-based property-editors.
* Sets the CSS variables in the Tiptap property-editor element
* Code tidyup for RTE base element imports
* Corrects localization text of RTE dimensions description
As it's a fixed height/width as opposed to a maximum height/width.
* The CSS variable fallback value 'unset' should not be quoted.
CSS keywords like 'unset' should be unquoted, while string values should be quoted.
* Updated nightly E2E pipeline
* Fixed failing E2E tests
* Skipped content tests wirh list view content due to an issue
* Updated tests due to UI changes
* Updated fixme and skip tests - part 1
* Removed this file because the tests are already covered elsewhere
* Updated fixme() tests
* Updated skip() tests
* Bumped version
* Bumped version
* Bumped version
* Removed notification verification
* Removed the step to verify the notification for save action
* Fixed the failing tests
* Updated name of permission
* Bumped version
* Fixed failing tests
* Bumped testHelpers
* Removed tests related to tiptap toolbar as they are covered in another class
* Cleaned up
* Added more waits
* Cleaned up
* Added step to ensure redirect URL is created when renaming content.
* Restructured the tests
* Removed unnecessary steps
* Fixed isItemVisibleInRecycleBin
* Fixed isItemVisibleInRecycleBin
* Bumped version
* Added more wait for the deletion to complete
* Added waits for the deletion to complete
* Added more waits
* Removed unnecessary waits
* Added more waits to improve test stability
* Added skip for the flaky test
* Added test for removing a stylesheet in a block grid editor
* Updated test due to api helper changes
* Bumped version
* Fixed failing smoke test
---------
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* Add drag and drop to blockgrid area
* Adds `UmbChangeEvent` trigger
* Removes `updated` method
Puts `sorter.setModel` in the `value` setter,
so that the sorter is set on initial value.
* Imports sort order
Removed `UmbTextStyles`, as not used here
* Changed the cursor type to "move"
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Removed `cursor: not-allowed` style
* Sets the `umb-rte-block` `user-select` to `all`
* Adds an "invisible" selection background to `umb-ref-rte-block`
* Sets the `umb-ufm-render` text-content to be visible
* Adds `aria-hidden` attribute
* Bumped version of test helper
* Fixed the failing tests due to UI changes
* Adds `pointer-events: none` to selection-background
---------
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
* Updated tests for content with RTE in a block grid
* Updated tests forcontent with RTE in a block list
* Make all RTE tests run in the pipeline
* Cleaned up
* Reverted npm command
* Fix nullability of Children extension
* Fix nullability of methods throughout the CMS
* Fix return types of some methods that cannot return null
* Revert nullable changes to result of ConvertSourceToIntermediate for property editors (whilst some property editors we know won't return null, it seems more consistent to adhere to the base class and interface nullability definition).
* Updated new webhook events to align with new nullability definitions.
* Reverted content editing service updates to align with base classes.
* Applied collection nullability updates on content repository to interface.
* Reverted value converter updates to match interface.
* Applied further collection updates to interface.
* Aligned media service interface with implementation for nullability.
* Update from code review.
---------
Co-authored-by: Ivo van der Bruggen <ivo@dutchbreeze.com>
Co-authored-by: Ivo van der Bruggen <ivo@vdbruggensoftware.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Change hardcoded text to be translatedeable
* Added the `count` value to the localization
---------
Co-authored-by: Lucas Bach Bisgaard <lucas.bisgaard@kraftvaerk.com>
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Disables Tiptap's `injectCSS` option
This option would inject the default CSS styles into
the `window.document`, which are never applied to
the component's shadow DOM.
* Add Tiptap's default styles to "rte-content.css"
The `caret-color` rule (line 93) resolves issue #19791.
* Add integration tests that shows the problem
* Fix the problem and add explenation
* Improved comments slightly to help when we come back here!
Moved tests alongside existing ones related to scopes.
Removed long running attribute from tests (they are quite fast).
* Fixed casing in comment.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Introduce new AuditEntryService
- Moved logic related to the IAuditEntryRepository from the AuditService to the new service
- Introduced new Async methods
- Using ids (for easier transition from the previous Write method)
- Using keys
- Moved and updated integration tests related to the audit entries to a new test class `AuditEntryServiceTests`
- Added unit tests class `AuditEntryServiceTests` and added a few unit tests
- Added migration to add columns for `performingUserKey` and `affectedUserKey` and convert existing user ids
- Adjusted usages of the old AuditService.Write method to use the new one (mostly notification handlers)
* Audit service rework
- Added new async and paged methods
- Marked (now) redundant methods as obsolete
- Updated all of the usages to use the non-obsolete methods
- Added unit tests class `AuditServiceTests` and some unit tests
- Updated existing integration test
* Use the audit service instead of the repository directly in services
* Apply suggestions from code review
* Small improvement
* Update src/Umbraco.Core/Services/AuditService.cs
* Some minor adjustments following the merge
* Delete unnecessary file
* Small cleanup on the tests
* Remove changing user id to 0 (on audit) if user id is admin in media bulk save
* Remove reference to unused IUserIdKeyResolver in TemplateService
* Remove references to unused IShortStringHelper and GlobalSettings in FileService
* Started implementing new LongRunningOperationService and adjusting tasks to use this service
This service will manage operations that require status to be synced between servers (load balanced setup).
* Missing migration to add new lock. Other simplifications.
* Add job to cleanup the LongRunningOperations entries
* Add new DatabaseCacheRebuilder.RebuildAsync method
This is both async and returns an attempt, which will fail if a rebuild operation is already running.
* Missing LongRunningOperation database table creation on clean install
* Store expire date in the long running operation. Better handling of non-background operations.
Storing an expiration date allows setting different expiration times depending on the type of operation, and whether it is running in the background or not.
* Added integration tests for LongRunningOperationRepository
* Added unit tests for LongRunningOperationService
* Add type as a parameter to more repository calls. Distinguish between expiration and deletion in `LongRunningOperationRepository.CleanOperations`.
* Fix failing unit test
* Fixed `PerformPublishBranchAsync` result not being deserialized correctly
* Remove unnecessary DatabaseCacheRebuildResult value
* Add status to `LongRunningOperationService.GetResult` attempt to inform on why a result could not be retrieved
* General improvements
* Missing rename
* Improve the handling of long running operations that are not in background and stale operations
* Fix failing unit tests
* Fixed small mismatch between interface and implementation
* Use the new submit and poll functionality for the Examine index rebuild
* Use a fire and forget task instead of the background queue
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Make sure exceptions are caught when running in the background
* Alignment with other repositories (async + pagination)
* Fix build after merge
* Missing obsoletion messages
* Additional fixes
* Add Async suffix to service methods
* Missing adjustment
* Moved hardcoded settings to IOptions
* Fix issue in SQL Server where 0 is not accepted as requested number of rows
* Fix issue in SQL Server where query provided to count cannot contain orderby
* Additional SQL Server fixes
* Update method names
* Adjustments from code review
* Ignoring result of index rebuild in `IndexingNotificationHandler.Language.cs` (same behavior as before)
* Missed some obsoletion messages
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix navigationUrlService and underlying models not being thread safe
* Added migration to plan.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* #19775 fixed get user data by applying OrderBy after counting
* Apply suggestions from code review
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Remove skip
* Added tests for creating and updating content
* Removed skip because the issue is fixed
* Updated assertion steps for the update document user permission
* Bumped version
* Added release tag
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Started implementing new LongRunningOperationService and adjusting tasks to use this service
This service will manage operations that require status to be synced between servers (load balanced setup).
* Missing migration to add new lock. Other simplifications.
* Add job to cleanup the LongRunningOperations entries
* Add new DatabaseCacheRebuilder.RebuildAsync method
This is both async and returns an attempt, which will fail if a rebuild operation is already running.
* Missing LongRunningOperation database table creation on clean install
* Store expire date in the long running operation. Better handling of non-background operations.
Storing an expiration date allows setting different expiration times depending on the type of operation, and whether it is running in the background or not.
* Added integration tests for LongRunningOperationRepository
* Added unit tests for LongRunningOperationService
* Add type as a parameter to more repository calls. Distinguish between expiration and deletion in `LongRunningOperationRepository.CleanOperations`.
* Fix failing unit test
* Fixed `PerformPublishBranchAsync` result not being deserialized correctly
* Remove unnecessary DatabaseCacheRebuildResult value
* Add status to `LongRunningOperationService.GetResult` attempt to inform on why a result could not be retrieved
* General improvements
* Missing rename
* Improve the handling of long running operations that are not in background and stale operations
* Fix failing unit tests
* Fixed small mismatch between interface and implementation
* Use a fire and forget task instead of the background queue
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Make sure exceptions are caught when running in the background
* Alignment with other repositories (async + pagination)
* Additional fixes
* Add Async suffix to service methods
* Missing adjustment
* Moved hardcoded settings to IOptions
* Fix issue in SQL Server where 0 is not accepted as requested number of rows
* Fix issue in SQL Server where query provided to count cannot contain orderby
* Additional SQL Server fixes
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Reloads the template tree when creating a document type with a template.
* Housekeeping: separating/sorting import types
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* fix: Prevent Repository Details Manager making requests for empty arrays
Fixes#19604
* Reworked to pass the `uniques` through to the `#requestNewDetails()` method
The unique values are included as a closure,
persisting after the `#init` promise is resolved.
Rather than call `getUniques()` to get an async'd value.
* Updated with Copilot suggestions
https://github.com/umbraco/Umbraco-CMS/pull/19731#discussion_r2221512463
* Add defensive coding to the member application initializer (#19760)
* Moved _isInitialized to after the initialization
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Return 404 on delivery API requests for segments that are invalid or not created.
* Handled case with no segmented properties.
* Let the property decide if it has a value or not
---------
Co-authored-by: kjac <kja@umbraco.dk>
Fix issue template is shrunk when enable inline editing mode in collection list view in block list field
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
* Add a backing field for EditorUIAlias and track changes when its set.
* Add previously failing unit test to verify fix.
* Aligned backing field casing with property name.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added tests for creating content using document blueprint
* Updated tests due to api helper for document blueprint changes
* Bumped version
* Make all Blueprint tests runs in the pipeline
* Reverted npm command
* Updated tests for adding a thumbnail to a block grid
* Added tests for adding a block thumbnail
* Make tests run in the pipeline
* Reverted npm command
* Add support for programmatic creation of property types providing the data type key (#19720)
* Add support for programmatic creation of property types providing the data type key.
* Add integration tests
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Don't use Lazy
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Populate name for content and media on URL picker if title is left empty.
* Display URL for manually entered URLs.
* Updates from code review.
* Reverted `elementName` constant
* Sorted imports
* Small code tidy-ups
* Added logic to render the `url` as the `name` fallback
In this case, the `detail` is left empty, giving prominence to the `url` value.
* Refactored the get name/url methods
for code consistency.
* Updated `#requestRemoveItem()` to use the item's resolved name
with a fallback to "item".
Also localized the "Remove" button label
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* chore: revamps openid package to organise files in a 'src' folder
* feat: adds all externals as npm workspaces with a vite build
* feat: copies the correct uui assets
* feat: copies the backoffice static assets
* feat: creates the correct module for openid
* feat: copies the correct monaco-editor assets
* feat: moves monaco-editor into its package
* feat: moves dependencies to relevant external modules
* feat: gets rid of rollup
* build: uses tiny-glob instead of glob (one less dependency)
* feat: copies all css assets to dist-cms/css first, minifies them, then copies everything over to StaticAssets
* build: removes old static assets from vite static build
* fix: forwards the file extensions to the inner dropzone
* fix: ensures non-mimetype extensions start with a dot (.)
* chore: adds more details on how to set file extensions
* feat: adds a bit of styling to code snippets in UFM
* fix: return if no file in stream
* fix: prevents potential race condition if src changes
* chore: minor code improvement
* Adds variation by the header name Accept-Language to the develivery API output cache policy
* Removed obsolete constructor (not necessary as the class is internal).
* Introduce contants for header names.
* Fix issue forceHideContentEditorInOverlay not available in RTE
* remove href link when enable hide content editor setting:
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
* feat: converts tokenResponse into an object state
* feat: adds worker that checks token lifetime
* feat: initialises token worker to check up on tokens
* revert
* chore: defines typings for shared workers
* chore: uses correct assets url for core package
* feat: sets correct values for token check expiration
* feat: adds labels to confirm modal
* feat: separates logic for session monitoring to own controller
* feat: adds a timeout modal to correctly inform the user
* feat: opens the timeout modal (and closes it again) if a timeout occurs
* feat: log out when user clicks log out button
* feat: adds localization
* feat: sets sensible defaults for the web worker to check
* feat: adds more languages
* chore: adds more comments
* chore: removes nodejs types
* Update src/Umbraco.Web.UI.Client/src/packages/core/auth/workers/token-check.worker.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* chore: removes nodejs types
* chore: resolves cyclic imports
* chore: removes circular dependencies from the 'modal' package
* chore: redefine SharedWorkerGlobalScope because of Github Actions CI
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Mock data updates
The `icon` is not part the block-type data.
* Adds `description` to the mock doctype model
* Refactors block catalogue modal
to make the filter/search work with a block-type's name & description.
This removes the need to use the `<umb-block-type-card>` component,
all element-type data is requested upfront.
* Reverted dev/debug change
* Abstracted out the element-type items observation to its own method
* Updated CSS rule
thanks to a Copilot suggestion.
* Adds `markedExtension` extension-type
* Relocates the Component and Filter extension-type interface code files
to under "extensions"
* Moves `UfmPlugin` type to its own referencable file
* Adds UFM support for JS expressions
making use of "@heximal/expressions" library.
* Modified regex pattern to match nested braces
* try/catch for invalid JS expressions
* Capitalizing the JS in `UmbUfmJsMarkedExtensionApi` class name
for consistency and improved readability.
* Abstracted out `ufmjs()` to its own Marked extension file
making it simpler to add unit-tests.
* Fixed up types in UFM context
added JSDocs for public methods
* Adds a generic Least Recently Used (LRU) cache implementation
* Added tests for granular document permission
* Updated tests for Webhook
* Bumped version
* Make all tests for granular permission run in the pipeline
* Added issue link for the failing tests
* Remove .skip
* Removed unnecessary tests
* Updated assertion step for create and delete document for a specific document
* Updated tests for read permission
* Fixed comments
* Pass notification state to cache refreshers.
Pass previous user name into member saved notification state and use when refreshing cache to clear the member by keys based on this.
* Fixed issue raised in code review.
* Fixed casing for state key.
* Added removed parameter to unit tests.
* Fix breaking change.
* Adds `markedExtension` extension-type
* Relocates the Component and Filter extension-type interface code files
to under "extensions"
* Moves `UfmPlugin` type to its own referencable file
* PoC implementation
* Move to controller base
* Implement solution that seems worse, but works better
* Don't require parent key in repository method
* Fix typos
* Add siblings for data type, media type and media
* Add endpoint for template
* Add DocumentType and DocumentBlueprint controllers
* Fix naming
* Fix case if siblings are under root
* Take item ordering into account
not all entities are ordered by sort order
* Add default implementation
* Fix parentkey
* Add tests
* Format optimizations for split view
* Add test covered requirement to description
* Cover positive case and make test case output more readable
* reduce allocations
* Clarify test
---------
Co-authored-by: Migaroez <geusens@gmail.com>
* Fixes issue where content created from blueprint would not persist file upload property values.
* Ensure a copy of a file upload is created when scaffolding content from a blueprint, like we do when copying content.
* Clarified comment.
* Removed unneeded usings.
* Fixed spelling.
* Handle create of blueprint from content to create a new uploaded file.
Handle delete of blueprint to delete uploaded files.
* Added abstraction for aggregation of granular permissions to support custom permissions.
* Refactor to move responsibility for aggregating granular permissions to the respective mappers.
* Added XML header comments for permission mappers.
* Tidied up/removed warnings in UserPresentationFactory interface and implementation.
* Optimized retrieval of documents in DocumentPermissionMapper.
* Fixed method header comment.
* Use entity service rather than content service to retrieve key and path.
* Passes the preview flag to the cache retrieval when resolving the delivery API object for the MNTP property editor.
* Added unit test verifying fix and adjusted mocks for tests to acoomodate.
* Provided preview flag for Razor rendering.
* Refactor section conditions into subfolders
Split section condition logic into 'section-alias' and 'section-user-permission' subfolders, each with their own constants, manifests, and types. Updated imports and manifest aggregation to use the new structure for improved modularity and maintainability.
* use const
* fix build
* Refactor section alias condition to use constant
Replaces hardcoded 'Umb.Condition.SectionAlias' strings with the UMB_SECTION_ALIAS_CONDITION_ALIAS constant across all manifests and related files. This improves maintainability and consistency by centralizing the section alias condition reference.
* clean up workspace conditions
* only show collection items workspace view when document is created
* do not pass null for collection
* only show media collection view when media is created
* add basic collection example
* add card view example
* update example readme
* Add workspace view example with collection
* wip tree example
* clean up
* Update README.md
* Update README.md
* fix: never reject a token response
If a token response is rejected, then the pipeline will also fail because it does not understand that error. Let the API interceptors do their job instead and simply return the old, now-invalid token which will prompt the API interceptors to store the request states and retry them afterwards.
* chore: removes unused timeoutsignal
* chore: captures the stale token before potentially clearing it
* build(github): check that the "close" job only runs when the appropriate label is applied
it follows that the "build" job would only have built an environment when the label was applied
* build(github): check that the action is run directly on the repository and not from a fork
this alleviates the problem that the deploymentToken for Azure only exists within the repository
* Add null checks for editPath and name in render method
The render method now checks for the presence of both editPath and _name before rendering the button, preventing potential errors when these values are missing.
* Refactor dropdown open state handling
Replaces the public 'open' property with a private field and getter/setter to better control dropdown state. Moves popover open/close logic into the setter, removes the 'updated' lifecycle method, and conditionally renders dropdown content based on the open state.
* add opened and closed events
* dispatch opened and closed events
* Render dropdown content only when open
Introduces an _isOpen state to control rendering of the dropdown content in UmbEntityActionsBundleElement. Dropdown content is now only rendered when the dropdown is open, improving performance and preventing unnecessary DOM updates.
* Update dropdown.element.ts
* create a cache elements
* Optimize entity actions observation with IntersectionObserver
Adds an IntersectionObserver to only observe entity actions when the element is in the viewport, improving performance. Refactors element creation to use constructors, updates event handling, and ensures cleanup in disconnectedCallback.
* only observe once
* Update entity-actions-bundle.element.ts
* Update dropdown.element.ts
* Update entity-actions-bundle.element.ts
* split dropdown component
* pass compact prop
* fix label
* Update entity-actions-dropdown.element.ts
* Update entity-actions-dropdown.element.ts
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* build(deps-dev): bump storybook from v8 to v9
* chore: run storybook v9 migrations
* chore: updates import paths for storybook-webcomponents-vite (migration)
* chore: migrates eslint for storybook config
* fix: updates old link to composed storybook so we reference the latest production uui
* chore: formats eslint config file
* chore: changes import path to build mdx stories
* chore: updates language list to reflect v16
* Introduce new AuditEntryService
- Moved logic related to the IAuditEntryRepository from the AuditService to the new service
- Introduced new Async methods
- Using ids (for easier transition from the previous Write method)
- Using keys
- Moved and updated integration tests related to the audit entries to a new test class `AuditEntryServiceTests`
- Added unit tests class `AuditEntryServiceTests` and added a few unit tests
- Added migration to add columns for `performingUserKey` and `affectedUserKey` and convert existing user ids
- Adjusted usages of the old AuditService.Write method to use the new one (mostly notification handlers)
* Audit service rework
- Added new async and paged methods
- Marked (now) redundant methods as obsolete
- Updated all of the usages to use the non-obsolete methods
- Added unit tests class `AuditServiceTests` and some unit tests
- Updated existing integration test
* Apply suggestions from code review
* Small improvement
* Update src/Umbraco.Core/Services/AuditService.cs
* Some minor adjustments following the merge
* Delete unnecessary file
* Small cleanup on the tests
* Refactor descendant enumeration in DeliveryApiContentIndexHelper
Improved loop condition to allow for processing of more than 10.000 descendants for indexing.
* Add failing test for original issue.
* Renamed variable for clarity.
---------
Co-authored-by: Brynjar Þorsteinsson <brynjar@vettvangur.is>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Observe read-only guard rules in variant selector
Added observation of read-only guard rules in the workspace split view variant selector to ensure read-only cultures are updated when rules change.
* Improve save action to react to read-only rule changes
* remove unused
* Add entity-type and entity-unique condition support
Introduces new condition types for entity-type and entity-unique, including their constants, types, condition implementations, and manifests. Updates exports in core entity modules to include these new features, enabling more granular extension conditions based on entity type and uniqueness.
* register conditions
* add support for oneOf
* fix self imports
* Update manifests.ts
* remove unused
Reduce lookups needed in ConcurrentDictionaries and sort using List.Sort, make key removal O(1) by using hashsets and avoid duplicates, remove unneeded .ToList() and other minor tweaks
* Refactor section conditions into subfolders
Split section condition logic into 'section-alias' and 'section-user-permission' subfolders, each with their own constants, manifests, and types. Updated imports and manifest aggregation to use the new structure for improved modularity and maintainability.
* use const
* fix build
* Refactor section alias condition to use constant
Replaces hardcoded 'Umb.Condition.SectionAlias' strings with the UMB_SECTION_ALIAS_CONDITION_ALIAS constant across all manifests and related files. This improves maintainability and consistency by centralizing the section alias condition reference.
* Fix for https://github.com/umbraco/Umbraco-CMS/issues/18872
* Parsing added for current value
* Build fix.
* Cyclomatic complexity fix
* Resolved breaking change.
* Pass content key.
* Simplified collections.
* Added unit tests to verify behaviour.
* Allow file upload on block list.
* Added unit test verifying added property.
* Added unit test verifying removed property.
* Restored null return for null value fixing failing integration tests.
* Logic has been updated according edge cases
* Logic to copy files from block list items has been added.
* Logic to delete files from block list items on content deletion has been added
* Test fix.
* Refactoring.
* WIP: Resolved breaking changes, minor refactoring.
* Consistently return null over empty, resolving failure in integration test.
* Removed unnecessary code nesting.
* Handle distinct paths.
* Handles clean up of files added via file upload in rich text blocks on delete of the content.
* Update src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs
Co-authored-by: Sven Geusens <geusens@gmail.com>
* Fixed build of integration tests project.
* Handled delete of file uploads when deleting a block from an RTE using a file upload property.
* Refactored ensure of property type property populated on rich text values to a common helper extension method.
* Fixed integration tests build.
* Handle create of new file from file upload block in an RTE when the document is copied.
* Fixed failing integration tests.
* Refactored notification handlers relating to file uploads into separate classes.
* Handle nested rich text editor block with file upload when copying content.
* Handle nested rich text editor block with file upload when deleting content.
* Minor refactor.
* Integration test compatibility supressions.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sven Geusens <geusens@gmail.com>
* Fix check for pending package migration to use the package not plan name.
* Cover all package name/identifier permutations and fix the API output for multiple plans
* Adjusted log message to not refer to unattended migrations as migrations may be being run attended.
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* feat: adds new localization keys for forbidden routes
* feat: ignore all 400, 401, 403, and 404 errors as they are handled by the UI
* feat: adds new elements to show forbidden routes and entities
* feat: adds generic forbidden state to base entities
* feat: injects a forbidden route component to documents
* feat: adds 'forbidden' state to media workspace
* chore: aligns document and media workspaces
* test(mock): adds user configuration endpoint
* test(mock): adds calculate-start-nodes endpoint to users
* test(mock): adds missing endpoint for 'client-credentials'
* feat: clean up old observers on entity errors
* feat: aligns UI for better DX if there is no user
* fix: returns early if there is no user, instead of trying to append properties to the object
* feat: adds 'forbidden' state to members
* feat: adds support for forbidden document blueprints
* feat: allows parent to be undefined as well as null
* feat: forbidden route for members as a state
* chore: simplify language workspace
* test: adds forbidden mock data
* test: adds missing endpoints and a check for forbidden ids
2025-06-30 10:00:11 +01:00
Jacob OvergaardGitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Assert dates in content editing integration tests to millisecond only.
* Add date time extension unit tests and refactor to switch statement.
* Removed whitespace.
* add slot for icon
* expose icon data
* render icon
* load type for scaffold
* rename
* render icon for media
* add observable for content type icon
* request data in data source
* wire up document scaffolding
* remove unused
* export server data source
* render icon for member
* rename data source to align with other detail sources
* rename data source
* remove unused styling
* remove console log
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* remove console log
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* remove console log
* render workspace icon for document type folders
* make folder workspace editor
* use element
* remove const
* use folder-workspace-editor for templating folders
* introduce name write guard manager
* prevent name change of file system folders
* Update script-folder-workspace-editor.element.ts
* make guard optional
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Adds optional parameter to Tiptap toolbar item's `isActive`
* Adds `isActive` support to toolbar menus and cascading menus
* Adds `isActive` support to the font menus
* Adds `isActive` support to the table menu
+ UI/CSS tweak
* Adds `isActive` support to the style menu API
+ refactored the commands
* Improves cascading menu popover closing
it previously didn't close the menu when an action was clicked.
* remove trash notifications
* Updated tests so we no longer use the notification for moving to recycle bin
---------
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
* Rename `IContentService.CreateContentFromBlueprint` to `CreateBlueprintFromContent`
In reality, this method is used by the core to create a blueprint from content, and not the other way around, which doesn't need new ids. This was causing confusion, so the old name has been marked as deprecated in favor of the new name. If developers want to create content from blueprints they should use `IContentBlueprintEditingService.GetScaffoldedAsync()` instead, which is what is used by the management api.
* Added integration tests to verify that new block ids are generated when creating content from a blueprint
* Return copy of the blueprint in `ContentBlueprintEditingService.GetScaffoldedAsync` instead of the blueprint itself
* Update CreateContentFromBlueprint xml docs to mention both replacement methods
* Fix tests for rich text blocks
* Small re-organization
* Adjusted tests that were still referencing `ContentService.CreateContentFromBlueprint`
* Add default implementation to new CreateBlueprintFromContent method
* Update tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentBlueprintEditingServiceTests.GetScaffold.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fix: if no workspace views are found at all, show a not found page
* fix: rather than redirecting to the first available tab, which may not always be available on secondary routing, let the router display the first tab on an empty url
this mirrors how workspace views are displayed in umb-workspace-editor
* Refactored breadcrumb variant name
The parentheses will be added to unnamed variant ancestor items.
* Adds `last-item` attribute
(for semantics)
* Imports tidy-up
* Refactored `#getHref` to early exit for `.isFolder`
Saves on the string allocation.
* Added tests for webhook
* Added tests for webhook trigger
* Bumped version
* Make all Webhook tests run in the pipeline
* Fixed comment
* Reverted npm command
* Updated due to test helper changes
* Updated user group tests due to api helper changes
* Updated tests for user group default configuration due to UI changes
* Added tests for document property value permission
* Added tests for document property value permission in content with block
* Bumped version
* Make specific tests run in the pipeline
* Added skip tag and issue link for the failing tests
* Added tests for granular property value permission
* Fixed comment
* Bumped version
* Bumped version
* Fixed comments
* Bumped version and reverted npm command
* Make all tests for user group permission run in the pipeline
* Updated smokeTest command
* Fixed comments
* Reverted npm command
* feat: fix a small-ish nitpick where extensions would reload after login
this could potentially try to re-register all private extensions after each auth signal, which is being prevented anyway because of duplicate aliases, but still nice to remove and not have to listen to
* feat: align login UI extension load with backoffice, i.e. wait for external load before registering core extensions
* build(deps): bump @hey-api to newest and re-generate client
* chore: adds extra error logging
* feat: adds retry logic to the api interceptor
* feat: warn about incomplete actions
* fix: the body was already plain text, but we need to ensure the headers say so as well
* feat: warns the user when actions could not be completed
* build(deps): update @hey-api/client-fetch
* chore: generate new api
* feat: simplify error handling to just UmbApiError and UmbCancelError
* feat: moves error notifications from interceptors into tryExecute, so you more easily can opt out of it and everything is gathered in one place
* feat: recreate responses with correct 'status' and 'statusText'
* build: stop dotnet processes after debug session
* feat: extrapolate common logic into helper method to create responses
* feat: returns a UmbProblemDetails like object on interceptors to be handled by tryExecute
* chore: deprecates duplicate, outdated UmbProblemDetails interface and type guard
* feat: uses the 'title' of the problem details object to convey the main message
* chore: 401 and 403 uses their own interceptors
* feat: show no notification if 401
* feat: uses the real request method and url (instead of the template placeholders) to tell the user what did not succeed
* feat: retry requests with no timeout/race
* feat: throttle and delay signals and disallow them from being updated from the outside
* chore: adds more logging to timeouts
* chore: optimise imports
* test: ignores any test files left in node_modules folder
* feat: uses auditTime to wait a bit before showing the timeout screen
* feat: adds 404 handling to error interceptor
* chore: cleans up after response modification
* feat: preserve only a few headers
this mimicks the v15 behavior
* feat: lets the UI handle 404 errors instead of notifying directly
* test: uses create action menu option instead to find the correct locator, and skips a seemingly unnecessary timeout
* fix: add a catcher to most `asPromise` for stores to prevent cascading errors
* fix: remove conditional instances - they should be able to be undefined
* fix: check for missing store and extract UmbProblemDetails
* fix: only append data if no error
* fix: adds error handling to missing stores and to extract the ProblemDetails object
* revert commit
* fix: ignore errors completely instead of unsetting stores
* revert commit
* chore: cleanup imports
* fix: do not unset store
* stop observation in a proper way
* stop observation of for document-user-permissions
* check for manager twice
* save action
* save action optional
* fix: ensure the right types are used for base stores
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Regenerate keys in RTE blocks on clone operations
This was already present for BlockList and BlockGrid, but not Blocks in RTE.
* Small adjustment from code review
* Bump version to 16.0.0, update starter kit reference and enable package validation.
* Update version number in package.json.
* Re-disabled package validation (can't enable this yet).
* Tiptap style menu toggles (for classes and IDs)
Fixes#19244
* Tiptap style menu toggles (for font/color)
Fixes#19508
* Tiptap "Clear Formatting" remove classes and styles
* Tiptap font sizes, removes trailing semicolon
as the API handles the delimiter
* Tiptap global attrs: adds set/unset styles commands
* Ensure to delete related tokens when removing logins for removed external login providers.
Ensure to avoid removing logins for members.
* Removed unnecessary <= check.
* Introduce new AuditEntryService
- Moved logic related to the IAuditEntryRepository from the AuditService to the new service
- Introduced new Async methods
- Using ids (for easier transition from the previous Write method)
- Using keys
- Moved and updated integration tests related to the audit entries to a new test class `AuditEntryServiceTests`
- Added unit tests class `AuditEntryServiceTests` and added a few unit tests
- Added migration to add columns for `performingUserKey` and `affectedUserKey` and convert existing user ids
- Adjusted usages of the old AuditService.Write method to use the new one (mostly notification handlers)
* Apply suggestions from code review
* Small improvement
* Some adjustments following code review. Removed UnknownUserKey and used null instead.
* Small adjustments
* Better handle audits performed during the migration state
* Update TODO comment
* Updated block grid tests
* Updated notifications in tests
* Updated tests
* Added testIdAttribute
* Bumped version of testHelpers
* Added waits after creation
* Updated more tests related to notifications
* Bumped version
* Cleaned up
* updated tests
* Bumped version
* Updated tests
* bumped version
* chore: export useful rxjs functions
* fix: use switchMap to ensure correct loading of localization extensions
also added filter() and distinctUntilChanged() to ensure the logic is not run more often than what is needed
* test: adds tests for async localization extensions and weights
* chore: apply simpler sorting syntax
* chore: adds catchError to ensure the whole stream is not stopped because of an error
* chore: lowest weight should win
* chore: move catchError so it catches everything
* chore: returns an observable to not break the stream
* chore: reverse weight as the previous was correct
* chore: adds a true comparer function that is more efficient
* Import order sorting
* Export order sorting
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Fixes search filter text alignment
* Let `styleMenu` kind display as a menu
* Collapse excessive whitespace in RTE
* Ensures the RTE Capabilities are in 3 columns
* Dimensions UI fixes
* Ensures backwards compatibility of `UMB_CONTENT_PROPERTY_CONTEXT`
* Updates usage of deprecated `UMB_CONTENT_PROPERTY_CONTEXT` to `UMB_PROPERTY_TYPE_BASED_PROPERTY_CONTEXT`
* chore: disable notifications for global manifest loads
* fix: registers required contexts to load public manifests
* fix: specifically for localizations, load with the same cultures and weights as the backoffice itself does
* fix: set weight to +100 to make sure custom localization extensions are loaded first
* fix: remove 'welcome' fallback to avoid a flash of unlocalized content (FO"U"C)
* fix: starting <li> tag
* v16 cherry pick of member partial cache invalidator see #19314
# Resolved merge conflic in src/Umbraco.Core/Cache/Refreshers/Implement/MemberCacheRefresher.cs
* Take nullmember cacheitems into account
* Removed encoding of request to retrieve files and folders by path, to avoid double encoding via the typed client.
* fix: adjusts log viewer to encode only once and remove empty properties
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Updated due to test helper changes
* Updated user group tests due to api helper changes
* Updated tests for user group default configuration due to UI changes
* Added tests for document property value permission
* Added tests for document property value permission in content with block
* Bumped version
* Make specific tests run in the pipeline
* Added skip tag and issue link for the failing tests
* Fixed comment
* Bumped version
* Fixed comments
* Bumped version and reverted npm command
Fixes#19382 by using proper umb-input-date events
The log viewer date range input was changed from using `input` to `umb-input-date`, but the event handlers weren't updated accordingly.
Fixes#19382 by using proper umb-input-date events
The log viewer date range input was changed from using `input` to `umb-input-date`, but the event handlers weren't updated accordingly.
* Ensure tag operations are case insensitve on insert across database types.
* Ensure tags provided in a single property are case insensitively distinct when saving the tags and relationships.
* Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Handle case sensitivity on insert with tag groups too.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: add a catcher to most `asPromise` for stores to prevent cascading errors
* fix: remove conditional instances - they should be able to be undefined
* fix: check for missing store and extract UmbProblemDetails
* fix: only append data if no error
* fix: adds error handling to missing stores and to extract the ProblemDetails object
* revert commit
* fix: ignore errors completely instead of unsetting stores
* revert commit
* chore: cleanup imports
* fix: do not unset store
* stop observation in a proper way
* stop observation of for document-user-permissions
* check for manager twice
* save action
* save action optional
* simplify init for detail repostiory
* fix routes
* adjusting more not found routes
* fix structure manager clean up
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Thow if attempting to use the default unique media path scheme with version 7 GUIDs.
* Expanded unittests, fixed null params, chose a better exception
* Use parameters in test.
---------
Co-authored-by: Migaroez <geusens@gmail.com>
* Added translations for `pt-PT` based on the existing `en` file
* Removed translations from `pt-BR` that are the same in `pt` or not translated. Other small adjustments.
* Replace all `ligação` with `link`, as it is more commonly used
* Small typo fixes in pt-BR
* Do not set icon color if the item is selected
* Added helper method for icon version to render.
* Fixed naming of protected helper method.
* Move further logic into helper method.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
The MediaService currently locks the ContentTree for GetPagedOfType(s) operations, but it's querying the MediaTree. This ensures we lock the correct tree.
* correct for fewer rejected promises
* move set new is new
* enable router slot to back out of a redirect
* hacky fix for redirect controller
* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/Umbraco.Web.UI.Client/src/packages/core/workspace/controllers/workspace-is-new-redirect.controller.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: renames `./src` to `./dist-cms` in distributed package.json
* build: adds missing package.json to segment package
* build: adds missing package and vite.config for 'settings'
* build: adds missing package.json for 'translation'
* build: hoist all sub-dependencies to main package.json file
* build: sync lock file with workspaces
* build: join the paths (for os agnosticity)
* implement use of pathMatch: 'full' for empty redirects
* awaitStability feature for route redirects
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* introduce umb-content-workspace-property to improve dx
* make property responsible for observing the view guard
* Update src/Umbraco.Web.UI.Client/src/packages/content/content/global-components/content-workspace-property.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* context consumer update tests
* no need to import when exporting
* only observe aliases
* merge the two component for less complexity
* added property settings
* ensure this works with extension begin removed
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Removes unnecessary newlines from rich text as JSON delivery API output.
* Fix case from PR feedback.
# Conflicts:
# src/Umbraco.Infrastructure/DeliveryApi/ApiRichTextElementParser.cs
# tests/Umbraco.Tests.UnitTests/Umbraco.Core/DeliveryApi/RichTextParserTests.cs
* fix: add appcache null check
* Moved constant into standard location.
Removed now unnecessary comment.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Handle user id 0 (Unknown/System) when building content version response model
`IUserIdKeyResolver.GetAsync` throws an exception when a user is not found.
As user 0 does not really exist, the exception was being thrown.
We now handle this scenario to return an empty reference.
* add slot for icon
* expose icon data
* render icon
* load type for scaffold
* rename
* render icon for media
* add observable for content type icon
* request data in data source
* wire up document scaffolding
* remove unused
* export server data source
* render icon for member
* rename data source to align with other detail sources
* rename data source
* remove unused styling
* remove console log
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* remove console log
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* remove console log
* Update detail-repository-base.ts
* Update document-workspace-split-view.element.ts
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fix for invalid state in JsonBlockValueConverter when an unused layout has a nested array
* Improved comments as suggested by copilot review, also fixed code style miss
* Added check for malformed JSON with more closing array tokens then opening tokens
* Added culture parameter to search APIs and propagated it to the indexed entity search service
* Variant Culture aware search in Document and Media Pickers (#19336)
* generate types
* enable selection of entity-item-ref elements
* Update input-document.element.ts
* add culture to document search args
* pass culture param to search end point
* get variant context in document picker
* add variant context
* set culture in variant context when changing app language
* set variant context when swithing variant in a workspace
* Update content-detail-workspace-base.ts
* clean up
* remove from split view manager
* Update property-dataset-base-context.ts
* change name to fallbackCulture
* simplify
* get context instead of consuming
* make all methods async
* implement for media
* Update current-user-action.extension.ts
* allow null until we reach the server
* remove log
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* remove console.log
* add display culture
* opt-in inheritance
* set observe alias to observeAppCulture
* stop inheritance if specific cultures are set
* remove unused import
* include culture for document and media global search
* await value for get methods
* include orderCulture for document collections
* Update document-collection.context.ts
* Update document-collection.context.ts
* fix self import
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* fix: split attribute regex into two to be able to ignore the order of attributes
* the regex should not care for the ending of the tag
* test: adds test cases to test order of attributes
* remove image sources using new regex
* adds more documentation
* adds test cases to test removal of source with and without parameters
* test for null value
* test: adds more cases for null and reversed parameters
* remove padding
* add document urls data resolver
* use in url info app
* handle invariant cases
* do not render culture if all links have the same culture
* use if defined
* handle variant with no links
* Update types.ts
* fix lint errors
* get variant aware document data
* remove unused
* use media item repository
* temp remove check
* populate url
* add spacing to reference app
* reset the url when removing document or media
* add validator
* make url input required
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Cherry-pick from 13 and adjust.
* Resolve circular dependency references and clear OpenIddict tokens on purging sessions associated with removed login providers.
* Removed out of date comment.
* Removed incorrect casing update for SQLite.
* Added logging and try/catch around retrieval of references, so we don't block critical operations following an incompatible data type change.
* Added a little more detail to the log message.
* Added a little more detail to the log message.
* Fix unittest mock dependency
---------
Co-authored-by: Migaroez <geusens@gmail.com>
* add global search extension
* render global search extension in search modal
* register document global search
* add media global search
* add data type global search
* add dictionary global search
* import manifests
* register document type global search
* add media type global search
* register member global search
* register member type global search
* register template global search
* export missing consts
* export missing consts
* export missing consts
* add conditions
* add variant context
* set culture in variant context when changing app language
* set variant context when swithing variant in a workspace
* Update content-detail-workspace-base.ts
* clean up
* remove from split view manager
* Update property-dataset-base-context.ts
* change name to fallbackCulture
* simplify
* make all methods async
* Update current-user-action.extension.ts
* remove culture and segment state
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Ordered `@property` setters/getters
* JSDocs + comments
* Removed unneeded CSS
* Markup code formatting
* Hides "Reset focal point" button
when focal point has default value
* Image Cropper field element: adds active state to crops
* Image Cropper Editor Field element: reduced the markup and styles
Removing duplications from inherited class
* Removed unused code from Image Cropper Focus Setter element
* Big refactor of Image Cropper Editor modal
to support File Upload Previews
* Added `<umb-file-upload-preview>`
to handle the logic of rendering the relevant `fileUploadPreview` extension.
* Refactored SVG File Upload Preview component
Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.
* Refactored General File Upload Preview component
Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.
* Refactored Image File Upload Preview component
Removes the `<uui-card-media>` container.
Controversially removes the link, but this was inconsistent with other file previews.
* Refactored Audio and Video File Upload Preview component
To align code with the other file previews.
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/image-cropper-editor/image-cropper-editor-modal.element.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Tiptap Media Picker: Uses imaging repository
to get the resized URLs from the server.
This adds support for ImageSharp's HMAC security.
* Update src/Umbraco.Web.UI.Client/src/packages/tiptap/extensions/toolbar/media-picker.tiptap-toolbar-api.ts
* feat: uses the actual configured image SIZE for both width and height as documented
this also deprecates the public maxWidth property
* feat: verifies that a resized image exists and use the size of that
* feat: transfer the image size calculation to the drag'n'drop uploader and ensures that imageSize() accounts for maxHeight as well
* docs: adds comment to explain why it calculates the image size
* test: adds cases for imageSize
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Updated nightly E2E pipeline
* Fixed failing E2E tests
* Skipped content tests wirh list view content due to an issue
* Updated tests due to UI changes
* Bumped version
* Added more waits
* add method to get all property aliases
* pass property aliases to composition modal
* put in a box + adjust spacing
* disable if doc type is not compatible for composing
* compare with what is used for composition
* add comment
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Ensures cultures set on content are correctly cased and verifies with integration tests.
* Improved test comments.
* Move culture casing check into an extension method and use from content service.
* Deduplicated test code and added more test cases
* Only run invalid culture codes test on Windows
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* make sure the unique follows the unique of the models type
* make sure the uniques are used to clean up
* omit #containers state for a more direct data flow
* ensure containers are refreshed correctly
* set ownerContentTypeUnique to undefined when clear
* Allow segment access to editors with access to documents, not only settings.
* Update src/Umbraco.Cms.Api.Management/Controllers/Segment/SegmentControllerBase.cs
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Cleaned up usings
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Deprecate the AuditService.Write() method
It will be moved to a new service with the rework of the AuditService, as it relates to a different repository (umbracoLog vs umbracoAudit).
* Update obsolete message to reference V18
* Apply suggestions from code review
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* remove curves
* new photo
* Revert "remove curves"
This reverts commit f691d1762f.
* re-introduce curves
* fix the edge of the lines
* fix edge of lines
* use color-background for alignment with login screen
* chore: replace login image in mocks
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* add new manifest
* wip element
* add segment to preview context
* add segment icon
* open preview route on the same server
* Update preview.context.ts
* clean up
* pass culture and segment to preview window
* Incorrect forum and security urls when raising issue (#19080)
* Add 'ManifestWithDynamicConditions' to ManifestHeaderApp so Header Apps can be conditionally shown/loaded (#19124)
* V15 QA Added acceptance tests for bulk trash dialog (#19125)
* Added tests for bulk trash content dialog
* Updated tests for trash content dialog
* Added tests for trash and bulk trash media dialog
* Moved trash content tests into a folder
* Bumped version
* Make trash tests run in the pipeline
* Make trash tests run in the pipeline
* Fixed comments
* Reverted npm command
* readme shield for forum
* Allow deselection of color picker property. (#19174)
* V15 Added acceptance tests for tiptap statusbar (#19131)
* Updated tests for tiptap RTE
* Moved tests for titptap toolbar to another class
* Added tests for titptap toolbar
* Added tests for tiptap statusbar
* Bumped version
* Make tiptap tests run in the pipeline
* Bumped version
* Reverted npm command
* build: restores some of the behavior from V13 in relation to StaticAssets (#19189)
In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.
* filter search to only include element types
* V16 QA update failing nightly tests (#19190)
* Fixed tests
* More updates for tests
* Bumped version of testhelpers
* Fixed notifications in tests
* Last fixes
* Revert "Merge branch 'v16/dev' into v16/hotfix/filter-element-type-search-for-block-types"
This reverts commit 7b8b5c28da, reversing
changes made to 6d4ddb7077.
* disable not pickable search results
* correct use of pickable filter
---------
Co-authored-by: Lotte Pitcher <LottePitcher@users.noreply.github.com>
Co-authored-by: Warren Buckley <warren@hackmakedo.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Lotte Pitcher <github@lottepitcher.co.uk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Updates dependencies on Umbraco.Code and Microsoft.CodeAnalysis.*.
* Avoids dependency warnings on build of Web.UI project.
* Bumped version to 16.0-rc2.
* build(deps): bump tiptap from 2.11.5 to 2.11.7
* fix: prepends the system `/css` folder to stylesheets before attempting to load them
* fix: adds more safety around path assumptions
* chore: eslint fix
* fix: prepend only the system path to picked stylesheets
* Open entity actions menu as pop up instead of modal
* Update entity-actions-bundle.element.ts
* Update entity-actions-bundle.element.ts
* ensure no indent for the menu items of the entity actions menu
* add scroll container
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.
In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.
In v13, the StaticAssets build was only triggered based on the existence of either the output folder or a preserve.* marker file. Here, we also additionally check for the node_modules/.package-lock.json file before reinstalling npm dependencies. We also now only run `npm install` rather than `npm ci` to optimise the build.
* Updated tests for tiptap RTE
* Moved tests for titptap toolbar to another class
* Added tests for titptap toolbar
* Added tests for tiptap statusbar
* Bumped version
* Make tiptap tests run in the pipeline
* Bumped version
* Reverted npm command
* Add authorization for webhooks to item and log endpoints.
* Remove full path details from exception when requesting a path outside of the physical file system's root.
* Added missing usings.
* Revert changes to the webhook items API
---------
Co-authored-by: kjac <kja@umbraco.dk>
* fix: detects if a request contains a problemdetails object then maps that back to the UmbApiError
* feat: uses isProblemDetailsLike everywhere and avoids showing the user a big "detail" string
* feat: disables notifications for temp file upload to handle it manually in case of special server errors
* fix: use temporary file manager for dictionary to catch all errors
* fix: uses temporary file manager to upload avatars to handle all server errors
* feat: observe on allowed image types for user avatar
* Update src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: located the status code 413 directly now that the management api supports it out-of-the-box
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add authorization for webhooks to item and log endpoints.
* Remove full path details from exception when requesting a path outside of the physical file system's root.
* Added missing usings.
* Revert changes to the webhook items API
---------
Co-authored-by: kjac <kja@umbraco.dk>
* fix: the publish action should use the publish modal
* feat: allows the publish modal to handle invariant data
* chore: rearrange the unpublish action & modal so they are one-for-one alike with publishing
* Updated acceptance tests - add steps to interact with publish modal
* Added tests for publish variant content
* Bumped version of test helper
* handle segment
* include segments in success notification
* include segments in success message
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
* fix: the publish action should use the publish modal
* feat: allows the publish modal to handle invariant data
* chore: rearrange the unpublish action & modal so they are one-for-one alike with publishing
* Updated acceptance tests - add steps to interact with publish modal
* Added tests for publish variant content
* Bumped version of test helper
* feat: adds text to indicate you are about to publish
---------
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
* Added tests for bulk trash content dialog
* Updated tests for trash content dialog
* Added tests for trash and bulk trash media dialog
* Moved trash content tests into a folder
* Bumped version
* Make trash tests run in the pipeline
* Make trash tests run in the pipeline
* Fixed comments
* Reverted npm command
* prevent document type picker search from returning element types when not allowed
* rename + fix modal rejection
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Filter Available should not return items without published ancestors when not in preview
* Update unittests mocks
* Internal documentation and minor code tidy.
* Tidied up integration tests and added new tests for the added method.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project.
* Fix nullability
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Clear elementscache from cache refreshers
* Add very simple test ensuring the elements cache is cleared
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project.
* Fix nullability
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Clear elementscache from cache refreshers
* Add very simple test ensuring the elements cache is cleared
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* feat: removes all generic Created, Saved, and Deleted notifications
* Comment out the notification checks in acceptance tests
* Bumped version of test helper
* Fixed publish with descendants tests
* Cleaned up
* Bumped version of test helper
---------
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* feat: adds new texts for 'unpublished' action
* chore(mock): adds missing endpoints for mock data
* feat: removes old, deprecated, and hardcoded messages for unpublish
* fix: publish actions should not fail just because the notification context might not be available
* feat: the unpublish actions should mimick the publish actions
* chore(mock): adds mock endpoints for 'publish with descendants'
* feat: moves 'publish with descendants' notifications to calling workspace
* feat: adds DK translations
* feat: adds different notification for unpublishing invariant content
* removes `server-api-dev` script that acts weird with base urls after upgrade of client-fetch
* build(deps): updates client-fetch and uuid dependencies
* make consume return undefined
* make consume return undefined
* a few more undefined context handlings
* unprovide context
* rename
* jsdocs
* refactor UmbContextBase to not use generic types
* reset target on disconnect
* posible undefined context
* callback with undefined when disconnected
* update comment
* correct types
* correct error handling
* do not throw an error when missing
* always return permitted to onChange callback
* fix not existing store
* fix resetting structure manager
* fix requestAuditLogs
* support gone context
* support context not begin present
* use UMB_ENTITY_WORKSPACE_CONTEXT for right typing
* correct type to use UMB_SUBMITTABLE_WORKSPACE_CONTEXT
* correct context consumption
* fix tests
* fix tests
* catch modal registration that has been destroyed
* catch
* handle context unprovide
* more clean up
* fix context consumption
* Update repository-details.manager.ts
* enable store to be undefined
* enable UmbRelationTypeDetailRepository store to be undefined
* remove log
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Updated dependencies to latest versions.
* Fixed breaking changes following dependency updates.
* Limited NUnit updates to within the current major.
* Fixed failing delivery API contract integration test.
* wip sortChildrenOfContent kind
* export types
* add modal token + consts
* Update manifests.ts
* add content tree item model
* wip use umb-table element
* set as prop
* render sort icon
* prevent selection when sortable
* remove unused
* clean up
* reflect sortable prop
* start implementing sortChildrenOfContent
* render name and create date
* handle date ordering
* remove unused
* clean up
* fix grab and grabbing styling for sortable table rows
* render label when no children
* Update sort-children-of-content-modal.element.ts
* fix styling of load more
* only allow sorting when all items are loaded
* Update index.js
* Added integration tests for publishing service with invalid content.
* Amend test to new create/update models
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* content type nesting
* TODOs
* repository detail manager
* todo
* implement unlimited compositions
* a little refactor
* warn
* clear state
* refactor to use unique
* note
* code corrections to match with types
* unique type for Array State
* implement usedForInheritance and editedTypes for Structure Manager and Compositions
* rename method
* Update repository-details.manager.ts
* avoid type casting
* align naming
* do not await
* fix race condition when switching document types fast
* remove test prop
* Update manifests.ts
* UmbMediaTypeWorkspaceContext Routes for inheritance
* import
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* Add GetChecksumStreamAsync and GetLengthAsync
* Obsolete CanSetPhysical, Set and GetVirtualPath
* Updated obsolete messages to reference Umbraco 18
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Removed population of Urls on document response model and obsoleted property.
* Updated readme for acceptance tests to show how to run a single test.
* Removed URLs from document models on the client-side and fixed issue with link picker stil using legacy URLs response data.
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
* declare type and constant
* implement for example
* commit example
* fix document data
* make rte blocks optional
* remove blocks from this mock data
* fix mock data for RTE
* comment and destroy method implementation
* set to 8
* update comments
* remove console.log
* host may be undefined
* prevent duplicate messages
* Added configuration for the log file name and format.
* Added unit test for LoggingConfiguration.
* Rely on configuration validation to verify supported log file format arguments.
* Fixed unit test failing on build pipeline.
* Rowrked #18771 with a more brute force solution
* Fixes class name. Adds unit test verifying behaviour.
* Corrected test name.
---------
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Implement tags for content cache
* Implement tags for media cache
* Refactor to only use cache and media tags
* Remove from DI
* Cleanup
* Update Nuget packages
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Change description to be more precise
* Minor code tidy: indents, static methods where possible, made tags methods a little terser.
* Fixed according to review
---------
Co-authored-by: Elitsa <elm@umbraco.dk>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix
* Editors with access should be able to clear a blocklist value
* Writeup around block element level variation
* Dissallow values to be removed a limited language user does not have permissions to
* Remove commented out code
* improved comments
* Improve expose list for limited language access sub variant block lists
* Fix
* Editors with access should be able to clear a blocklist value
* Writeup around block element level variation
* Dissallow values to be removed a limited language user does not have permissions to
* Remove commented out code
* improved comments
* Improve expose list for limited language access sub variant block lists
* Adds `searchResultItem` for Media
Includes "trashed" state tag
* Removes trailing whitespace from manifest name
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Loosens the guard for an empty `query`
* Adds search to Document Type picker
* Document Type Search Provider: adds support for querying element types
* Adds `pickerSearchResultItem` element for Document Types
* Help menu: fixes Our Umbraco link
* Changes forum link from Our Umbraco
to the new Community Forum website.
* Small fixes in the Log Viewer Message
* Help Menu: flattens structure
for tighter UI.
* Replaced hot-linked favicon images
with built-in icons.
Except for Microsoft Bing.
* Corrected "Search Umbraco Forum using Google" link
* Scaffold content for content templates serverside
* Generated client types and methods from API.
* Retrieve scaffolded blueprint when creating documents from a blueprint.
* Use introduced helper method on existing read.
* Cleaned up imports.
* feat: moves scaffold service logic to data source and make shallow repository method
* feat: follows UmbDataSourceResponse interface and reorders public/private methods
* Bumped version to 15.4.0-r2.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Make the entity search service async
* Update src/Umbraco.Core/Services/IIndexedEntitySearchService.cs
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* remove user and document/media circular imports
* fix code order
* change MAX_CIRCULAR_DEPENDENCIES
* remove all comments from content before checking for imports
* fix self import
* fix self imports
* Use maximum available value for JSON serialization depth.
* Updated unittests with best practices
---------
Co-authored-by: Migaroez <geusens@gmail.com>
* Revert "Ensure dates read from the database are treated as local when constructing entities (#18989)"
This reverts commit 7b10d39d66.
* Avoid system dates stored with local server time being defaulted to UTC on database read.
* ContentScheduleDto.Date is UTC
---------
Co-authored-by: kjac <kja@umbraco.dk>
* feat: adds new backend-api and http-client packages and generates the api with @hey-api/client-fetch
* feat: maps generic T back to promise to avoid usage of 'any'
* feat: sets up baseUrl and auth for the new client
* feat: gets the api base url from server context instead of the http client
* feat: gets the api base url from server context instead of the http client
* feat: allows undefined token for xhr requests
* feat: changes the response object to be either type T directly (to support @hey-api/client-fetch) or the given type if the response does not contain a 'data' object
* revert interface
* feat: creates an api return type to comply with @hey-api/client-fetch
* feat: maps T back to the data model for non-api types
* feat: simplify api response to return the promise you sent to it with an optional error object
* feat: moves http related modules to the core package
* feat: updates the required type of the client for the api interceptors
* docs: removes invalid property
* feat: adds request parameters to documents
* feat: adds request parameters to imaging
* feat: adds return type to item-server-data-source-base
* feat: adds request parameters to webhooks
* feat: adds request parameters to users
* feat: renames all `requestBody` to `body` to conform with new client-fetch
* feat: uses query to take parameters in
* feat: adds data source response to tree types
* feat: adds request parameters to templating
* feat: adds request parameters to templating
* feat: adds request parameters to telemetry
* feat: adds request parameters to tags
* feat: adds request parameters to examine management
* feat: adds request parameters to relations
* feat: adds request parameters to packages
* feat: catches new api errors that are direct problem details objects
* feat: adds default interceptor to handle Umb-Generated-Resource headers
* feat: uses an error interceptor specifically to catch errors to avoid overhead
* feat: adds request parameters to members
* Revert "feat: uses an error interceptor specifically to catch errors to avoid overhead"
This reverts commit 7ffb7b29bf.
* feat: adds request parameters to media
* feat: adds request parameters to log viewer
* feat: adds request parameters to languages
* feat: adds request parameters to health check
* feat: adds request parameters to oembed
* feat: adds request parameters to documents
* feat: adds request parameters to redirect management
* feat: adds request parameters to blueprints
* feat: adds request parameters to dictionary
* feat: adds request parameters to data types
* feat: adds request parameters to temporary file
* feat: instructs delete methods to return an unknown value
* feat: allows default value to be unknown
* feat: adds request parameters to culture
* chore: import path
* feat: adds correct models to mocks
* feat: adds correct models to installer and upgrader
* feat: adds correct models to mocks
* chore: forgot to move ignore line
* chore: ignores generated files in eslint
* chore: removes old generated files
* feat: moves network connection status manager back into the main app to avoid imports from core
* chore: update imports
* feat: generate API for login screen without relying on the backoffice
* feat: uses the generated models on the login screen
* feat: sets 'credentials' to 'include' and adds it back to openapiconfiguration to avoid a breaking change
* adds back in commands moved to a workspace
* chore: vscode workspace settings formatted and useFlatConfig added for better compatibility
* add property visibility state manager
* implement in structure manager
* filter properties based on visibility
* wip document type structure permissions
* rename
* register entity permission for document type property
* add entity permission for media type property
* pass fallback permissions to document granular permissions
* set as preset
* clean up
* wip document type property picker
* add preset value
* Update input-document-type-structure-granular-user-permission.element.ts
* move files
* rename
* Update input-document-value-granular-user-permission.element.ts
* remove temp test
* Update manifests.ts
* remove unused
* Update input-document-value-granular-user-permission.element.ts
* rename see permission + add write permission
* fix missing type
* require property type unique
* add unique to property type
* rename to property type
* map to unique
* deprecate id on property type
* return unique from property picker
* more explicit naming
* use type
* render detail
* Update input-document-value-granular-user-permission.element.ts
* wip modal flow
* clean up
* add headlines
* hide actions
* pass preset value
* add edit permission method
* include property in permission name
* add read and write managers
* implement read and write state managers
* Update content-type-structure-manager.class.ts
* enforce property permissions
* Storage for granular permissions at property type level
* add guards
* make variant property version
* Rename server models to include "property"
* generate server types
* add permissionType to model
* add mappers to user group permission data
* add mapper to current user permission data
* destroy
* clear state
* use permission type for guard check
* add permission type
* require specific permission type
* use correct schema type
* add mappings
* clean up
* log errors
* fix mapping
* null check for icon
* use fallback if there is no forDataModel
* add translations
* sort group alphabetically
* add empty state for no verbs
* organize folders
* always require unique and variant id
* Allow storing empty lists of verbs
* pass variant id to all states
* Remove empty verbs
* add alias to name
* prevent picking the same property type multiple times
* fix lint errors
* fix create state by observing variant options
* move to workspace context
* Update document-property-value-user-permission.workspace-context.ts
* Update content-editor-properties.element.ts
* clean up
* Rename models (last time, promise!)
* Add migration for default document property value permissions
* generate new server models
* update after model changes
* Correct the default permission identifiers
* Add default permissions to newly created DBs
* Add validation and clean-up
* rename to visibility state
* rename to view
* add helpers
* apply to blocks
* Update document-property-value-user-permission.workspace-context.ts
* disable view and write state by default
* add tests for start and stopping a state
* throw errors if adding to a state that is not running
* export consts
* export consts
* fix circular
* fix circular
* set the entity type when setting values
* only apply for block in document values
* split logic
* start states for document blocks
* only apply states when state is running
* Fixed typos in test method names.
* add readonly type
* Enforce: AllowEditInvariantFromNonDefault configuration (#18758)
* add read only state
* handle read only property state in properties element
* prevent editing shared props on non default
* enforce configuration
* clean up
* set variant id
* move to property module
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* remove unnecessary messages
* make sure to destroy consumer
* Thoughts as TODO
* use Entry type
* use Entry type
* get rid of things not yet released
* clean up
* use generic methods
* TODO comment
* use generic observable
* catch if not found
* move variant id out of property type
* mega refactor temp commit
* Guard Manager
* set readOnly as a property on property editors
* further rename
* remove property state managers
* revert state manager
* fix sorting rule
* mega rename and correction
* refactor properties elements
* todo note
* clean up
* impl
* mega refactor moving permission guards to workspace
* rename
* type change
* rearrange
* correct import
* fix tests
* correct tests
* reset viewGuards block
* type correction
* refactor read only for user permissions setting
* todo note
* align property element
* await promise
* impl view guard property filtering
* correct const name
* fix fallback user permissions in mock data
* correct property type id mock data
* toggle permissions example
* complex permission
* Move migration to 16.0.
* rename fallBackToDisallowed to fallbackToNotPermitted
* clean up setReadOnlyStateForUserPermission
* capital o
* align read only naming
* rename method
* add js docs
* remove unused
* correct method name
* add js docs
* add js docs
* camel case function
* fix eslint problems
* camelcase const
* align method names
* remove unused
* fix host
* fix spelling mistake
* align naming
* fix spelling mistake
* add alias
* use read only state methods
* camel case function
* correct method name
* add js docs
* camelcase function
* camel case function
* align method names
* change method name wording
* Include document property value permissions in the current user's aggregated permissions.
* use is read only
* delete unused
* fix implementation of AllowEditInvariantFromNonDefault
* don't know what is happening here. Local is it lower on github it is higher
* Update document-workspace.context.ts
* revert to v16 dev
* simplify if statement
* make it explicit that these are ui only permissions
* add action label for read
* remove duplicates
* use read instead of browse
* align description
* use document instead of node
* make the base class abstract
* extend in test
* Update guard.manager.base.test.ts
* fix example
* style adjustment
* group styling
* refactor guard rule resolving
* remove imports
* remove console.log
* improve disconnected context consumer rejection message
* fix publishableVariantsFilter
* Update document-workspace.context.ts
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: kjac <kja@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added tests for mandatory checkboxlist in a content
* Added tests for mandatory dropdown in a content
* Added tests for mandatory media picker in a content
* Added tests for mandatory radiobox in a content
* Added tests for block grid with mandatory property editors
* Added tests for block list with mandatory property editors
* Bumped version
* Cleaned up
* Changed npm command
* Fixed comments
* Fixed comments
* Reverted
* Display content type names on dynamic node query steps.
* Refactored to use `UmbRepositoryItemsManager` observable
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* display validation on save + use uui-color-invalid
* update css vars
* use standalone color for property layout
* remove color from label
* fix badge
* fix create button color
* clean up
* correct badge colors
* Create new migration
* Migrate UI to tiptap
* remember to overwrite toolbar
* Add setting to disable migration
* Add default extensions when migrating
* Remove places where editorUI alias is used
* Remove more tinyMCE stuff
* Make sure that blocks also works
* Reverted files from bad merge
* bring back value converters
* Class name casing
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* check the full path for permissions
* fix race condition
* wip update permission when variants change
* Populate ancestor keys on document tree response items.
* Populate ancestor keys on document collection response items.
* Update OpenApi.json
* generate server models
* update types
* map data
* add ancestor context
* set ancestors in context
* use ancestor context in tree
* clean up
* provide ancestor context from a collection item
* provide ancestor context from structure context
* Use array of objects rather than Ids for the ancestor collection.
* Update OpenApi.json.
* add ancestor data to mocks
* set ancestors ids in mocks
* omit ancestors for recycle bin item
* use correct models for document blueprint mock data
* remove constructor
* mock documents for testing
* add user group permission test data
* wip document user permission condition tests
* generate new server models
* update data efter server models update
* clean up
* Update entity-actions-table-column-view.element.ts
* longer time for not found to appear
* use arg
* observe alias
* set new the right place
* remove const
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* Create integration test verifying existing behaviour.
* Aggregate permissions per document for the current user response.
* Refactoring following Codescene warnings.
* Update enable cleanup button text on toggle.
* Handle console error visible on cancel of rollback dialog.
* Return value from `umb-rollback-modal`
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* Only prevent the unpublish or delete of a related item when configured to do so if it is related as a child, not as a parent (#18886)
* Only prevent the unpubkish or delete of a related item when configured to do so if it is related as a child, not as a parent.
* Fixed incorect parameter names.
* Fixed failing integration tests.
* Use using variable instead to reduce nesting
* Applied suggestions from code review.
* Used simple using statement throughout RelationService for consistency.
* Applied XML header comments consistently.
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Feature: highlight invariant doc with variant blocks is unsupported (#18806)
* mark variant blocks in invariant docs as invalid
* implement RTE Blocks
* Fix pagination for users restricted by start nodes (#18907)
* Fix pagination for users restricted by start nodes
* Default implementation to avoid breakage
* Review comments
* Fix failing test
* Add media start node tests
* Fix issue preventing blueprint derived values from being scaffolded (#18917)
* Fix issue preventing blueprint derived values from being scaffolded.
* fix manipulating frooen array
* compare with variantId as well
---------
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
* ci: add Azure Static Web Apps workflow file
on-behalf-of: @Azure opensource@microsoft.com
* Remove admin permission on user configuration, allowing users with user section access only to manaage users and groups. (#18848)
* Tiptap RTE: Style Menu extension kind (#18918)
* Adds 'styleMenu' Tiptap toolbar extension kind
* Adds icons for `<h4>` and `<p>` tags
* Adds commands to HTML Global Attributes extension
for setting the `class` and `id` attributes.
* Renamed "default-tiptap-toolbar-element.api.ts" file
The "element" part was confusing.
* Toolbar Menu: uses correct `item` value
* Cascading Menu: adds localization for the label
* Adds `label` attribute to UUI components
for accessibility.
* Toolbar Menu: uses correct `appearance` value
* Removed unrequired `api` from Style Select
* Destructs the `item.data` object
* Ensure has children reflects only items with folder children when folders only are queried. (#18790)
* Ensure has children reflects only items with folder children when folders only are queried.
* Added supression for change to integration test public code.
---------
Co-authored-by: Migaroez <geusens@gmail.com>
* Only apply validation on content update to variant cultures where the editor has permission for the culture (#18778)
* Only apply validation on content update to variant cultures where the editor has permission for the culture.
* Remove inadvertent comment updates.
* Fixed failing integration test.
* Adds ancestor ID details on document tree and collection responses (#18909)
* Populate ancestor keys on document tree response items.
* Populate ancestor keys on document collection response items.
* Update OpenApi.json
* Use array of objects rather than Ids for the ancestor collection.
* Update OpenApi.json.
* Move publish with descendants to a background task with polling (#18497)
* Use background queue for database cache rebuild and track rebuilding status.
* Updated OpenApi.json and client-side types.
* Updated client to poll for completion of database rebuild.
* Move IBackgroundTaskQueue to core and prepare publish branch to run as background task.
* Endpoints for retrieval of status and result from branch publish operations.
* Poll and retrieve result for publish with descendants.
* Handled issues from testing.
* Rework to single controller for status and result.
* Updated client side sdk.
* OpenApi post dev merge gen
---------
Co-authored-by: Migaroez <geusens@gmail.com>
* Clear roots before rebuilding navigation dictionary (#18766)
* Clear roots before rebuilding navigation dictionary.
* Added tests to verify fix.
* Correct test implementation.
* Convert integration tests with method overloads into test cases.
* Integration test compatibility supressions.
* Fixes save of empty, invariant block list on variant content. (#18932)
* remove unnecessary code (#18927)
* V15/bugfix/fix route issue from 18859 (#18931)
* unique check
* unique for workspace empty path
* more unique routes
* Bump vite from 6.2.3 to 6.2.4 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.4/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.4/packages/vite)
---
updated-dependencies:
- dependency-name: vite
dependency-version: 6.2.4
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
* removes autogenerated workflows
* make getHasUnpersistedChanges public (#18929)
* Added management API endpoint, service and repository for retrieval of references from the recycle bin (#18882)
* Added management API endpoint, service and repository for retrieval of references from the recycle bin.
* Update src/Umbraco.Cms.Api.Management/Controllers/Document/RecycleBin/ReferencedByDocumentRecycleBinController.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Removed unused code.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Updated management API endpoint and model for data type references to align with that used for documents, media etc. (#18905)
* Updated management API endpoint and model for data type references to align with that used for documents, media etc.
* Refactoring.
* Update src/Umbraco.Core/Constants-ReferenceTypes.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed typos.
* Added id to tracked reference content type response.
* Updated OpenApi.json.
* Added missing updates.
* Renamed model and constants from code review feedback.
* Fix typo
* Fix multiple enumeration
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Skip lock tests
* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined (#18763)
* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined.
* Added tests to verify functionality.
* Added reference to previous PR.
* Referenced second PR.
* Assemble URLs for all cultures, not just the default.
* Revert previous update.
* Display an original URL if we have one.
* Bump vite from 6.2.4 to 6.2.5 in /src/Umbraco.Web.UI.Client
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v6.2.5/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v6.2.5/packages/vite)
---
updated-dependencies:
- dependency-name: vite
dependency-version: 6.2.5
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
* Add raw value validation to multiple text strings property editor (#18936)
* Add raw value validation to multiple text strings property editor
* Added additional assert on unit test and comment on validation logic.
* Don't remove items to obtain a valid value
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Integration tests for content publishing with ancestor unpublished (#18941)
* Resolved warnings in test class.
* Refactor regions into partial classes.
* Aligned test names.
* Variable name refactoring.
* Added tests for unpublished paths.
* Adjust tests to verify current behaviour.
* Cleaned up project file.
* fix circular icon import (#18952)
* remove segment toggle for elements (#18949)
* Fix modal route registration circular import (#18953)
* fix modal route registration circular import
* Update modal-route-registration.controller.ts
* V15/fix/18595 (#18925)
* fix for #18595
* updates the en.ts
* Avoid unneeded Dictionary operations (#18890)
* Avoid some heap allocations
* Remove unneeded double seek
* Avoid allocating new empty arrays, reuse existing empty array
* Avoid allocating strings for parsing comma separated int values (#18199)
* Data type References UI: Workspace + Delete (#18914)
* Updated management API endpoint and model for data type references to align with that used for documents, media etc.
* Refactoring.
* Update src/Umbraco.Core/Constants-ReferenceTypes.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed typos.
* generate server models
* add extension slot
* register data type reference info app
* add reference data mappers
* Added id to tracked reference content type response.
* Updated OpenApi.json.
* Added missing updates.
* generate new models
* update models
* register ref item
* remove debugger
* render types
* register member type property type ref
* register media type property type ref
* Renamed model and constants from code review feedback.
* register reference workspace info app kind
* use kind for document references
* use kind for media references
* use kind for member references
* use deleteWithRelation kind when deleting data types
* fix manifest types
* fix types
* Update types.gen.ts
* update code to fit new server models
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Feature: discard changes for block workspace (#18930)
* make getHasUnpersistedChanges public
* Discard changes impl for Block Workspace
* fix 18367 (#18956)
* Merge commit from fork
* Prevent path traveral vulnerability with upload of temporary files.
* Used BadRequest instead of NotFound for invalid file name response.
* V15 QA Fixing the failing media acceptance tests (#18881)
* Fixed the function name due to test helper changes
* Updated assertion steps due to UI changes
* Added more waits
* Bumped version
* Increase timeout
* Reverted
---------
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
* V15 QA added clipboard test for not being able to copy to root when block is not allowed at root (#18937)
* Added clipboard test
* Bumped version
* Updated to use the name
* Run all tests on the pipeline
* Reverted command
* build: adjusts circular ref number to 4
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Lee Kelleher <leekelleher@users.noreply.github.com>
Co-authored-by: Migaroez <geusens@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Welander Jensen <64834767+Welander1994@users.noreply.github.com>
Co-authored-by: Henrik <hg@impact.dk>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nhu Dinh <150406148+nhudinh0309@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
* Allow save of empty translations for dictionary items.
* Updated Open API schema to match request model update
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Amend root content routing and ensure trailing slashes as configured
* Fix false positives at root + add more tests
* Awaited async method and resolved warning around readonly.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Moves `escapeHTML` call from localization controller to `umb-localize` element
* Adds supporting unit-test
* Removed unit-test
as it is now expected that the localization
controller will return literal HTML markup.
* Updated import path
* Removed extra call to `text()`
* fix: straightens out unnecessary imports of components and re-exports them appropriately
* fix: imports repository from file directly
* feat: introduces a "server" package and moves UmbAppContext logic to UmbServerContext
* feat: updates all cases of `UmbAppContext` -> `UmbServerContext`
* build: adjusts MAX_CIRCULAR_DEPENDENCIES from 6 to 3
* Update src/Umbraco.Web.UI.Client/devops/circular/index.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: removes unused interface
* build: adds server bundle to vite
* build: vite should build index barrel
* build: readjust to 5 to account for previous failed build
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: resolves an unintended circular reference based on files being moved around
introduced in #18939
* fix: improves error handling to return early if interceptor does not catch a 500
* fix: adds try/catch around json parsing
* Fixed the function name due to test helper changes
* Updated assertion steps due to UI changes
* Added more waits
* Bumped version
* Increase timeout
* Reverted
---------
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
* build(deps-dev): bump @hey-api/openapi-ts from 0.61.3 to 0.66.1
* docs: adds information on how to configure new fetch-client
* feat: adds preliminary umb-prefixed error types
* fix: uses correct import path
* docs: jsdocs
* feat: optimises error reporting
* feat: maps functions into separate controllers
* feat: adds color to peek notification
* feat: moves the internal api interceptors controller and adds more interceptors
* feat: adds host to params
* feat: marks certain functions as deprecated
* feat: maps api errors to UmbErrors
* chore: removes deprecation console logs
* chore: allows any
* feat: maps xhr errors to umb errors
* feat: adds host to tryExecute
* feat: adjusts deprecation notifices and checks
* chore: adjusts deprecation notices
* chore: add .warn() to deprecation
* feat: updates login app repository
* feat: changes all `tryExecuteAndNotify` calls to `tryExecute`
* feat: copies helper functions to resources package and deprecates in notification package
* chore: removes unused imports
* feat: adds exports
* chore: removes controller that is no longer useful
* feat: marks _peekError as protected
* feat: adds support for error notifications (and to ignore them) and to cancel an ongoing request
* feat: eliminates duplicated logic in xhr controller
* feat: touches only the cloned response to allow interceptors downstream to unwrap the body
* feat: stores the host for async context
* feat: disables automatic notifications for validation data source
* feat: disables notifications where they are otherwise handled or ignored
* feat: removes deprecated code
* feat: eliminates a controller that only had a static method
* docs: adds jsdocs
* docs: adds jsdocs
* docs: adds jsdocs
* feat: returns umb-notifications response without modifying it
* feat: eliminates dependency on generated `ProblemDetails` type
* feat: eliminates dependence on generated `ApiError` type
* feat: eliminates dependence on generated `CancelError` type
* fix: removes dependency on CancelablePromise
* Updated management API endpoint and model for data type references to align with that used for documents, media etc.
* Refactoring.
* Update src/Umbraco.Core/Constants-ReferenceTypes.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed typos.
* generate server models
* add extension slot
* register data type reference info app
* add reference data mappers
* Added id to tracked reference content type response.
* Updated OpenApi.json.
* Added missing updates.
* generate new models
* update models
* register ref item
* remove debugger
* render types
* register member type property type ref
* register media type property type ref
* Renamed model and constants from code review feedback.
* register reference workspace info app kind
* use kind for document references
* use kind for media references
* use kind for member references
* use deleteWithRelation kind when deleting data types
* fix manifest types
* fix types
* Update types.gen.ts
* update code to fit new server models
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Resolved warnings in test class.
* Refactor regions into partial classes.
* Aligned test names.
* Variable name refactoring.
* Added tests for unpublished paths.
* Adjust tests to verify current behaviour.
* Cleaned up project file.
* Add raw value validation to multiple text strings property editor
* Added additional assert on unit test and comment on validation logic.
* Don't remove items to obtain a valid value
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Look-up redirect in content finder for multi-lingual sites using path and legacy route prefixed with the integer ID of the node with domains defined.
* Added tests to verify functionality.
* Added reference to previous PR.
* Referenced second PR.
* Assemble URLs for all cultures, not just the default.
* Revert previous update.
* Display an original URL if we have one.
* Updated management API endpoint and model for data type references to align with that used for documents, media etc.
* Refactoring.
* Update src/Umbraco.Core/Constants-ReferenceTypes.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Fixed typos.
* Added id to tracked reference content type response.
* Updated OpenApi.json.
* Added missing updates.
* Renamed model and constants from code review feedback.
* Fix typo
* Fix multiple enumeration
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Added management API endpoint, service and repository for retrieval of references from the recycle bin.
* Update src/Umbraco.Cms.Api.Management/Controllers/Document/RecycleBin/ReferencedByDocumentRecycleBinController.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Removed unused code.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Clear roots before rebuilding navigation dictionary.
* Added tests to verify fix.
* Correct test implementation.
* Convert integration tests with method overloads into test cases.
* Integration test compatibility supressions.
* Use background queue for database cache rebuild and track rebuilding status.
* Updated OpenApi.json and client-side types.
* Updated client to poll for completion of database rebuild.
* Move IBackgroundTaskQueue to core and prepare publish branch to run as background task.
* Endpoints for retrieval of status and result from branch publish operations.
* Poll and retrieve result for publish with descendants.
* Handled issues from testing.
* Rework to single controller for status and result.
* Updated client side sdk.
* OpenApi post dev merge gen
---------
Co-authored-by: Migaroez <geusens@gmail.com>
* Populate ancestor keys on document tree response items.
* Populate ancestor keys on document collection response items.
* Update OpenApi.json
* Use array of objects rather than Ids for the ancestor collection.
* Update OpenApi.json.
* Only apply validation on content update to variant cultures where the editor has permission for the culture.
* Remove inadvertent comment updates.
* Fixed failing integration test.
* Ensure has children reflects only items with folder children when folders only are queried.
* Added supression for change to integration test public code.
---------
Co-authored-by: Migaroez <geusens@gmail.com>
* Create new migration
* Migrate UI to tiptap
* remember to overwrite toolbar
* Add setting to disable migration
* Add default extensions when migrating
* Make sure that blocks also works
* Renamed classes to reference TinyMCE migration
* Defaults TinyMCE toolbar mapping to `null`
if we can't map to a known Tiptap toolbar extension (manifest alias),
then it may cause an issue with the toolbar rendering.
---------
Co-authored-by: leekelleher <leekelleher@gmail.com>
* feat: resolve TODO by removing quiet option
* feat: exclude ./src/mocks from production build
* feat: load only msw when running through vite
* feat: optimise load order
* feat: handles mocked logos with virtual path
* feat: loads mocked service worker from virtual path
* feat: loads assets from virtual path
* feat: forces MSW=on for the static build
* build: adds storybook workflow copied over from the old backoffice repository
* build: limits where the build runs
* build: adds workflow to build a static version of the backoffice upon request
* build: excludes the `/umbraco/backoffice/assets` folder from navigation fallback just in case
* build: triggers run when the workflow file itself changes
* build: triggers run when package.json changes
* build: marks the 'contrib' branch as production
* build: activates static builds on preview/* labels
* build: bumps github checkout version
* build: updates key for backoffice web app
* build: updates key for storybook
* build: disables build for release branches to preseve on preview environments
* Adds 'styleMenu' Tiptap toolbar extension kind
* Adds icons for `<h4>` and `<p>` tags
* Adds commands to HTML Global Attributes extension
for setting the `class` and `id` attributes.
* Renamed "default-tiptap-toolbar-element.api.ts" file
The "element" part was confusing.
* Toolbar Menu: uses correct `item` value
* Cascading Menu: adds localization for the label
* Adds `label` attribute to UUI components
for accessibility.
* Toolbar Menu: uses correct `appearance` value
* Removed unrequired `api` from Style Select
* Destructs the `item.data` object
* Only prevent the unpubkish or delete of a related item when configured to do so if it is related as a child, not as a parent.
* Fixed incorect parameter names.
* Fixed failing integration tests.
* Use using variable instead to reduce nesting
* Applied suggestions from code review.
* Used simple using statement throughout RelationService for consistency.
* Applied XML header comments consistently.
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* fix: avoids circular dependencies by realising the 'block' package was importing from itself
* chore: lowers requirement to 9 after fixes
* chore: removes unused file
* feat: uses `<uui-card-media />` to preview svg's
* fix: svg preview should support potentially very large images
* fix: adds alt attribute
* fix: adds `<uui-card-media />` for image previews as well
* fix: ensures all previews have at least a "title" attribute
* Update temeltry dashboard UI
* Uses headline prop/attr to set the header
* Uses a normal h3 rather than a h2 with H3 uui css class
* Updates the UUI slider to not show the value of 0,1,2 as not that useful to see when changing the slider
* Updates translation as it had a weirdly places br mid sentance
* Ensures date comparisons in schedule integration tests are made only on the date part.
* Include time part to the second.
* Ensure Kind is retained when truncating a date.
* Retain Kind for all truncation levels.
* Ensures date comparisons in schedule integration tests are made only on the date part.
* Include time part to the second.
* Ensure Kind is retained when truncating a date.
* Retain Kind for all truncation levels.
* add more icons
* add group id for inspection
* make outline style to make it not look disabled
* ensure that inherited has entries
* ensure current route is updated accordingly
* data marks
* shared across cultures tag
* fix sidebar group headline size
* Revert rather than prevent updates to sensitive properties on members without sensitive data access.
* Added suppression for integration test updates.
* Fix issue text overflow when user name is too long
* add ellipsis at the end of the text
* Bumped version of test helper
* Fixed document type design tab tests due to test helper changes
* Amends based on Niels' feedback
+ other code formatting tweaks.
* chore: remove unknown attribute on uui-tag
* fix: adds fallback text and uses `<umb-localize />` where applicable
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Nhu Dinh <hnd@umbraco.dk>
Co-authored-by: leekelleher <leekelleher@gmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Revert "simplifying the use of props (#18430)"
This reverts commit 347e898190.
* do not set value if identical check
cherry-picked from c03a8afab5
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
---------
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
* Added tests for block list with inline editing mode
* Added tests to create a document type witha block with inline editing mode
* Added tests for block grid inline editing mode
* Bumped version
* Changed npm commands
* Reverted npm command
* do not destroy instance
* UmbDashboardHealthCheckElement
* correct last contexts to use context-base
* informing user that Umb.Condition.MenuAlias does not work
* parse host to Section Context
* Added member reference type model.
* Updated client-side types and sdk.
* Render member relations on the member info view.
* Add relation type for related member with migration.
* Extend tests for track relations to include member relations.
* Extend tests for relation repository.
* Extend tests for relation service.
* Addressed comments from Copilot review.
* Add relation notification to member deletion.
* Removed unused import.
* Updates from code review.
* make ref element globally available
* align naming
* use new reference list
* add interfaces for config
* export const
* Fixed failing integration tests.
* apply interface
* deprecate interface with wrong name
* fix import
* disable unpublish button when item or descendants are referenced
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added member reference type model.
* Updated client-side types and sdk.
* Render member relations on the member info view.
* Add relation type for related member with migration.
* Extend tests for track relations to include member relations.
* Extend tests for relation repository.
* Extend tests for relation service.
* Addressed comments from Copilot review.
* Add relation notification to member deletion.
* Removed unused import.
* Updates from code review.
* export const
* Fixed failing integration tests.
* deprecate interface with wrong name
* fix import
---------
Co-authored-by: Mads Rasmussen <madsr@hey.com>
* feat: maps up the CANCELLED status
* feat: uses the new dropzone input to render the dropzone
* feat: adds support for differing server urls
* chore: avoids a breaking change by storing the temporary file
* feat: uses the umb-dropzone-input to render the dropzone
* feat: loads in the blob url rather than reading the file into memory AND appends the server url
* chore: lit 3 compat
* feat: uses the umb-dropzone-input to render the dropzone
* Revert "feat: uses the umb-dropzone-input to render the dropzone"
This reverts commit bc1a6ae7df.
* feat: creates an object url directly from the File rather than the Blob
* feat: revokes the file data url from object storage
* feat: revokes object url on disconnect
* Added tests for Approved Color default configuration
* Updated tests for Approved Color configuration
* Added tests for ChecklboxList configuration
* Added tests for Data type default configuration - part 1
* Added tests for data type configuration and updated tests due to test helper changes
* Added more steps to verify the default configuration
* Added tests for the default configuration and refactoring code
* Added steps to verify the TinyMCE default configuration
* Bumped version
* Fixed tests due to test helper changes
* Make all Data Type tests run in the pipeline
* Updated assertion steps
* Fixed format
* Bumped version
* Bumped version
* Comment failing tests
* Reverted npm command
* Fix bug uploading an image via the Media Picker is no longer automatically selected
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* remove submit modal
* fix: avoids overriding the dropzone manager as that does not work with inheritance
* fix: set disabling of folders correctly
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Updated userGroup tests due to test helper changes
* Added tests for user group default configuration
* Bumped version
* Fixed due to test helper changes
* Reverted npm command
* Added tests for Approved Color default configuration
* Updated tests for Approved Color configuration
* Added tests for ChecklboxList configuration
* Added tests for Data type default configuration - part 1
* Added tests for data type configuration and updated tests due to test helper changes
* Added more steps to verify the default configuration
* Added tests for the default configuration and refactoring code
* Added steps to verify the TinyMCE default configuration
* Bumped version
* Fixed tests due to test helper changes
* Make all Data Type tests run in the pipeline
* Updated assertion steps
* Fixed format
* Bumped version
* Bumped version
* Comment failing tests
* Reverted npm command
* Avoid a hash key generation and lookup when inserting in the LockingMechanism
* Added comments for CollectionsMarshal.GetValueRefOrAddDefault
* Added further comments and tests.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fix bug uploading an image via the Media Picker is no longer automatically selected
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
* Update src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* remove submit modal
* fix: avoids overriding the dropzone manager as that does not work with inheritance
* fix: set disabling of folders correctly
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Avoid an unneeded lookups in the Keys dictionary when initiating key cache
* Add further comments and unit tests around updated code.
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Updated userGroup tests due to test helper changes
* Added tests for user group default configuration
* Bumped version
* Fixed due to test helper changes
* Reverted npm command
description:Bump the Umbraco CMS version across all required files. Use when the user asks to bump, update, or set the version number — e.g., "bump version to 17.3.4", "set version to 18.0.0-rc", "update version". Accepts the target version as an argument.
argument-hint:<version> (e.g., 17.3.4, 18.0.0-rc)
---
# Bump Version - Umbraco CMS
Updates the Umbraco CMS version string across all files that track it.
**Do NOT use AskUserQuestion if a version argument is provided. Only ask if `$ARGUMENTS` is empty or cannot be parsed as a version.**
## Arguments
-`$ARGUMENTS` - Required: the target version string (e.g., `17.3.4`, `18.0.0-rc`)
## Files to Update
The following 5 files must be updated with the new version:
| 5 | `tests/Umbraco.Tests.AcceptanceTest/package-lock.json` | top-level `"version"` AND `packages[""].version` |
**Note**: For major version bumps (e.g., 17.x to 18.x), `src/Umbraco.Web.UI.Login/package.json` has a caret-ranged dependency on `@umbraco-cms/backoffice` (e.g., `^17.2.0`) that will need manual updating. This skill does not handle that — major bumps involve many other changes beyond version strings.
## Instructions
### 1. Parse and Validate the Version
Extract the version from `$ARGUMENTS`. It must be a valid semver-like string (e.g., `17.3.4`, `18.0.0-rc`, `17.4.0-preview.1`). If no version is provided or it cannot be parsed, ask the user for the target version.
### 2. Read the Current Version
Read `version.json` and extract the current `"version"` value. If the current version already equals the target version, report that the version is already set and stop — do not edit, stage, or commit anything.
Otherwise, display both versions:
```
Bumping version: {current} -> {target}
```
### 3. Update All Files
Update each of the 5 files listed above, replacing the old version with the new version. For each file:
- **`version.json`**: Replace the `"version"` value.
- **`package.json` files**: Replace the `"version"` value (near the top of the file).
- **`package-lock.json` files**: Replace BOTH the top-level `"version"` value AND the `"version"` inside the `"packages": { "": { ... } }` block. These are always in the first ~10 lines of the file.
Use targeted edits — do NOT rewrite entire files. Be precise to avoid changing version strings in dependency entries.
### 4. Verify
After all edits, grep for the target version value across the 5 files to confirm all updates landed correctly:
description:Improve a set of auto-generated GitHub release notes for an Umbraco CMS release. Cross-checks the notes against every PR carrying the release label, adds any that are missing, re-files every PR under the most appropriate category, and strips purely-internal entries. Use whenever the user asks to tidy up, improve, complete, or recategorize release notes for a given version, or mentions a release-notes text file plus a version number.
Takes a file of auto-generated GitHub release notes and produces an improved version that:
1.**Is complete** — every merged PR carrying the `release/<version>` label appears.
2.**Is well-categorized** — every PR sits under the most appropriate heading.
3.**Is free of noise** — purely-internal entries of no value to a reader are removed.
The result is written to a **new** file alongside the input, so the user can diff the two.
**Run autonomously.** Do NOT use `AskUserQuestion` once the required arguments (version and input file path) are available — only ask if one of them is missing from `$ARGUMENTS` and cannot be inferred (see Arguments). Beyond that, make the categorization calls yourself using the rules below; if a handful are genuinely borderline, place them anyway and note the borderline ones in your closing summary so the user can override.
## Arguments
`$ARGUMENTS` contains two values:
1.**Version** — e.g. `17.5.0`, `18.1.0`. The GitHub label to search is `release/<version>` (so version `17.5.0` → label `release/17.5.0`).
2.**Input file path** — full path to the text file holding the auto-generated notes (e.g. `C:\Temp\release-17.5.0-rc.md`).
If either is missing, ask the user once for the missing value, then proceed.
## Prerequisites
Run `gh auth status`. If it fails, tell the user to authenticate `gh` (e.g. `gh auth login`) and stop — the skill needs the GitHub CLI to query PRs. The repo is always `umbraco/Umbraco-CMS`.
## Procedure
### 1. Read the input notes
Read the input file. Note its structure — it is GitHub's generated format:
- A leading HTML comment (`<!-- Release notes generated ... -->`).
- A `## What's Changed` heading followed by `### <emoji> <Category>` sub-headings, each with `* <title> by @<author> in <url>` bullets.
- A trailing `## New Contributors` section and a `**Full Changelog**: ...` line.
Extract the set of PR numbers already present (parse the `/pull/<number>` from each bullet). Preserve each existing bullet's **exact text** (title, author, URL) when you re-emit it — only its category placement may change.
This is the authoritative list of what the release *should* contain. Each row gives number, author, labels, title.
**Guard against silent truncation.**`gh pr list` caps at `--limit` without warning, so a large release could drop the overflow and the skill would still look "complete". Count the returned rows and compare against the limit:
```bash
gh pr list --repo umbraco/Umbraco-CMS --label "release/<version>" --state closed --limit 1000 --json number --jq 'length'
```
If this equals 1000, the limit was hit — raise `--limit` and re-fetch before continuing. Do **not** proceed on a truncated list.
### 3. Reconcile
- **Missing labelled PRs** (labelled but not in the input file): these must be **added**. Build a bullet as `* <title> by @<author> in https://github.com/umbraco/Umbraco-CMS/pull/<number>`.
- **Author handle.** `<author>` in the template is the raw `.author.login` value — the bullet supplies the leading `@`, so do not prepend another. `gh`'s `.author.login` already returns bot accounts with the `[bot]` suffix as part of the login — Dependabot comes back as `dependabot[bot]`, not `dependabot` or `app/dependabot` (the `app/` form only appears in git committer metadata and CODEOWNERS, never in `gh`'s JSON). So the login is already in the right shape; use it verbatim (e.g. `.author.login` of `dependabot[bot]` renders as `@dependabot[bot]`, matching what GitHub's generator wrote for the existing bullets). The only thing to guard against is accidentally stripping or altering the `[bot]` suffix.
- **PRs in the file but not labelled**: keep them. The generated notes span a commit range (see the `Full Changelog` compare link), so they legitimately include backports / earlier-version PRs that lack the current label. For any of these you need to categorize, fetch its labels with:
Do **not** invent or alter the `New Contributors` section — carry it over verbatim. You cannot reliably recompute first-time contributors, so leave it as the generator produced it (mention this in the summary).
### 4. Categorize every PR
Use exactly these headings, in this order. Omit any heading that ends up with no entries.
| Heading | What goes here | Primary signal |
|---|---|---|
| `### 🙌 Notable Changes` | **Don't recategorize existing entries.** Label-driven — but still add any missing PR carrying this label here. | label `category/notable` |
| `### 💥 Breaking Changes` | **Don't recategorize existing entries.** Label-driven — but still add any missing PR carrying this label here. | label `category/breaking` |
| `### 🚀 New Features` | New user- or developer-facing capability | label `type/feature` / `category/feature`; or title introduces/adds a genuinely new capability |
| `### 🚤 Performance` | Performance improvements | label `category/performance`; or `Performance:` title prefix |
| `### 🐛 Bug Fixes` | Fixes to broken/incorrect behaviour | default for anything describing a fix |
| `### 🧪 Testing` | Test additions/changes only | label `category/test-automation` / `area/test`; or `E2E`/`QA`/"acceptance tests"/"unit test coverage"/"add tests" titles |
| `### 🛡️ Code Quality, Documentation and Refactoring` | Refactors, deprecations, API tidy-ups, XML/MD documentation, knowledge-base (`MD`) updates | label `category/refactor`; or titles about refactoring, deprecating, renaming, documenting, constants extraction, MD/CLAUDE.md content |
| `### 🧑💻 Developer Experience` | Things that improve the experience of developers building on or contributing to Umbraco — dev tooling, build/watch ergonomics, test mocks/harnesses, backoffice dev utilities | `Developer Experience` title prefix; dev tooling; mock/harness changes |
**Rules:**
- **Notable and Breaking are off-limits for recategorization** — never move a PR that is *already in the input file* into or out of these sections; they are driven purely by their labels and the generator placed them correctly. This does **not** exempt them from completeness: a PR discovered as missing in step 3 that carries `category/notable` or `category/breaking` must still be **added** under the matching section.
- Label signals beat title wording, except a `Performance:`/`Developer Experience:` title prefix is decisive for its section.
- A PR with both `type/feature` and `category/refactor` whose title clearly describes a refactor (e.g. "swap relative imports", "re-export type") belongs under Code Quality, not New Features.
- "Add ... tests"/"unit test coverage" → Testing, even if it also touches docs. If a PR adds XML documentation *and* tests, lead with where the title's emphasis lies (documentation → Code Quality; test coverage → Testing).
- When a PR is genuinely 50/50, pick the more reader-useful heading and list it in your closing summary as borderline.
### 5. Remove purely-internal noise
Drop entries that have **no value to anyone reading release notes** — pure repository plumbing with no shipped impact. Examples:
- Branch/merge maintenance ("Fix main branch after merge issue").
- CI/pipeline fixes that don't change the product.
- Reverts of changes that never shipped in a release.
**Keep** anything that ships in the product or genuinely helps developers building on Umbraco — that includes documentation/MD updates, dev tooling, and test mocks (those go to Code Quality or Developer Experience, they are *not* noise). When unsure whether something is noise, keep it and flag it in the summary rather than silently dropping it. List every removal in your closing summary.
### 6. Write the output
Write to a new file in the **same folder** as the input, named by appending ` - with updates` before the extension:
- Input `C:\Temp\release-17.5.0-rc.md` → Output `C:\Temp\release-17.5.0-rc - with updates.md`
Preserve the leading HTML comment, the `## What's Changed` heading, the `## New Contributors` section, and the `**Full Changelog**` line exactly. Only the `### <category>` groupings and their bullets change.
### 7. Report
Give a concise summary:
- Count of PRs added (with their numbers), and which categories they landed in.
- Notable recategorizations (PRs moved out of the catch-all Bug Fixes into Features/Performance/Testing/etc.).
- Every entry removed, with the one-line reason.
- Any borderline calls the user may want to override.
- The output file path.
## Verification
Before reporting done, confirm:
- Every PR number from step 2 is present in the output (except any you deliberately removed in step 5 — and those must be in the removal list).
- No PR appears under more than one heading.
- Notable and Breaking sections are byte-for-byte unchanged from the input.
- The header comment, New Contributors, and Full Changelog lines are intact.
description:Automated PR code review for Umbraco CMS. Analyzes changed files for intent, impact on consumers, breaking changes, architecture compliance, and code quality. Non-interactive — outputs a full structured review. Use this skill whenever the user asks to review a branch, review a PR, check their changes for issues, analyze a diff, or validate breaking change patterns — even if they don't say "review" explicitly. Does NOT apply to writing new code, fixing bugs, refactoring, explaining architecture, writing tests, or reviewing documentation content.
argument-hint:<target-branch>
---
# PR Review - Umbraco CMS
Automated, non-interactive PR code review. Analyzes changed files for intent, impact on consumers, breaking changes, architecture compliance, and code quality.
**Do NOT use AskUserQuestion at any point. This skill runs fully autonomously.**
## Arguments
-`$ARGUMENTS` - Optional: target branch to diff against (auto-detected from PR, falls back to `origin/main`)
## Instructions
### 0. Verify GH CLI is Available
Run `gh auth status`. If it fails, read `references/gh-cli-setup.md` and present the setup instructions to the user. Do not proceed with the review.
### 1. Resolve Target Branch
Determine the target branch for comparison using this priority order:
1.**Explicit argument**: If `$ARGUMENTS` is provided and non-empty, use it as the target branch
2.**PR target branch**: If no argument, run `gh pr view --json baseRefName --jq '.baseRefName'` to detect the target branch of the current branch's open PR. If a PR exists, use `origin/{baseRefName}` as the target branch.
3.**Fallback**: If no argument and no PR found (command fails or returns empty), default to `origin/main`
Store the resolved target branch for use in subsequent steps. Log which resolution method was used (e.g., "Target branch: `origin/v18/dev` (from PR #1234)").
### 2. Load Review Standards
#### 2a. Load coding preferences
Read the coding preferences and code review scoring criteria from:
-`references/coding-preferences.md` (relative to this skill file)
Parse and internalize all rules, conventions, scoring categories, and severity definitions. These are your review criteria.
#### 2b. Load area-specific documentation
Once the changed file list is known (after step 3a), determine which areas of the codebase are touched and load the relevant documentation. Execute this sub-step between 3a and 3b. This documentation takes precedence over sibling comparison for architectural and pattern validation.
**Resolution order for each changed file:**
1.**Find the nearest `CLAUDE.md`** — walk up from the changed file's directory toward the repository root. The first `CLAUDE.md` found is the area guide for that file. Read it.
2.**Read referenced docs** — if the `CLAUDE.md` references documentation files (e.g., a `docs/` directory), use the descriptions in the `CLAUDE.md` to determine which docs are relevant to the type of code being changed, and read those. If unsure, read all referenced docs — the cost of reading is low, the cost of missing a convention is high.
3.**Follow cross-references in loaded docs** — if a loaded doc references another doc as covering a complementary or related concern, and the changed files touch that concern, read the referenced doc too. Repeat until no new relevant cross-references remain.
4.**Check for applicable skills** — review the available skills list. If a skill exists for the type of code being changed, read the skill file to understand the expected patterns, structure, and conventions it enforces. Do NOT invoke the skill — just use it as a reference for what the correct implementation should look like.
**Store all loaded documentation** for use in step 4. These docs define the authoritative patterns and conventions that the review evaluates against.
### 3. Gather Changed Files
#### 3a. Collect file list, stats, and diff
Run these git commands (where `{target}` is the resolved target branch):
Log the skip list: "Skipped {N} noise files: {comma-separated list of filenames}"
#### 3c. Read reviewable changed files
Read the full file for every reviewable changed file.
#### 3d. Track file counts
Keep track of these numbers for the review output in step 7: total changed files, noise files skipped, and reviewable files read. Also record: distinct production layers touched, distinct project directories, and total lines changed — these feed step 3e.
#### 3e. Assess PR complexity
Follow the procedure in `references/complexity-assessment.md`. Store the triggered dimensions and suggestions for step 7.
#### 3f. Classify PR scope
Classify the PR to determine which review steps are relevant:
| **Gen-only** | All reviewable files are `gen.ts` | Skip steps 5 and 6; step 4 reviews impact on other code only |
| **Docs-only** | All reviewable files are `.md` | Skip steps 5 and 6; step 4 reviews intent and readability only |
| **Test-only** | All reviewable files are in `tests/` | Skip steps 5 and 6; step 4 reviews intent, code quality, and test coverage only |
| **Config-only** | All reviewable files are `.csproj`, `.props`, `.json` config, or CI/build files | Skip step 5; step 6 checks dependency version changes only |
| **Standard** | Anything else | No skips — run all steps |
### 4. Raw Code Review
Review each changed file holistically. Think like a senior developer reading a colleague's PR. Note all findings without worrying about format or severity yet.
#### 4a. Read and reason about each file
For each changed file, reason about: What does this code do? Is it correct? What's missing — validation, error handling, notifications, cleanup, edge cases? Could this break anything for consumers?
#### 4b. Validate against documentation and patterns
Use a **docs-first** approach: classify the code by what it does, check it against documented conventions, and only fall back to sibling comparison when docs don't cover the pattern.
**Step 1 — Determine the correct approach from documentation, then check whether the PR matches**
A PR is a proposed solution, not the source of truth. This step has two parts that must happen in order — do not start part B until part A is complete.
**Part A — Before validating/judging the implementation**, determine what the correct approach is for each new class or file based on what it does. Use the documentation loaded in step 2b to identify the expected base classes, patterns, and conventions. Write down the expected approach. Classify based on what the code does, not based on what neighboring files look like.
**Part B — Now compare the PR's implementation** against the expected approach from Part A. If it deviates from the documented approach, flag it. If the documentation specifies reference examples, read those examples to verify the implementation matches.
**Pattern match is the leading finding.** If the documentation defines a pattern that fits what the code does, the first and most important finding is whether the code follows that pattern.
**Step 2 — Fall back to sibling comparison**
If the documentation does not cover the specific pattern, or for cross-cutting concerns not addressed in docs, fall back to sibling comparison:
1.**New method on existing class/interface**: Grep for the most similar existing method on the same class using `-A 80` to capture the full method body (e.g., `UpdateCurrentUserAsync` → grep for `UpdateAsync` in the same file with `-A 80`). Compare line by line for missing cross-cutting concerns: notifications/events, validation, scoping, authorization, error handling, audit logging.
2.**New TS class**: Grep for siblings by base class (`extends {BaseClass}`) or by interface (`implements {Interface}`) or by name suffix (e.g., `CurrentUserController` → grep for `UserController`). Compare for missing concerns.
3.**New CS class**: Grep for siblings by base class (`class {ClassName} : {BaseClass}`) or by interface (`class {ClassName} : {Interface}`) or by name suffix (e.g., `ManagementApiComposer` → grep for `ApiComposer`). Compare for missing concerns.
**Important:** Sibling comparison validates cross-cutting concerns, but it must not override documented conventions. If a sibling deviates from documented patterns, that sibling is wrong — do not copy its deviation.
Store your raw findings — they feed into step 7.
### 5. Impact Analysis
**Skip this step if PR scope is docs-only, test-only, or config-only.**
Follow the procedure in `references/impact-analysis.md`.
### 6. Breaking Changes Check
**Skip this step if PR scope is docs-only or test-only. If config-only, only check for dependency version changes that could break consumers.**
Follow the procedure in `references/breaking-changes.md`.
### 7. Consolidate and Output Review
Merge findings from step 4 (raw review), step 5 (impact analysis), and step 6 (breaking changes). For each finding, assign severity (Critical/Important/Suggestion) and verify it relates to changed code — not pre-existing issues. Before outputting, drop any finding about whitespace, blank lines, formatting, or comment wording. Then present the review in this exact format:
```markdown
## PR Review
**Target:**`{target_branch}` · **Based on commit:**`{head_sha}`
[If any skipped files, append: · **Skipped:** {skipped} files out of {total} total]
[If step 3f classification is not "Standard", append: · **Classified as:** {classification}]
[1–2 sentences: what this PR accomplishes , keep it as short as possible, only highlight the primary essence.]
- **Modified public API:** {changed existing interfaces/types/classes/methods}
[Omit bullet if none]
- **Affected implementations (outside this PR):** {interfaces/types/classes/methods using modified public API}
[Omit bullet if none]
- **Breaking changes:** {violations with specifics}
[Omit bullet if none]
- **Other changes:** {changes not listed above that an Umbraco user, plugin developer, or API consumer would notice — e.g., behavior changes, default value changes, error message changes, new configuration options, removed functionality. Exclude internal renames, formatting, and private implementation details.}
[Omit bullet if none]
[If step 3e triggered any dimensions, insert this block. Omit entirely if nothing triggered:]
> [!NOTE]
> **Complexity advisory** — This PR may benefit from splitting.
>
> - **{Dimension}:** {Explanation and concrete split suggestion from step 3e}
> [one bullet per triggered dimension]
>
> _This is an observation, not a blocker. The full review follows below._
---
### Critical
[Must fix before merge — security vulnerabilities, data loss, broken functionality, breaking changes without proper patterns]
[Nice to have — readability, minor refactoring, alternative approaches]
- **`{file}:{line}`**: {detail}
[Omit section if none]
---
[One of:]
## Approved
This looks good to be merged as-is, but please do a manual sanity check and testing before merging.
## Approved with Suggestions for improvement
Good to go, but please carefully consider the importance of the suggestions.
## Request Changes
Critical and important issues must be addressed first.
## Needs re-work
This is in such a bad state that the feedback of this review is not sufficient to guide improvements, the PR cannot be approved.
```
**Guidelines for the review output:**
— When reporting information, be extremely concise and sacrifice grammar for sake of concision.
- Only review code that was changed in the diff — pre-existing issues are out of scope. Focus on what compilers and linters cannot catch: behavioral side-effects (e.g., a changed default alters runtime behavior for consumers), architectural violations (e.g., a new dependency breaks layering), breaking changes for external consumers of the public API, and security implications. Leave type errors, missing imports, and broken references to CI.
- Be specific — always reference file and line number
- Explain WHY something is an issue, not just WHAT, but avoid stating the obvious.
- For complex matters, provide concrete fix suggestions, including code snippets when helpful
- Keep it constructive — the goal is to help, not gatekeep
- Don't repeat the same finding for every occurrence — mention it once and note "same pattern in {other files}"
- Focus on substantive issues only. Do NOT flag purely cosmetic or stylistic concerns. Specifically, never flag: code formatting or whitespace, comment grammar or wording, redundant-but-harmless syntax (e.g., optional chaining after a truthiness check), code duplication that doesn't cause bugs, or HTML template cosmetics. The only exception is when a stylistic issue has a concrete impact on performance or rendering. Note: missing JSDoc/documentation on public or exported APIs is a substantive finding (per coding preferences), not a cosmetic one — flag it as a Suggestion.
- For breaking changes, reference the specific pattern from the CLAUDE.md that should be applied
- Do not suggest changes that would themselves introduce breaking changes. If a suggestion would alter public API surface (e.g., changing return types, renaming public members), it is not appropriate for a PR targeting `main` within a major version. Only suggest non-breaking alternatives.
"prompt":"Review the changes in PR #22214 (branch origin/pr/22214 targeting main). This is a large frontend refactor migrating create entity actions to use entityCreateOptionAction extensions, with deprecations.",
"expected_output":"A structured review that identifies frontend deprecation patterns, flags the large PR complexity, handles 75+ files correctly, checks for breaking changes in exported components, and produces the correct output format.",
{"id":"frontend-breaking-change-awareness","text":"Checks frontend-specific breaking changes (exports, custom elements) not just backend"},
{"id":"file-references-present","text":"Findings reference specific files with line numbers"},
{"id":"no-false-critical-on-deprecations","text":"Properly deprecated code is NOT flagged as Critical breaking change"},
{"id":"no-stylistic-nitpicks","text":"Review does not flag purely cosmetic/stylistic issues (formatting, whitespace, naming conventions, comment grammar, code style preferences) unless they affect performance or rendering. Missing JSDoc on new public APIs is NOT a stylistic issue — it is a legitimate finding."},
{"id":"manifest-alias-rename-detected","text":"Alias renames (CreateOptions → Create) flagged as Critical breaking change"},
{"id":"non-exported-deletions-dismissed","text":"Deleted action classes NOT flagged as breaking (verified against package.json exports)"},
{"id":"noise-files-filtered","text":"Does not review noise files (generated files, lock files, etc.)"},
{"id":"complexity-advisory-triggers","text":"Review includes a complexity/split advisory for the large 75+ file scope"}
]
},
{
"id":1,
"name":"pr-21672-small-frontend-bugfix",
"prompt":"Review the changes in PR #21672 (branch origin/pr/21672 targeting main). This is a small 4-file frontend bugfix implementing tab validation badges in the block editor.",
"expected_output":"A clean review that correctly identifies this as a small focused bugfix, avoids false positives, and either approves or approves with minor suggestions.",
"pr_number":21672,
"pr_branch":"origin/pr/21672",
"base_branch":"origin/main",
"files":[],
"assertions":[
{"id":"complexity-advisory-absent","text":"Review does NOT include a complexity/split advisory"},
{"id":"no-false-breaking-changes","text":"Review does not flag breaking changes"},
{"id":"proportionate-verdict","text":"Verdict is 'Request Changes'"},
{"id":"concise-review","text":"Review output is under 200 lines"},
{"id":"no-stylistic-nitpicks","text":"Review does not flag purely cosmetic/stylistic issues (formatting, whitespace, naming conventions, comment grammar, code style preferences) unless they affect performance or rendering. Missing JSDoc on new public APIs is NOT a stylistic issue — it is a legitimate finding."}
]
},
{
"id":2,
"name":"pr-22217-small-backend-webhook",
"prompt":"Review the changes in PR #22217 (branch origin/pr/22217 targeting v18/dev). This is a tiny 3-file backend change to the default webhook payload type.",
"expected_output":"A concise review that correctly resolves v18/dev as target branch, handles the small change proportionately, and considers the behavioral impact of changing a default value.",
"pr_number":22217,
"pr_branch":"origin/pr/22217",
"base_branch":"origin/v18/dev",
"files":[],
"assertions":[
{"id":"correct-target-branch","text":"Review references 'v18/dev' as the target branch (not 'main')"},
{"id":"default-value-change-noted","text":"Review discusses the behavioral impact of changing the default payload type"},
{"id":"proportionate-review","text":"Review output is under 150 lines"},
{"id":"no-stylistic-nitpicks","text":"Review does not flag purely cosmetic/stylistic issues (formatting, whitespace, naming conventions, comment grammar, code style preferences) unless they affect performance or rendering. Missing JSDoc on new public APIs is NOT a stylistic issue — it is a legitimate finding."},
{"id":"ignores-preexisting-issues","text":"Does NOT flag the ~30 builder extension methods with Legacy defaults (pre-existing, not changed in the PR)"},
{"id":"side-effect-detection","text":"Flags stale WebhookSettings.cs docs as a side-effect of the constant value change"},
{"id":"consumer-identification","text":"Identifies affected consumers outside the PR (WebhookSettings, UmbracoBuilder, or WebhookEventCollectionBuilderExtensions)"}
"prompt":"Review the changes in PR #22268 (branch origin/pr/22268 targeting main). This is a 29-file frontend feature adding a current user workspace modal.",
"expected_output":"A review of a medium-sized new feature PR. Should assess the new code for architectural compliance, check for breaking changes (new exports, custom elements), and evaluate code quality without flagging pre-existing issues.",
"pr_number":22268,
"pr_branch":"origin/pr/22268",
"base_branch":"origin/main",
"files":[],
"assertions":[
{"id":"complexity-advisory-triggers","text":"Review includes a complexity/split advisory (3 layers: Core, API, Frontend across 27+ files)"},
{"id":"breaking-changes-on-interface-additions","text":"Flags new interface methods without default implementations as breaking changes (Pattern 3)"},
{"id":"no-stylistic-nitpicks","text":"Review does not flag purely cosmetic/stylistic issues unless they affect performance or rendering. Missing JSDoc on new public APIs is NOT a stylistic issue — it is a legitimate finding."},
{"id":"diff-scoped","text":"All findings reference code that was changed in the diff, not pre-existing issues"},
{"id":"new-feature-assessed","text":"Review assesses the new feature's architecture, patterns, or integration approach — not just absence of bugs"},
{"id":"no-false-notification-finding","text":"Review does NOT flag UpdateCurrentUserAsync as missing UserSavingNotification/UserSavedNotification — the sibling UpdateAsync also does not publish these notifications, so flagging their absence would be a false positive"}
"prompt":"Review the changes in PR #22215 (branch origin/pr/22215 targeting main). This is a 2-file frontend feature adding user management to the user group workspace.",
"expected_output":"A review that catches the architecture violation: the workspace context directly imports and calls UserService and UserGroupService (generated API clients) instead of going through a repository. In the Umbraco backoffice, workspace contexts access data via repositories, not by calling API services directly. The review should flag this as a significant architecture issue and request changes.",
"pr_number":22215,
"pr_branch":"origin/pr/22215",
"base_branch":"origin/main",
"files":[],
"assertions":[
{"id":"service-bypass-detected","text":"Review flags that the workspace context directly imports/calls UserService or UserGroupService instead of using a repository"},
{"id":"repository-pattern-recommended","text":"Review recommends using the repository pattern (going through a repository/data-source layer) rather than calling API services directly from the workspace context"},
{"id":"verdict-request-changes","text":"Verdict is 'Request Changes' (the architecture violation warrants requesting changes, not just approving with suggestions)"},
{"id":"no-stylistic-nitpicks","text":"Review does not flag purely cosmetic/stylistic issues (formatting, whitespace, naming conventions, comment grammar, code style preferences) unless they affect performance or rendering. Missing JSDoc on new public APIs is NOT a stylistic issue — it is a legitimate finding."},
{"id":"no-false-breaking-changes","text":"Review does not flag breaking changes (this PR only adds new code, no public API is removed or modified)"}
This document describes how to detect and validate breaking changes during PR review. It covers both backend (.NET) and frontend (TypeScript/Lit) patterns.
---
## Version Detection
**Always read `version.json`** at the repository root to determine the current major version. This drives the obsolete removal target calculation:
- Current major version: read from `version.json` → `version` field (e.g., `"17.4.0-rc"` → major version `17`)
- Obsolete removal target: `current + 2` (e.g., if current is 17, removal is scheduled for Umbraco 19)
- Format: `[Obsolete("... Scheduled for removal in Umbraco {current+2}.")]`
---
## Backend (.NET) Breaking Changes
### What Constitutes a Breaking Change
Any of these on a `public` or `protected` member:
- Removing or renaming a class, interface, struct, record, or enum
- Removing or renaming a method, property, or field
- Changing a method signature (parameters, return type)
- Adding required parameters to an existing method
- Adding methods to a public interface (without default implementation)
- Changing a constructor signature on a public class
- Removing or changing enum values
- Changing type hierarchy (base class, implemented interfaces)
- [ ] Old constructor has `[Obsolete]` attribute with correct removal version
- [ ] Old constructor calls new constructor via `: this(...)`
- [ ]`StaticServiceProvider.Instance.GetRequiredService<T>()` used for new params only
- [ ] DI registration uses the NEW constructor (old is for external consumers only)
- [ ] Removal version is `{current_major + 2}`
**Common mistakes to flag:**
- Removing the old constructor entirely (breaking change!)
- Old constructor NOT calling new constructor (code duplication)
- Wrong removal version in `[Obsolete]`
- Missing `StaticServiceProvider` resolution for new dependencies
- DI registration still using the old constructor
### Pattern 2: Obsolete Method + New Overload
When a method signature needs to change, add the new overload and obsolete the old.
**Correct pattern:**
```csharp
[Obsolete("Use the overload taking all parameters. Scheduled for removal in Umbraco 19.")]
publicvoidDoThing(stringname)
=>DoThing(name,extraParam:null);
publicvoidDoThing(stringname,string?extraParam)
{
// Real implementation here
}
```
**Validation checklist:**
- [ ] Old method has `[Obsolete]` attribute with correct removal version
- [ ] Old method calls new method, providing defaults for new parameters
- [ ] All internal callers updated to use the new method
- [ ] No internal code references the obsolete method (except the delegation)
### Pattern 3: Default Interface Implementation
When adding methods to a public interface, provide a default implementation.
**Correct pattern:**
```csharp
publicinterfaceIMyService
{
voidExistingMethod();
// New method with default implementation
voidNewMethod(stringparam)
=>ExistingMethod();// delegate to existing if possible
}
```
**Strategies for defaults (in order of preference):**
1. Use existing interface methods to satisfy the contract
2. Return a sensible default (empty collection, null, etc.)
3. Throw `NotImplementedException` if no reasonable default exists
**Validation checklist:**
- [ ] New interface method has a default implementation
- [ ] TODO comment present: `// TODO (V{next-major}): Remove the default implementation when {obsolete method} is removed.`
- [ ] Default implementation is functionally correct (even if not optimal)
- [ ] If `StaticServiceProvider` is used in default impl, noted as temporary
### Obsolete Attribute Validation
For any `[Obsolete]` attribute found in changed code:
1.**Format**: Must contain `"Scheduled for removal in Umbraco {version}."`
2.**Version**: Must be `current_major + 2` (read from `version.json`)
3.**Pragma**: Where obsolete members must call each other, `#pragma warning disable CS0618` / `#pragma warning restore CS0618` must be present
### Internal Caller Check
After finding obsolete patterns, verify:
- Search the codebase for usages of the obsolete member
- **No internal code** (inside `src/`) should reference obsolete members
- Only the obsolete member's own delegation (calling the new version) is acceptable
- External consumers (outside the repo) get the deprecation period to migrate
---
## Frontend (TypeScript/Lit) Breaking Changes
The backoffice is published as `@umbraco-cms/backoffice` with 140+ named exports. Plugin developers depend on this public API surface.
**Critical frontend rule (does not apply to backend .NET where `public`/`protected` visibility determines the API surface): only symbols reachable through the `package.json` `exports` field are public API.** Anything not exported — whether classes, functions, constants, types, or entire files — is an internal implementation detail, even if other internal code imports it. Removing or changing unexported frontend symbols is not a breaking change. Before flagging a frontend deletion or rename as breaking, verify the symbol is reachable via `package.json` exports. If it is not, do not flag it.
### Custom Elements (Web Components)
**Breaking changes:**
- Renaming or removing a registered custom element tag (`umb-*`)
- Removing elements from `HTMLElementTagNameMap`
- Removing or changing `@property()` decorated fields on exported components
- Removing event emissions (checked via `this.dispatchEvent`)
- Removing CSS custom properties (`@cssprop` in JSDoc)
- Removing CSS parts (`@csspart` in JSDoc)
**How to detect:**
- Check diff for removed `@customElement('umb-...')` decorators
- Check diff for removed `@property()` fields on exported components
- Check diff for removed entries in `HTMLElementTagNameMap` declarations
### Exported Types/Interfaces
**Breaking changes:**
- Removing exports from `package.json``exports` field
- Changing the shape of exported interfaces (removing properties, changing types)
- Renaming exported types (consumers import by name)
- Removing union type members
- Changing generic type parameter constraints
**How to detect:**
- Check if `package.json``exports` field is modified
- Check diff for removed `export` statements
- Check diff for changed interface/type shapes
### Manifest/Extension System
**Breaking changes:**
- Renaming a manifest `alias` value — plugin developers reference aliases by string in conditions, overwrites, and extension registry lookups. Alias renames are not caught by the compiler since they are string-based. A renamed alias silently breaks any plugin that references the old string.
- Removing support for a manifest `type` that plugins use
- Changing manifest `alias` resolution or validation
- Removing or renaming manifest `kind` types
- Changing extension bundle structure
**How to detect:**
- **Alias renames**: Compare `alias:` values in manifest files before and after. Changed alias strings are Critical — the old alias should be preserved as a deprecated entry.
- Search for changes to manifest type definitions
- Check for removed or renamed manifest kinds
### Context API
**Breaking changes:**
- Removing context tokens from exports
- Changing the shape of data provided by a context
- Removing context provider/consumer mechanisms
**How to detect:**
- Check for removed context token exports
- Check for changes to context provider classes
### Controllers/Lifecycle
**Breaking changes:**
- Changing controller base class inheritance requirements
- Removing controller lifecycle hooks
- Breaking cleanup mechanisms in `disconnectedCallback()`
### Observable/State
**Breaking changes:**
- Removing observable properties from the public API
- Changing observable emission patterns
### npm Publishing
**Breaking changes:**
- Changing version constraints that exclude previously-supported versions
- Adding incompatible peer dependency constraints
**How to detect:**
- Check if `package.json``peerDependencies` or `dependencies` changed
- Verify version ranges are not narrowed
---
## Reporting Breaking Changes
When a breaking change is detected, report:
1.**What**: The specific change and which public symbol is affected
2.**Pattern**: Which mitigation pattern should be applied (Pattern 1, 2, or 3 for backend)
3.**Severity**: Critical (no mitigation present) or Important (mitigation present but incorrect)
4.**Fix**: Concrete code suggestion showing the correct pattern
If no breaking changes are detected, state: "No breaking changes detected."
- **Log messages**: Technical, detailed, with context
- Include correlation IDs and relevant data in logs
---
## Security
- **Always check for security issues** using OWASP Top 10 as baseline
- Flag potential vulnerabilities immediately
- Suggest secure alternatives when spotting risky patterns
- Apply principle of least privilege
---
## Immutability
- Prefer **immutability** by default
- Allow internal properties to be mutated, as long as they are not direct references coming from the outside
---
## Nullability
- **TypeScript / JavaScript**
- Prefer `undefined` for optional/omitted values (e.g., optional parameters, props, and fields)
- Use `null` only when the domain model explicitly encodes "no value" or "not set" (e.g., `string | null` from APIs/DB), and be consistent with existing types
- Avoid mixing `null` and `undefined` for the same concept within the same model or API surface
- **C#**
- use nullable types (e.g., `string?`, `int?`) where absence is valid
- Prefer domain modeling (value objects, options/results, empty collections) over `null` where appropriate, but respect existing conventions in the codebase
---
## C# Specific
- use Notification pattern (not C# events), Composer pattern (DI registration), Scoping with `Complete()`, Attempt pattern for operation results.
---
## Architecture
- Follow **Clean Architecture** principles
- **Fail-fast** principle: detect and report errors as early as possible
- Within the established layered architecture (Core/Infrastructure/Web/API), organize code by feature inside each layer where practical, while preserving dependency direction
- One class per file
- Avoid N+1 queries
- Profile before optimizing non-critical paths
### Type Hierarchy Consistency
When parallel model types have inconsistent relationships to a shared base type:
**TypeScript**: manipulations via `Omit`, `Pick`, intersection overrides, or workarounds like `as unknown as` / double-casts to bridge type mismatches.
**C#**: hiding base members with `new` to change types, explicit interface implementations to mask mismatches, or downcasting base return types in derived classes.
- **Do NOT suggest** the PR code should deviate from its base type to match a sibling that already deviates. Copying the deviation spreads the problem.
- **Do flag** the architectural inconsistency: parallel models should share a compatible base contract. The model that manipulates or deviates from the base type is the one that needs attention — not the one that extends it correctly.
- **Frame the suggestion** as: "These related models have inconsistent type hierarchies. `{deviating type}` manipulates the base contract of `{base type}`, which forces shared consumers like `{shared utility}` to require a shape that conforming subtypes can't satisfy."
---
## Code Style
- Follow standard naming conventions for the language (C# or JS/TS)
- Keep components small and focused on a single responsibility
- Prefer early returns
- Small functions
- No nested ternaries
---
## Severity Levels
| Severity | Meaning |
|----------|---------|
| **Critical** | Must fix before merge — security vulnerabilities, data loss risks, broken functionality |
For any file where the whitespace-ignored diff is less than **half** the full diff size (and the full diff is over 50 lines), that file has significant formatting changes mixed with logic. Flag it with a split suggestion: "File(s) {list} contain significant formatting changes mixed with logic. Consider a separate formatting-only commit or PR to keep the functional diff reviewable."
## Multi-project scope check
Skip this section entirely if ALL production files reside in a single project directory or if the PR is docs-only, test-only, dependency-bump-only, or rename-only.
Otherwise, flag any dimension that applies:
| Dimension | Condition | Suggestion |
|---|---|---|
| **Size** | 30+ files OR 1500+ lines, spanning 2+ projects | "If changes in {projectA} and {projectB} are independently functional, they could be separate PRs." |
| **Mixed intent** | 2+ intent categories (new feature, bugfix, refactor, dependency update) with 15+ files or 3+ projects | "Consider extracting the {secondary intent} into a separate PR." |
Intent categories — detect from diff characteristics, not commit messages:
- **New feature**: new files or new `public`/`export` declarations
- **Bug fix**: small targeted edits, no new files (don't co-flag with new feature)
- **Refactor**: file renames, symbols moved but logic unchanged
- **Dependency update**: changes to `.csproj`, `Directory.Packages.props`, `package.json`
This document describes how to perform impact analysis during PR review. The goal is to look beyond the diff to understand how changes affect consumers in other parts of the codebase.
---
## 1. Extract Changed Public Symbols
Scan the diff output for changes to public API surface:
### Backend (.NET)
Look for added, modified, or removed lines containing:
- **Notification handlers**: if a notification type changed, search for `INotificationHandler<NotificationTypeName>` and `INotificationAsyncHandler<NotificationTypeName>`
- **Interface implementations**: if an interface changed, search for `: IInterfaceName` or `IInterfaceName,`
### Excluding the Changed File
When reporting consumers, exclude files that are part of the PR's changes (they're already being reviewed). The interesting consumers are those **outside** the PR that may be affected.
---
## 3. Check Dependency Flow Direction
The Umbraco architecture enforces strict unidirectional dependencies:
```
Api.Management / Api.Delivery (depend on Api.Common)
@@ -9,7 +9,7 @@ In order to use Umbraco as a CMS and build your website with it, you should not
- Are you about to [create a pull request for Umbraco][contribution guidelines]?
- Are you trying to get to the bottom of a problem in your existing Umbraco installation?
If the answer is yes, please read on. Otherwise, make sure to head on over [to the download page](https://our.umbraco.com/download) and start using Umbraco CMS as intended.
If the answer is yes, please read on. Otherwise, make sure to head on over [to the releases page](https://releases.umbraco.com) and start using Umbraco CMS as intended.
## Table of contents
@@ -37,7 +37,7 @@ In order to work with the Umbraco source code locally, first make sure you have
### Familiarizing yourself with the code
Umbraco is a .NET application using C#. The solution is broken down into multiple projects. There are several class libraries. The `Umbraco.Web.UI` project is the main project that hosts the back office and login screen. This is the project you will want to run to see your changes.
Umbraco is a .NET application using C#. The solution is broken down into multiple projects. There are several class libraries. The `Umbraco.Web.UI` project is the main project that hosts the back office and login screen. This is the project you will want to run to see your changes.
There are two web projects in the solution with client-side assets based on TypeScript, `Umbraco.Web.UI.Client` and `Umbraco.Web.UI.Login`.
@@ -73,13 +73,19 @@ Just be careful not to include this change in your PR.
Conversely, if you are working on front-end only, you want to build the back-end once and then run it. Before you do so, update the configuration in `appSettings.json` to add the following under `Umbraco:Cms:Security`:
```
```json
"BackOfficeHost":"http://localhost:5173",
"AuthorizeCallbackPathName":"/oauth_complete",
"AuthorizeCallbackLogoutPathName":"/logout",
"AuthorizeCallbackErrorPathName": "/error"
"AuthorizeCallbackErrorPathName":"/error",
"BackOfficeTokenCookie":{
"SameSite":"None"
}
```
> [!NOTE]
> If you get stuck in a login loop, try clearing your browser cookies for localhost, and make sure that the `Umbraco:Cms:Security:BackOfficeTokenCookie:SameSite` setting is set to `None`.
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
👍🎉 First of all, thanks for taking the time to contribute! 🎉👍
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgement, and feel free to propose changes to this document in a pull request.
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgment, and feel free to propose changes to this document in a pull request.
We have a guide on [what to consider before you start](contributing-before-you-start.md) and more detailed guides at the end of this article.
@@ -12,56 +12,56 @@ This guide describes each step to make your first contribution:
1.**Fork**
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)


2.**Clone**
When GitHub has created your fork, you can clone it in your favorite Git tool or on the command line with `git clone https://github.com/[YourUsername]/Umbraco-CMS`.
When GitHub has created your fork, you can clone it in your favorite Git tool or on the command line with `git clone https://github.com/[YourUsername]/Umbraco-CMS`.


3.**Switch to the correct branch**
Switch to the `contrib` branch
Switch to the `main` branch
4.**Branch out**
Create a new branch based on `contrib` and name it after the issue you're fixing, For example: `v15/bugfix/18132-rte-tinymce-onchange-value-check`.
Create a new branch based on `main` and name it after the issue you're fixing. For example: `v15/bugfix/18132-rte-tinymce-onchange-value-check`.
Please follow this format for branches: `v{major}/{feature|bugfix|task}/{issue}-{description}`.
Please follow this format for branches: `v{major}/{feature|bugfix|task|qa|improvement}/{issue}-{description}`.
This is a development branch for the particular issue you're working on, in this case a bug-fix for issue number `18132` that affects Umbraco v.15.
This is a development branch for the particular issue you're working on, in this case, a bug-fix for issue number `18132` that affects Umbraco v.15.
Don't commit to `contrib`, create a new branch first.
Don't commit to `main`, create a new branch first.
5.**Build or run a Development Server**
You can build or run a Development Server with any IDE that supports DotNet or the command line.
You can build or run a Development Server with any IDE that supports .NET or the command line.
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
6.**Change**
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](contributing-first-issue.md#questions).
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](contributing-first-issue.md#questions).
7.**Commit and push**
Done? Yay! 🎉
Done? Yay! 🎉
Remember to commit to your branch. When it's ready push the changes to your fork on GitHub.
Remember to commit to your branch. When it's ready, push the changes to your fork on GitHub.
8.**Create pull request**
On GitHub, in your forked repository (`https://github.com/[YourUsername]/Umbraco-CMS`) you will see a banner saying that you pushed a new branch and a button to make a pull request. Tap the button and follow the instuctions.
On GitHub, in your forked repository (`https://github.com/[YourUsername]/Umbraco-CMS`), you will see a banner saying that you pushed a new branch and a button to make a pull request. Tap the button and follow the instructions.
Want to read further? [Creating a pull request and what happens next](contributing-creating-a-pr.md).
Would you like to read further? [Creating a pull request and what happens next](contributing-creating-a-pr.md).
## Further contribution guides
- [Before you start](contributing-before-you-start.md)
- [Finding your first issue: Up for grabs](contributing-before-you-start.md)
- [Finding your first issue](contributing-first-issue.md)
- [Contributing to the new backoffice](https://docs.umbraco.com/umbraco-backoffice/)
This preview is automatically deployed from the main branch and showcases the latest backoffice features and improvements. It runs from mock data and persistent edits are not supported.
## Get help
If you need a bit of feedback while building your Umbraco projects, we are [chatty on Discord](https://discord.umbraco.com). Our Discord server serves both a social space but also has channels for questions and answers. Feel free to lurk or join in with your own questions. Or just post your daily Wordle score, up to you!
If you need a bit of feedback while building your Umbraco projects, we are [chatty on Discord](https://discord.umbraco.com). Our Discord server serves as a social space for all Umbracians. If you have any questions or need some help with a problem, head over to our [dedicated forum](https://forum.umbraco.com/) where the Umbraco Community will be happy to help.
## Looking to contribute back to Umbraco?
@@ -52,3 +60,4 @@ You came to the right place! Our GitHub repository is available for all kinds of
Umbraco is contribution-focused and community-driven. If you want to contribute back to the Umbraco source code, please check out our [guide to contributing](CONTRIBUTING.md).
### Tip: You should not run Umbraco from source code found here. Umbraco is extremely extensible and can do whatever you need. Instead, [install Umbraco as noted above](#looking-to-install-umbraco) and then [extend it any way you want to](https://docs.umbraco.com/umbraco-cms/extending/).
@@ -7,9 +7,26 @@ We recommend you to [sync with our repository][sync fork] before you submit your
GitHub will have picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go.

We like to use [git flow][git flow] as much as possible, but don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to `contrib`. This is the branch you should be targeting.
We like to use [git flow][git flow] as much as possible, but don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to `main`. This is the branch you should be targeting.
Please note: we are no longer accepting features for v8 and below but will continue to merge security fixes as and when they arise.
We welcome PRs for features and bugfixes for different versions according to the [published support and EOL schedule][support-and-eol].
We don't have rules for naming PRs - so name them as you prefer. At HQ we do have a best practice on clear and concise PR naming, so if you would like to use the format feel free to do so.
Our convention of doing it is:
_Area: Description (closes #IssueID)_
1. Start by specifying the area. Fx the feature name(UFM, Tiptap etc.) or specific section (migrations, relations, segmentation).
2. In your description, where applicable, mention type of PR (Build, Bump, Fix, Refactor etc.).
4. Good practise is to make sure you describe specifically the change and/or impact of change.<br>
Umbraco HQ will regularly mark newly created issues on the issue tracker with [the `community/up-for-grabs` tag][up for grabs issues]. This means that the proposed changes are wanted in Umbraco but the HQ does not have the time to make them at this time. We encourage anyone to pick them up and help out.
Umbraco HQ will regularly mark newly created issues on the issue tracker with [the `community/up-for-grabs` tag][up for grabs issues]. This means that the proposed changes are wanted in Umbraco but the HQ does not have the time to make them at this time. In adding the label we will endeavour to provide some guidelines on how to go about the implementation, such that it aligns with the project. We encourage anyone to pick them up and help out.
You don't need to restrict yourselves to issues that are specifically marked as "up for grabs" though. If you are running into a bug you have reported or found on the [issue tracker][issue tracker], it's not necessary to wait for HQ response. Feel free to dive in and try to provide a fix, raising questions as you need if you have concerns about the modifications necessary to resolve the problem.
If you do start working on something, make sure to leave a small comment on the issue saying something like: "I'm working on this". That way other people stumbling upon the issue know they don't need to pick it up, someone already has.
@@ -11,18 +13,18 @@ Great question! The short version goes like this:
1.**Fork**
Create a fork of [`Umbraco-CMS` on GitHub][Umbraco CMS repo]

1.**Clone**
When GitHub has created your fork, you can clone it in your favorite Git tool


1.**Switch to the correct branch**
Switch to the `contrib` branch
Switch to the `main` branch
1.**Build**
@@ -30,7 +32,7 @@ Great question! The short version goes like this:
1.**Branch**
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `contrib`, create a new branch first.
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `main`, create a new branch first.
1.**Change**
@@ -40,7 +42,7 @@ Great question! The short version goes like this:
Done? Yay! 🎉
Remember to commit to your new `temp` branch, and don't commit to `contrib`. Then you can push the changes up to your fork on GitHub.
Remember to commit to your new `temp` branch, and don't commit to `main`. Then you can push the changes up to your fork on GitHub.
#### Keeping your Umbraco fork in sync with the main repository
@@ -57,10 +59,10 @@ Then when you want to get the changes from the main repository:
```
git fetch upstream
git rebase upstream/contrib
git rebase upstream/main
```
In this command we're syncing with the `contrib` branch, but you can of course choose another one if needed.
In this command we're syncing with the `main` branch, but you can of course choose another one if needed.
[More information on how this works can be found on the thoughtbot blog.][sync fork ext]
@@ -77,7 +79,7 @@ You can get in touch with [the core contributors team][core collabs] in multiple
- If there's an existing issue on the issue tracker then that's a good place to leave questions and discuss how to start or move forward.
- If you want to ask questions on some code you've already written you can create a draft pull request, [detailed in a GitHub blog post][draft prs].
- Unsure where to start? Did something not work as expected? Try leaving a note in the ["Contributing to Umbraco"][contrib forum] forum. The team monitors that one closely, so one of us will be on hand and ready to point you in the right direction.
- Unsure where to start? Did something not work as expected? Try leaving a note in the [forum][forum]. The team monitors that one closely, so one of us will be on hand and ready to point you in the right direction.
<!-- Local -->
@@ -88,6 +90,7 @@ You can get in touch with [the core contributors team][core collabs] in multiple
[sync fork ext]: http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated "Details on keeping a git fork updated"
[draft prs]: https://github.blog/2019-02-14-introducing-draft-pull-requests/ "Github's blog post providing details on draft pull requests"
# **Contributing to Localization in the Backoffice**
Do you want to help keep our translations accurate and up to standard? 🌍✨
Your input makes a real difference! By reviewing, refining, or suggesting improvements, you ensure that our translations remain clear, consistent, and user-friendly for everyone.
## **How Can I Contribute?**
To contribute to localization in the Backoffice, follow this step-by-step guide:
### **1. Change the Language in Backoffice**
1. Open the Backoffice, click on your profile icon in the top-right corner, and select "Edit."
2. Under "UI Culture," select the language you want to review from the dropdown menu.

### **2. Find a Translation Error**
1. Navigate through the Backoffice and check if everything is translated correctly.
2. When you find a translation error, right-click on it and select "Inspect."
3. Look for the nearest element that starts with `umb-` and has a name indicating something specific to the given location.
**Example:**
* The closest parent element should be specific, such as `umb-document-type-workspace-view-settings` instead of a generic element like `umb-property-layout.`
### **3. Find the Code in VS Code**
1. Open VS Code and search for the nearest `umb-` element you identified.

2. Scroll down to find `render() {` and look for the element label that needs updating.

3. If the label is hardcoded, it must be updated.
**Example:**
`label="Vary by culture"`
### **4. Find the Correct Translation**
1. Open the `en.ts` or `en-us.ts` file and search for relevant keywords. \
\
**Example:**
* If the text is "Vary by culture," search for `vary`, `culture`, or `Vary by culture`.
2. Once you find the translation, take the element name and search for it in the target language file (e.g., `da-dk.ts` for Danish).

3. If a translation exists, insert it into the label element found earlier.
### **5. Insert the Translation**
To display the new translation correctly, insert the following code inside the label element:
`${this.localize.term('action_key')}`
Replace `action_key` with the correct translation key.
Save the changes and return to the Backoffice to see the update.

### **6. Commit and Push**
1. Commit your changes to a new temporary branch (avoid committing directly to `main`).
2. Push the changes to your fork on GitHub.
### **7. Create a Pull Request**
1. In your forked repository on GitHub (`https://github.com/[YourUsername]/Umbraco-CMS`), a banner will appear stating that you pushed a new branch.
2. Click the button to create a pull request and follow the instructions.
## **I Can’t Find the Correct Translation**
If you can’t find the translation you need, it may not exist yet. In this case, you can create a new action with related keys.
### **1. Ensure It Doesn’t Already Exist**
Search thoroughly in `en.ts` or `en-us.ts` for all relevant keywords.
### **2. Create an Action**
1. Choose a meaningful name for the action to avoid confusion. \
\
**Example:** Translation for the Data Type "Color Picker."
* **Good name:** `colorPickerConfigurations`
* **Bad name:** `colorpicker`
2. A specific action name prevents unnecessarily long key names.
3. Define the action:
### **3. Create Keys**
1. Use clear and descriptive key names. \
\
**Example:**
* **Good name:** `colorsTitle`
* **Bad name:** `colors`
2. Add the necessary keys inside the action with proper translations.

## **I Can’t Find a <code>render()</code> Code in VS Code**
In some cases, such as Data Types, the label might not be inside `render()`. Instead, it may be in a manifest file.
### 1. Search for the Text
Copy the text from the Backoffice and search for it in the code.
### 2. Open the Manifest File
Once you find the relevant manifest file, open it to confirm you’re in the right place.
### 3. Change the Label
In Markdown files, localization is slightly different. Instead of:
Once all changes are made, your manifest should look something like this:

---
### Thank you
Following these steps ensures that the Umbraco Backoffice remains accessible and user-friendly in all supported languages. Thanks for contributing! 🎉
The full development guide for this repository lives in [CLAUDE.md](../CLAUDE.md). Please read that file for complete instructions on architecture, build steps, testing, branching conventions, and coding patterns.
Enterprise-grade CMS built on .NET 10.0. This repository contains 21 production projects organized in a layered architecture with clear separation of concerns.
**Description**: A short, kebab-case description (a few words). This should be prefixed with the GitHub issue number if the update is related to resolving a tracked issue.
- **Merge Strategy**: Squash and merge (via GitHub UI)
- **Reviews**: Required from code owners
#### PR Naming Convention
Use the format: `Area: Description (closes #IssueID)`
**Examples**:
| Area | Description | Issue |
|------|-------------|-------|
| Relations: | Move persistence of relations from repository into notification handlers | (closes #00000) |
| Management API: | Correct the population of the parent for sibling items when retrieved under a folder | |
| Docs: | Updated contributing guidelines to welcome contributions on bugfixes | |
**Area**: The feature or aspect affected (e.g., UFM, TipTap, Docs, Segmentation, Migrations). Helps readers quickly understand what is being changed.
**Description Best Practices**:
- Include the area of change (Relations, Management API, etc.)
- Describe the change and its impact
- Be specific, not vague (describe "a golden retriever" not just "a dog")
**Issue Linking**: Add `(closes #IssueID)` to the title for readability, AND include a closing keyword on its own line in the PR body (e.g., `Fixes #IssueID`) so GitHub actually auto-links and auto-closes the issue on merge. GitHub only parses closing keywords (`closes`, `fixes`, `resolves`) from the PR body or commit messages — the title suffix is cosmetic and does **not** trigger auto-close on its own.
fix(api): resolve null reference in schema handler
docs(web): update routing documentation
```
### Code Owners
Project ownership is distributed across teams. Check individual project directories for ownership.
---
## 4. Architecture Patterns
### Core Architectural Decisions
1.**Layered Architecture with Dependency Inversion**
- Core defines contracts (interfaces)
- Infrastructure implements contracts that need Infrastructure-owned machinery
- Web/APIs consume implementations via DI
**Where service implementations live**: Services whose dependencies are satisfiable from Core interfaces alone (repositories, scope, config, other Core services) live in `Umbraco.Core/Services/` — this covers the majority of domain services (`MemberService`, `ContentService`, `MediaService`, `ContentTypeService`, `EntityService`, `AuditService`, `ExternalMemberService`, etc.). Service implementations only live in `Umbraco.Infrastructure/Services/Implement/` when they genuinely need Infrastructure concerns — Examine indexes (`ContentSearchService`, `MediaSearchService`, `IndexedEntitySearchService`), log files (`LogViewerRepository`), packaging internals (`PackagingService`), webhook firing (`WebhookFiringService`), distributed-job coordination (`DistributedJobService`). When adding a new service, default to Core and only move to Infrastructure if a concrete dependency forces it.
2.**Interface-First Design**
- All services defined as interfaces in Core
- Enables testing, polymorphism, extensibility
3.**Notification Pattern** (not C# events)
- See `/src/Umbraco.Core/CLAUDE.md` → "2. Notification System (Event Handling)"
4.**Composer Pattern** (DI registration)
- See `/src/Umbraco.Core/CLAUDE.md` → "3. Composer Pattern (DI Registration)"
5.**Scoping Pattern** (Unit of Work)
- See `/src/Umbraco.Core/CLAUDE.md` → "5. Scoping Pattern (Unit of Work)"
6.**Attempt Pattern** (operation results)
-`Attempt<TResult, TStatus>` instead of exceptions
- Strongly-typed operation status enums
### Key Design Patterns Used
- **Repository Pattern** - Data access abstraction
- **Unit of Work** - Scoping for transactions
- **Builder Pattern** - `ProblemDetailsBuilder` for API errors
When a public class needs new dependencies, obsolete the existing constructor and add a new one. The old constructor delegates to the new one, resolving missing deps via `StaticServiceProvider`.
```csharp
[Obsolete("Please use the constructor with all parameters. Scheduled for removal in Umbraco 19.")]
- Old constructor marked `[Obsolete("... Scheduled for removal in Umbraco {current-major+2}.")]`
- Old constructor calls new constructor via `: this(...)`
- Uses `StaticServiceProvider.Instance.GetRequiredService<T>()` for new params only
- DI registration must use the NEW constructor (old is for external consumers only)
### 5.2 Obsolete Method + New Overload
When a public method signature needs to change, add the new method/overload and obsolete the old. The obsolete method should call the new one with suitable defaults.
```csharp
[Obsolete("Use the overload taking all parameters. Scheduled for removal in Umbraco 19.")]
publicvoidDoThing(stringname)
=>DoThing(name,extraParam:null);
publicvoidDoThing(stringname,string?extraParam)
{
// Real implementation here
}
```
**Rules**:
- Old method marked `[Obsolete]` with removal schedule
- DRY: old method calls new method, providing defaults for new parameters
- All internal callers must be updated to use the new method
- No callers should remain on the obsolete method within the codebase
### 5.3 Default Interface Implementation
When adding methods to a public interface, provide a default implementation so existing external implementations don't break.
```csharp
publicinterfaceIMyService
{
// Existing method
voidExistingMethod();
// New method with default implementation
voidNewMethod(stringparam)
=>ExistingMethod();// delegate to existing if possible
}
```
**Strategies for the default** (in order of preference):
1.**Use existing interface methods** to satisfy the contract (even if not optimal)
2.**Return a sensible default** like empty collection, null, etc.
3.**Throw `NotImplementedException`** if no reasonable default exists
**Example**: `IContentService.SaveBlueprint` - new overload with `IContent? createdFromContent` has a default impl that calls the old method (ignoring the new param).
**Example**: `IDocumentPresentationFactory.CreateCulturePublishScheduleModels` - full default implementation with logic, uses `StaticServiceProvider` for dependency resolution within the interface.
**Rules**:
- Add `// TODO (V{next-major}): Remove the default implementation when {obsolete method} is removed.` comment
- Default impl should be functionally correct even if not optimal
- If using `StaticServiceProvider` in a default impl, note this is temporary
### 5.4 General Rules
- **Removal policy**: Obsoleted members must remain for at least one full major version before removal. If obsoleted in version N, the earliest removal is version N+2. For example, something obsoleted in v17 is scheduled for removal in v19 (giving the whole of v18 as a deprecation period).
- All `[Obsolete]` attributes must include **"Scheduled for removal in Umbraco {current+2}"**
- Read `version.json` to determine the current major version
- Suppress `CS0618` warnings where obsolete members must call each other:
```csharp
#pragma warning disable CS0618 // Type or member is obsolete
=> OldMethod(param);
#pragma warning restore CS0618 // Type or member is obsolete
```
- Update ALL internal callers to use the new API - no internal code should use obsolete members
---
## 6. Project-Specific Notes
### Centralized Package Management
**All NuGet package versions** are centralized in `Directory.Packages.props`. Individual projects do NOT specify versions.
```xml
<!-- Individual projects reference WITHOUT version -->
The repository contains BOTH (actively supported):
- **Current**: NPoco-based persistence (`Umbraco.Cms.Persistence.Sqlite`, `Umbraco.Cms.Persistence.SqlServer`) - widely used and fully supported
- **Future**: EF Core-based persistence (`Umbraco.Cms.Persistence.EFCore.*`) - migration in progress
**Note**: The codebase is actively migrating to EF Core, but NPoco remains the primary persistence layer and is not deprecated. Both are fully supported.
### Authentication: OpenIddict
All APIs use **OpenIddict** (OAuth 2.0/OpenID Connect):
- Reference tokens (not JWT) for better security
- **Secure cookie-based token storage** (v17+) - tokens stored in HTTP-only cookies with `__Host-` prefix
- Tokens are redacted from client-side responses and passed via secure cookies only (`[redacted]` placeholder)
- ASP.NET Core Data Protection for token encryption
- Configured in `Umbraco.Cms.Api.Common`
- API requests must include credentials (`credentials: include` for fetch)
**Load Balancing Requirement**: All servers must share the same Data Protection key ring.
**Frontend auth pitfalls** — see `src/Umbraco.Web.UI.Client/docs/edge-cases.md` (Auth & Cross-tab section) and `docs/security.md`. Key points:
- Never call `validateToken()` per API request — it revokes the previous reference token (ID2019 errors)
- `window.opener` is set for ANY `window.open()` target, not only OAuth popups — scope guards to the pathname too
- BroadcastChannel does not deliver messages to the sender's own tab
When a PR changes Management API controllers or models, the `OpenApi.json` file in the Management API project must be updated:
1. Run the Umbraco instance locally
2. Open Swagger UI and navigate to the swagger.json link (e.g. `https://localhost:44339/umbraco/swagger/management/swagger.json`)
3. Copy the full JSON content and paste it into `src/Umbraco.Cms.Api.Management/OpenApi.json`
**Important**: Commit only the substantive changes — not IDE-applied formatting (whitespace, reordering, etc.). Extraneous formatting diffs make PRs harder to review and merge-ups more error-prone.
### Backoffice npm Package
The backoffice is published to npm as `@umbraco-cms/backoffice`. Runtime dependencies are provided via importmap; npm peerDependencies provide types only. For full details on dependency hoisting, version range logic, and plugin development, see `/src/Umbraco.Web.UI.Client/CLAUDE.md` → "npm Package Publishing".
### SQL Server 2100-parameter limit
Any `WHERE IN (@0, @1, ...)` built from a runtime-sized collection risks hitting SQL Server's 2100-parameter ceiling and throwing `SqlException` 8003 in production.
Batch with `IEnumerable<T>.InGroupsOf(Constants.Sql.MaxParameterCount)` or `Database.FetchByGroups(...)` whenever the collection size is driven by user data — not just when it currently fits. Watch for products of two scaling dimensions (documents × languages, properties × versions) and config-tunable batch sizes whose defaults are safe but ceilings aren't.
Full guidance, safe patterns and decision rule: see `/src/Umbraco.Infrastructure/CLAUDE.md` → "Avoiding the SQL Server 2100-parameter limit".
### Known Limitations
1. **Circular Dependencies**: Avoided via `Lazy<T>` or event notifications
2. **Multi-Server**: Requires shared Data Protection key ring and synchronized clocks (NTP)
3. **Database Support**: SQL Server, SQLite
---
## 7. CI/CD — Claude AI Assistant
Two GitHub Actions workflows powered by `anthropics/claude-code-action@v1`. Advisory only — does not block merging.
### Workflows
| File | Trigger | Purpose |
|------|---------|---------|
| `claude-review.yml` | `pull_request: [opened, ready_for_review]` | Auto-review every non-draft PR using the `umb-review` skill |
| `claude.yml` | `@claude` comments, issue assign/label | Interactive assistant for PRs and issues |
### Auto-Review (`claude-review.yml`)
Runs the full `.claude/skills/umb-review/SKILL.md` procedure on every newly opened or un-drafted PR. Produces inline comments per finding and one summary comment with a verdict. Skips draft PRs. No turn limit.
### Interactive (`claude.yml`)
Responds to `@claude` mentions on PRs and issues. The trigger phrase is stripped before Claude sees the message, so:
- `@claude review` → light review using `gh pr diff` (not the umb-review skill)
- `@claude fix ...` → implements a fix on a new branch
- `@claude help` → answers questions about the codebase
- `@claude label` → applies labels
- `@claude` (empty) → defaults to `review` on PRs, `help` on issues
Also triggers on issue assignment to `claude` or adding the `claude` label. Gated: only runs when `@claude` appears in the comment/issue body. Max 25 turns.
**On Issues** (based on content): same `area/*` and `category/*` labels, plus `affected/v14` through `affected/v17` and `affected/backoffice`.
Labels are only added, never removed. Claude applies only labels it is confident about.
### Key Implementation Notes
- **Checkout required** — the action internally runs `git fetch origin main` for trusted file restoration. Without `actions/checkout`, it fails with `fatal: not a git repository`.
- **`id-token: write` permission** — required for OIDC token exchange with the Claude GitHub App.
- **Trigger phrase stripping** — the action strips `@claude` from comments before passing to Claude. Prompts must reference commands without the prefix (e.g., `review` not `@claude review`).
- **PR number injection** — the interactive workflow injects the PR/issue number into the prompt via `${{ github.event.issue.number }}` since Claude can't discover it from `gh pr view` when checked out on `main`.
---
## 8. Code Comment Policy
**Default to no comment.** Applies to all code in this repository — C#, TypeScript, Razor, build scripts. Well-named identifiers and small functions are the primary form of self-documentation; comments are a fallback for the rare cases where the code itself cannot carry the meaning.
### When NOT to comment
- **Don't restate what the code does.** A line calling `resetState()` does not need `// Reset state`. A method named `validateInput` does not need `// Validate input`.
- **Don't narrate a sequence of calls.** If three lines run in order, the order is in the code — don't paraphrase it above.
- **Don't reference the current task, fix, callers, or PR.** No `// Fix for X`, `// Used by Y`, `// Added for the Z flow`, `// See PR #1234`. That belongs in commit messages and PR descriptions; in source it rots as the codebase evolves.
### When a comment IS justified
Write a comment only when **removing it would leave a future reader confused**. Concretely:
- **A non-obvious WHY.** A hidden constraint, business rule, or ordering requirement that is not visible from the code.
- **A workaround for a specific bug or platform quirk.** Link the issue (`(#21996)`, `https://...`) so the comment can be deleted once the upstream fix lands.
- **A subtle invariant** that the type system or method names do not enforce.
- **An edge case the code intentionally handles** that would surprise a reader (e.g. "must run before X because Y").
- **API documentation** — XML doc comments on C# members, JSDoc on exported TypeScript symbols. Required for the public contract; still keep them concise.
### TODOs
Allowed, but cheap to write and cheaper to leave behind. Keep them short and trackable: `// TODO (V19): remove once obsolete overload is gone` or `// TODO: pagination [NL]`. A TODO should have an author or a version trigger.
---
## 9. Testing Practices
### Tests for a bug fix must fail before the fix
Verify any test you add for a bug fix actually catches the bug: either write the failing test first (TDD), or temporarily revert the production change and confirm the test fails before re-applying. A test that passes both ways proves nothing. Watch for coincidental passes — default seed/sort orders can make a buggy path produce the right answer for the test's specific inputs; construct inputs so the broken and fixed behaviours give visibly different results.
For integration tests that exercise caching or cache refreshers, see `tests/Umbraco.Tests.Integration/CLAUDE.md` — the harness disables caching by default, which can produce false greens.
---
## Quick Reference
### Essential Commands
```bash
# Build solution
dotnet build
# Run all tests
dotnet test
# Run specific test category
dotnet test --filter "Category=Integration"
# Format code
dotnet format
# Pack all projects
dotnet pack -c Release
```
### Integration Test Database Configuration
Integration tests are configured in `tests/Umbraco.Tests.Integration/appsettings.Tests.json`.
The `Tests:Database:DatabaseType` setting controls which database is used:
- `"SQLite"` (default) - No external dependencies
- `"LocalDb"` - Uses SQL Server LocalDB, required for SQL Server-specific tests (e.g., page-level locking, `sys.dm_tran_locks`)
SQL Server-specific tests use `BaseTestDatabase.IsSqlite()` to skip when running on SQLite.
**Important**: When working on backoffice client code (anything under `src/Umbraco.Web.UI.Client/`), read `/src/Umbraco.Web.UI.Client/CLAUDE.md` first. It contains action-specific checklists (deprecation, testing, security, etc.) that are not duplicated here.
**This repository follows a layered architecture with strict dependency rules. The Core defines contracts, Infrastructure implements them, and Web/APIs consume them. Each layer can be understood independently, but dependencies always flow inward toward Core.**
<!-- OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer brings in a vulnerable version of Microsoft.IdentityModel.JsonWebTokens -->
<!-- Take top-level depedendency on Microsoft.IdentityModel.JsonWebTokens, because OpenIddict.AspNetCore, Npoco.SqlServer and Microsoft.EntityFrameworkCore.SqlServer depends on a vulnerable version -->
<!-- Azure.Identity, Microsoft.EntityFrameworkCore.SqlServer and Dazinator.Extensions.FileProviders brings in a legacy version of System.Text.Encodings.Web -->
This repository includes configuration for [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) servers, enabling AI tooling integration for Umbraco CMS development workflows.
## Overview
MCP allows AI assistants (like Claude) to interact with external tools and services. This repository configures two MCP servers:
| Server | Purpose | Package |
|--------|---------|---------|
| **umbraco-cms** | Manage Umbraco content types, documents, and media | `@umbraco-cms/mcp-dev@17` |
| **playwright** | Browser automation for testing and debugging | `@playwright/mcp@latest` |
## Quick Start
### 1. Start Umbraco Locally
Ensure your local Umbraco instance is running at `https://localhost:44339` (or update the URL in your `.env.local`).
### 2. Configure Environment Variables
Copy the example environment file and customize it:
> **Warning**: This configuration is for **local development only**.
### Self-Signed Certificates
`NODE_TLS_REJECT_UNAUTHORIZED=0` disables SSL certificate validation. This is necessary for self-signed certificates in local development but:
- **Never use in production**
- Affects all HTTPS connections made by Node.js processes
- Consider trusting your local development certificate instead
### Client Secrets
- Never commit real secrets to source control
- The `.env.local` file is gitignored for this reason
- Use strong, unique secrets even in development
- The example value `1234567890` in `.env.example` is a placeholder only
## File Structure
```
Umbraco-CMS/
├── .mcp.json # MCP server configuration
├── .env.example # Example environment variables (committed)
├── .env.local # Your local environment variables (gitignored)
├── .claude/
│ ├── settings.json # Shared Claude AI permissions (committed)
│ └── settings.local.json # Local Claude overrides (gitignored)
├── .gitignore # Ignores .env.local and settings.local.json
└── MCP.md # This documentation (you are here)
```
## Claude AI Permissions
The `.claude/settings.json` file configures which MCP tools Claude can use automatically without prompting. This is shared across the team for consistent developer experience.
### Customizing Permissions Locally
Create `.claude/settings.local.json` to override permissions for your environment:
```json
{
"permissions":{
"allow":[
"mcp__umbraco__get-all-document-types"
]
}
}
```
## Troubleshooting
### "Connection refused" errors
- Ensure Umbraco is running at the configured `UMBRACO_BASE_URL`
- Check that the port matches your local setup
### "Unauthorized" errors
- Verify the OAuth client is configured in Umbraco
- Check that `UMBRACO_CLIENT_ID` and `UMBRACO_CLIENT_SECRET` match
- Ensure the client has appropriate permissions
### "Certificate" errors
- For local development, set `NODE_TLS_REJECT_UNAUTHORIZED=0` in `.env.local`
- Alternatively, trust your local development certificate
### MCP server not starting
- Ensure Node.js is installed (v22+ recommended, matching .nvmrc)
- Run `npx @umbraco-cms/mcp-dev@17 --help` to verify the package works
# Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure and the ManagementApi namespace
# Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace
# Filter tests that are not part of the Umbraco.Infrastructure namespace. So this will run all tests that are not part of the Umbraco.Infrastructure namespace
# Filter tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace. So this will run all tests that are not part of the Umbraco.Infrastructure and ManagementApi namespace
while (($status -ne 'running') -and ($attempt -lt $maxAttempts)) {
Start-Sleep -Seconds 5
# We use the docker inspect command to check the status of the container. If the container is not running, we wait 5 seconds and try again. And if reaches 12 attempts, we fail the build.
**Configuration**: `BackOfficeTokenCookieSettings.Enabled` (default: true in v17+)
**Implications**: Client-side cannot access tokens; encrypted with Data Protection; load balancing needs shared key ring; API requests need `credentials: include`
---
## 6. Common Issues & Edge Cases
### Polymorphic Deserialization Requires `$type`
**Issue**: Deserializing to an interface without `$type` discriminator fails.
**This library is the foundation for all Umbraco CMS REST APIs. Focus on OpenAPI customization, authentication configuration, and polymorphic serialization when working here.**
=>$"{apiDesc.GroupName}_{apiDesc.ActionDescriptor.AttributeRouteInfo?.Template ?? apiDesc.ActionDescriptor.RouteValues["controller"]}_{(apiDesc.ActionDescriptor.RouteValues.TryGetValue("action", out var action) ? action : null)}_{apiDesc.HttpMethod}";
// IMPORTANT: the handler must be AFTER the built-in query string handler, because the client-side SignalR library sometimes appends access tokens to the query string.
/// Defines a selector for choosing sub-types from registered handlers.
/// </summary>
publicinterfaceISubTypesSelector
{
/// <summary>
/// Selects sub-types for the specified type for polymorphic OpenAPI schema generation.
/// </summary>
/// <param name="type">The type to find sub-types for.</param>
/// <returns>An enumerable of sub-types.</returns>
IEnumerable<Type>SubTypes(Typetype);
}
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.