Skip to content

Conversation

@nielslyngsoe
Copy link
Member

@nielslyngsoe nielslyngsoe commented Oct 2, 2025

Fixes issue where variant inner values of invariant properties(Block Level Variants) does not trigger a Variant-Entry to be made.

As well improves the logic that ensures Variant Entries, so it distributes the knowledge to Variants that matches the values being entered.

This means when editing a Segmented fields (Shared across cultures) then the Matching variant on all Cultures will get a Variant-Entry and appear as something that has data (Not greyed out)

image

Same for Culture-varying fields, they would match all Segment-Variants on same culture.

As well hint/validation-badges has been updated to work for Segment-Variants:

image

Copilot AI review requested due to automatic review settings October 2, 2025 21:13
@nielslyngsoe nielslyngsoe enabled auto-merge (squash) October 2, 2025 21:13
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

Enhances the variant handling for segmented fields so that matching variants across cultures/segments get variant entries and correct hint/validation badges. Introduces a flat-mapper to traverse nested property values (e.g., blocks) to determine required variant entries.

  • Ensures variant entries are created across matching cultures/segments based on entered values.
  • Adds a Property Value Flat Mapper with tests and updates manifests to use forEditorAlias for resolvers.
  • Improves UI badges and variant selector hints; minor performance tweak in block list editor updates.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/Umbraco.Web.UI/Umbraco.Web.UI.sln Adds a nested solution file for Umbraco.Web.UI.
src/Umbraco.Web.UI/Segments.cs Adds a custom ISegmentService override and composer; returns a paged list of sample segments.
workspace-split-view-variant-selector.element.ts Adds sub-variant hint propagation and renders badges inline; minor refactor with isExpanded.
property-value-resolver/types.ts Extends resolver API type with optional manifest; imports resolver manifest type.
property-value-flat-mapper.controller.ts New controller to flatten/map nested property values via registered resolvers.
property-value-flat-mapper.controller.test.ts Tests for the flat-mapper controller and resolver wiring.
property-value-flat-mapper/index.ts Barrel export for the flat-mapper controller.
core/property/index.ts Exposes the flat-mapper from the property package.
badge.element.ts Adds inline-mode styling; adjusts anchor usage for badge positioning.
content-detail-workspace-base.ts Ensures variants exist across cultures/segments based on inner values; fixes language variant lookup; typing clean-up.
content-data-manager.ts Adds ensureVariantsData to batch-ensure variant scaffold entries.
block-list property editor files Avoids redundant value sets using jsonStringComparison; updates manifests to forEditorAlias.
block-grid property editor files Updates manifests to forEditorAlias.

@nielslyngsoe nielslyngsoe merged commit d45a8f2 into v17/dev Oct 3, 2025
26 of 27 checks passed
@nielslyngsoe nielslyngsoe deleted the v17/bugfix/ensures-variants-based-on-block-level-variants branch October 3, 2025 07:58
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