Documentation for the StringExtensions refactoring project including
the implementation plan, baseline testing results, file split summary,
benchmark results, performance fixes, and verification summary.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Comprehensive design for splitting the 1,600-line StringExtensions.cs
into 5 focused partial class files with performance optimizations.
Key decisions:
- Partial class approach to prevent breaking changes
- 5 files: Culture, Manipulation, Encoding, Parsing, Sanitization
- Performance fixes for regex caching and char operations
- 4-phase implementation with individual plans and summaries
🤖 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>
* 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: 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