Segments: Property level default segment fallback #20309
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
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.