Skip to content

Conversation

@nielslyngsoe
Copy link
Member

Fixes to Document Input gets the right variant name, not just the item.name.

Fixes both in Property Editor and in User Workspace — same code in both cases.

This problem:
image

Copilot AI review requested due to automatic review settings November 17, 2025 10:11
Copilot finished reviewing on behalf of nielslyngsoe November 17, 2025 10:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where document inputs were displaying the wrong variant name by implementing variant-aware name resolution using the UmbDocumentItemDataResolver.

Key Changes:

  • Introduced a protected _requestItemName() method in UmbPickerInputContext that can be overridden by subclasses to customize how item names are resolved
  • Overrode this method in UmbDocumentPickerInputContext to use UmbDocumentItemDataResolver for variant-aware name resolution
  • Added helper methods getSelectedItems() and getSelectedItemByUnique() to the base picker context for accessing selected item data

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Umbraco.Web.UI.Client/src/packages/documents/documents/components/input-document/input-document.context.ts Implements variant-aware name resolution by overriding _requestItemName() to use UmbDocumentItemDataResolver
src/Umbraco.Web.UI.Client/src/packages/core/picker-input/picker-input.context.ts Refactors remove item confirmation to use new extensible _requestItemName() method and adds helper methods for accessing selected items

Copy link
Contributor

@andr317c andr317c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, tests good 💪

@nielslyngsoe nielslyngsoe enabled auto-merge (squash) November 17, 2025 11:25
@nielslyngsoe nielslyngsoe merged commit 08990b9 into release/17.0 Nov 17, 2025
24 checks passed
@nielslyngsoe nielslyngsoe deleted the v17/hotfix/document-input-name-resolver branch November 17, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants