From c5b4571cd516f54f5139f183322e98177c314379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Fri, 3 Oct 2025 09:59:07 +0200 Subject: [PATCH] Shared status: improve for segmented scenario (#20354) * improve shared status messages * Update src/Umbraco.Web.UI.Client/src/packages/core/property/components/property/property.context.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../property/components/property/property.context.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property/components/property/property.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property/components/property/property.context.ts index d2cc504675..0fe89b19f7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property/components/property/property.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property/components/property/property.context.ts @@ -183,15 +183,23 @@ export class UmbPropertyContext extends UmbContextBase { // TODO: Do not use the content variant id, but know wether the property is configured to vary by segment. // Because we can view a default segment, then we do not know if the property is shared or not. [NL] if (contextVariantId.segment !== null && propertyVariantId.segment === null) { - if (contextVariantId.culture !== null) { + // If the property does not have culture, then we know this also will be shared across cultures. + if (propertyVariantId.culture === null) { shareMessage = 'content_sharedAcrossCultures'; } else { + // If not, then we know it will be only be shared across segments. shareMessage = 'content_sharedAcrossSegments'; } } // TODO: Do not use the content variant id, but know wether the property is configured to vary by culture. (this is first a problem when we introduce the invariant-variant) if (contextVariantId.culture !== null && propertyVariantId.culture === null) { - shareMessage = 'content_shared'; + // If the property does have segment, then we know this will be shared across cultures and not across segments. + if (propertyVariantId.segment !== null) { + shareMessage = 'content_sharedAcrossCultures'; + } else { + // if not then we know it's shared across everything. + shareMessage = 'content_shared'; + } } } this.#variantDifference.setValue(shareMessage);