Skip to content

Conversation

@kjac
Copy link
Contributor

@kjac kjac commented Sep 29, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

Description

As-is, segments are very "binary" at document level, very much akin to how languages work. If you have created a segmented version of a document, you must fill in every single property. This makes segments quite an editorial burden - unless you're using Engage or have created your own fallback handling for empty values.

Moving forward, we want to perceive segments more as an optional enrichment rather than this "binary" thing. In other words, want the output for segmented properties to perform an explicit fallback to the default segment, if they do not have any value.

As it happens, this very much aligns with how Engage works.

This applies both to templated rendering and to the Delivery API, which means we're going to roll back this PR (the rollback is included here).

This PR is somewhat related to #20012 (but they are two separate features, and can be merged independently).

Breaking change?

While this is not breaking at source level, this is a change in behaviour, so I have marked the PR as breaking.

Testing this PR

Verify that segmented properties perform fallback to the default segment (no segment) - both for culture variant and culture invariant documents.

Test this both using the Delivery API and templated rendering.

@kjac kjac marked this pull request as ready for review September 30, 2025 04:24
Copy link
Contributor

@AndyButland AndyButland 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 to me but just had one comment to consider. Meantime I'll pull it locally to test.

@AndyButland AndyButland changed the title Property level default segment fallback Segments: Property level default segment fallback Sep 30, 2025
Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

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

Tested with delivery API and templating, and works as expected. Approving but I'll just leave you to consider if you want to apply the minor refactoring I suggested.

@kjac kjac merged commit 07203b7 into v17/dev Sep 30, 2025
24 of 25 checks passed
@kjac kjac deleted the v17/feature/segment-property-fallback branch September 30, 2025 06:45
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