Service refactoring to "fully" enable segments (#19114)

* Refactor serverside content editing to support all variance combinations

* Fix build errors

* Reintroduce the tests ignored by #19060

---------

Co-authored-by: Mads Rasmussen <madsr@hey.com>
This commit is contained in:
Kenn Jacobsen
2025-04-23 14:54:51 +02:00
committed by GitHub
parent 53b94a8f57
commit 2cf28271cd
46 changed files with 1321 additions and 1028 deletions

View File

@@ -2,9 +2,7 @@
public abstract class ContentEditingModelBase
{
public string? InvariantName { get; set; }
public IEnumerable<PropertyValueModel> InvariantProperties { get; set; } = Array.Empty<PropertyValueModel>();
public IEnumerable<PropertyValueModel> Properties { get; set; } = Array.Empty<PropertyValueModel>();
public IEnumerable<VariantModel> Variants { get; set; } = Array.Empty<VariantModel>();
}

View File

@@ -5,4 +5,8 @@ public class PropertyValueModel
public required string Alias { get; set; }
public required object? Value { get; set; }
public string? Culture { get; set; }
public string? Segment { get; set; }
}

View File

@@ -7,6 +7,4 @@ public class VariantModel
public string? Segment { get; set; }
public required string Name { get; set; }
public required IEnumerable<PropertyValueModel> Properties { get; set; }
}

View File

@@ -8,7 +8,7 @@ public sealed class PropertyValidationContext
public required IEnumerable<string> CulturesBeingValidated { get; init; }
public required IEnumerable<string> SegmentsBeingValidated { get; init; }
public required IEnumerable<string?> SegmentsBeingValidated { get; init; }
public static PropertyValidationContext Empty() => new()
{