Rename IsSharedContent (server-side)

This commit is contained in:
kjac
2026-06-15 12:50:28 +02:00
parent 3774b23516
commit 06bf1a6a13
6 changed files with 20 additions and 21 deletions
@@ -15,7 +15,7 @@ public abstract class BlockLayoutItemBase : IBlockLayoutItem
public Guid? SettingsKey { get; set; }
/// <inheritdoc />
public bool IsSharedContent { get; set; }
public bool IsExternalContent { get; set; }
/// <summary>
/// Initializes a new instance of the <see cref="BlockLayoutItemBase" /> class.
@@ -39,8 +39,7 @@ public interface IBlockLayoutItem
/// <summary>
/// Indicates if the content source is local or originates from the element service.
/// </summary>
// TODO KJA: We need a proper name for this.
public bool IsSharedContent { get; set; }
public bool IsExternalContent { get; set; }
/// <summary>
/// Determines whether this layout item references the specified content key.
@@ -153,7 +153,7 @@ internal abstract class BlockValuePropertyIndexValueFactoryBase<TSerialized> : J
// such, so this "top-level aggregation" of shared content keys works in effect.
Guid[] sharedElementKeys = layoutsAsArray
.Union(layoutsAsArray.SelectMany(l => l.GetContainedLayouts()))
.Where(l => l.IsSharedContent)
.Where(l => l.IsExternalContent)
.Select(l => l.ContentKey)
.ToArray();
@@ -151,7 +151,7 @@ internal abstract class BlockPropertyValueCreatorBase<TBlockModel, TBlockItemMod
{
IPublishedElement? element = null;
BlockItemData? data = null;
if (layout.IsSharedContent)
if (layout.IsExternalContent)
{
element = await _elementCacheService.GetByKeyAsync(layout.ContentKey, preview);
@@ -181,7 +181,7 @@ internal abstract class BlockPropertyValueCreatorBase<TBlockModel, TBlockItemMod
: null;
string? resolvedCulture = null;
if (layout.IsSharedContent is false)
if (layout.IsExternalContent is false)
{
Fallback fallback = _propertyRenderingContextAccessor.PropertyRenderingContext?.Fallback ?? default;
if (BlockExposeFallbackHelper.IsBlockExposed(expose, element.Key, expectedBlockVariationCulture, expectedBlockVariationSegment, fallback, languagesByIsoCode, defaultIsoCode, out resolvedCulture) is false)
@@ -33,7 +33,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
{
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -85,9 +85,9 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
{
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true },
]
},
},
@@ -142,7 +142,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
{
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = reusableElementKey, SettingsKey = localElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, SettingsKey = localElementKey, IsExternalContent = true }
]
},
},
@@ -219,7 +219,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = localElementKey },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -299,7 +299,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = localElementKey, SettingsKey = settingsForLocalElementKey },
new BlockListLayoutItem { ContentKey = reusableElementKey, SettingsKey = settingsForReusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, SettingsKey = settingsForReusableElementKey, IsExternalContent = true }
]
},
},
@@ -415,7 +415,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = localElementKey },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -447,7 +447,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = localElementKey },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -535,7 +535,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = localElementKey },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -625,7 +625,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = localElementKey },
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -729,7 +729,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
{
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -800,7 +800,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
{
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -863,7 +863,7 @@ internal class BlockListWithReusableContentTest : BlockEditorWithReusableContent
{
Constants.PropertyEditors.Aliases.BlockList,
[
new BlockListLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new BlockListLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},
@@ -36,7 +36,7 @@ internal class RichTextEditorWithReusableContentTests : BlockEditorWithReusableC
{
{
Constants.PropertyEditors.Aliases.RichText, [
new RichTextBlockLayoutItem { ContentKey = reusableElementKey, IsSharedContent = true }
new RichTextBlockLayoutItem { ContentKey = reusableElementKey, IsExternalContent = true }
]
},
},