adds deprecation notices to AllowNonExistingSegmentsCreation

This commit is contained in:
Jacob Overgaard
2025-10-08 09:17:55 +02:00
parent adf8708987
commit edf95e6fab
3 changed files with 11 additions and 0 deletions

View File

@@ -8,5 +8,6 @@ public class DocumentConfigurationResponseModel
public required bool AllowEditInvariantFromNonDefault { get; set; }
[Obsolete("This functionality will be moved to a client-side extension. Scheduled for removal in V19.")]
public required bool AllowNonExistingSegmentsCreation { get; set; }
}

View File

@@ -19,5 +19,6 @@ public class SegmentSettings
/// <summary>
/// Gets or sets a value indicating whether the creation of non-existing segments is allowed.
/// </summary>
[Obsolete("This functionality will be moved to a client-side extension. Scheduled for removal in V19.")]
public bool AllowCreation { get; set; } = StaticAllowCreation;
}

View File

@@ -96,6 +96,15 @@ export class UmbDocumentWorkspaceContext
const allowSegmentCreation = config?.allowNonExistingSegmentsCreation ?? false;
const allowEditInvariantFromNonDefault = config?.allowEditInvariantFromNonDefault ?? true;
// Deprecation warning for allowNonExistingSegmentsCreation (default from server is true, so we warn on false)
if (!allowSegmentCreation) {
new UmbDeprecation({
deprecated: 'The "AllowNonExistingSegmentsCreation" setting is deprecated.',
removeInVersion: '19.0.0',
solution: 'This functionality will be moved to a client-side extension.',
}).warn();
}
this._variantOptionsFilter = (variantOption) => {
const isNotCreatedSegmentVariant = variantOption.segment && !variantOption.variant;