From 1a0983f0c779c0d9ddab0dc69385f85fed279f5e Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Mon, 28 Nov 2022 11:15:48 +0100 Subject: [PATCH 1/7] update marketplace url to its final, live url --- src/Umbraco.Core/Constants-Marketplace.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Constants-Marketplace.cs b/src/Umbraco.Core/Constants-Marketplace.cs index 6d5abb38e7..38cf282b74 100644 --- a/src/Umbraco.Core/Constants-Marketplace.cs +++ b/src/Umbraco.Core/Constants-Marketplace.cs @@ -7,6 +7,6 @@ public static partial class Constants /// public static class Marketplace { - public const string Url = "https://dev.marketplace.umbraco.com"; + public const string Url = "https://marketplace.umbraco.com"; } } From 493e93cc89dc67ad339d67676e318a5f12078355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corn=C3=A9=20Hoskam?= Date: Mon, 28 Nov 2022 14:54:03 +0100 Subject: [PATCH 2/7] Added various Block Grid translations (EN & NL) (#13488) * Added various translations * Added another translation * Change request --- .../EmbeddedResources/Lang/en.xml | 2 +- .../EmbeddedResources/Lang/en_us.xml | 2 +- .../EmbeddedResources/Lang/nl.xml | 32 +++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml index 26e94c0f24..f71307e7c5 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml @@ -2781,7 +2781,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Allow in root Make this block available in the root of the layout. Allow in areas - Make this block available within other Blocks. + Make this block available by default within the areas of other Blocks (unless explicit permissions are set for these areas). When empty all Blocks allowed for Areas can be created. Areas Grid Columns for Areas diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml index 160b2416e1..b7b119bfd0 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml @@ -2884,7 +2884,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont Allow in root Make this block available in the root of the layout. Allow in areas - Make this block available within other Blocks. + Make this block available by default within the areas of other Blocks (unless explicit permissions are set for these areas). When empty all Blocks allowed for Areas can be created. Areas Grid Columns for Areas diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml b/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml index e19ef083e5..b2cbb5bda0 100644 --- a/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml +++ b/src/Umbraco.Core/EmbeddedResources/Lang/nl.xml @@ -2520,6 +2520,38 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je Eigenschap '%0%' gebruikt editor '%1%' die niet ondersteund wordt in blokken. + Geef focus aan het container blok + Identificatie + Validatie + %0% moet minimaal %2% keer aanwezig zijn.]]> + %0%mag maximaal %3% keer aanwezig zijn.]]> + Hoeveelheid blokken + Sta alleen specifiek bloktype toe + Toegestane bloktypes + Definieer de type blokken die zijn toegestaan in dit gebied, en optioneel hoeveel van ieder type aanwezig moet zijn. + Weet je zeker dat je dit gebied wilt verwijderen? + Alle blokken op dit moment aangemaakt binnen dit gebied zullen worden verwijderd. + Lay-out opties + Structuur + Afmetingen + Definiëer een of meer afmetingen, dit maakt het mogelijk blokken te vergroten/verkleinen + Beschikbare kolommen + Definieer de verschillende aantal kolombreedtes dat dit blok mag in nemen. Dit voorkomt niet dat blokken in gebieden met kleine kolombreedtes kan worden geplaatst. + Beschikbare rijen + Definiëer de verschillende aantal rijen dat dit blok mag innemen. + Sta toe in root + Maak dit blok beschikbaar in de root van de lay-out + Sta toe in gebieden + Blok + Blokken + Instellingen + Maak dit blok standaard beschikbaar binnen de gebieden van andere blokken (behalve wanneer expliciete rechten zijn gezet voor deze gebieden). + Gebieden + Gebieden + Geadvanceerd + Rechten + Configureer gebied + Verwijder gebied Wat zijn Inhoudssjablonen? From e45ed3d7f1443c5c32916eeacbd77557291e085c Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Mon, 28 Nov 2022 19:16:19 +0100 Subject: [PATCH 3/7] Revert breaking changes adding IContextCache to deploy connectors (#13489) * Remove breaking changes in Deploy connector interfaces * Add extension methods for calling the new interface methods in a backwards-compatible way --- ...ataTypeConfigurationConnectorExtensions.cs | 48 ++++++++++++++++ .../Deploy/IDataTypeConfigurationConnector.cs | 32 ++--------- .../IDataTypeConfigurationConnector2.cs | 56 +++++++++++++++++++ src/Umbraco.Core/Deploy/IServiceConnector.cs | 30 ++-------- src/Umbraco.Core/Deploy/IServiceConnector2.cs | 38 +++++++++++++ src/Umbraco.Core/Deploy/IValueConnector.cs | 34 ++--------- src/Umbraco.Core/Deploy/IValueConnector2.cs | 44 +++++++++++++++ .../Deploy/ServiceConnectorExtensions.cs | 44 +++++++++++++++ .../Deploy/ValueConnectorExtensions.cs | 50 +++++++++++++++++ .../GridCellValueConnectorExtensions.cs | 51 +++++++++++++++++ .../Deploy/IGridCellValueConnector.cs | 33 ++--------- .../Deploy/IGridCellValueConnector2.cs | 42 ++++++++++++++ .../Umbraco.Core/CoreThings/UdiTests.cs | 2 +- 13 files changed, 390 insertions(+), 114 deletions(-) create mode 100644 src/Umbraco.Core/Deploy/DataTypeConfigurationConnectorExtensions.cs create mode 100644 src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector2.cs create mode 100644 src/Umbraco.Core/Deploy/IServiceConnector2.cs create mode 100644 src/Umbraco.Core/Deploy/IValueConnector2.cs create mode 100644 src/Umbraco.Core/Deploy/ServiceConnectorExtensions.cs create mode 100644 src/Umbraco.Core/Deploy/ValueConnectorExtensions.cs create mode 100644 src/Umbraco.Infrastructure/Deploy/GridCellValueConnectorExtensions.cs create mode 100644 src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector2.cs diff --git a/src/Umbraco.Core/Deploy/DataTypeConfigurationConnectorExtensions.cs b/src/Umbraco.Core/Deploy/DataTypeConfigurationConnectorExtensions.cs new file mode 100644 index 0000000000..dbd501d277 --- /dev/null +++ b/src/Umbraco.Core/Deploy/DataTypeConfigurationConnectorExtensions.cs @@ -0,0 +1,48 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// Extension methods adding backwards-compatability between and . +/// +/// +/// These extension methods will be removed in Umbraco 13. +/// +public static class DataTypeConfigurationConnectorExtensions +{ + /// + /// Gets the artifact configuration value corresponding to a data type configuration and gather dependencies. + /// + /// The connector. + /// The data type. + /// The dependencies. + /// The context cache. + /// + /// The artifact configuration value. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static string? ToArtifact(this IDataTypeConfigurationConnector connector, IDataType dataType, ICollection dependencies, IContextCache contextCache) + => connector is IDataTypeConfigurationConnector2 connector2 + ? connector2.ToArtifact(dataType, dependencies, contextCache) + : connector.ToArtifact(dataType, dependencies); + + /// + /// Gets the data type configuration corresponding to an artifact configuration value. + /// + /// The connector. + /// The data type. + /// The artifact configuration value. + /// The context cache. + /// + /// The data type configuration. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static object? FromArtifact(this IDataTypeConfigurationConnector connector, IDataType dataType, string? configuration, IContextCache contextCache) + => connector is IDataTypeConfigurationConnector2 connector2 + ? connector2.FromArtifact(dataType, configuration, contextCache) + : connector.FromArtifact(dataType, configuration); +} diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs index 506d1f5745..36302efd07 100644 --- a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs @@ -27,20 +27,8 @@ public interface IDataTypeConfigurationConnector /// /// The artifact configuration value. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - string? ToArtifact(IDataType dataType, ICollection dependencies) - => ToArtifact(dataType, dependencies, PassThroughCache.Instance); - - /// - /// Gets the artifact configuration value corresponding to a data type configuration and gather dependencies. - /// - /// The data type. - /// The dependencies. - /// The context cache. - /// - /// The artifact configuration value. - /// - string? ToArtifact(IDataType dataType, ICollection dependencies, IContextCache contextCache); + [Obsolete($"Implement {nameof(IDataTypeConfigurationConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? ToArtifact(IDataType dataType, ICollection dependencies); /// /// Gets the data type configuration corresponding to an artifact configuration value. @@ -50,18 +38,6 @@ public interface IDataTypeConfigurationConnector /// /// The data type configuration. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - object? FromArtifact(IDataType dataType, string? configuration) - => FromArtifact(dataType, configuration, PassThroughCache.Instance); - - /// - /// Gets the data type configuration corresponding to an artifact configuration value. - /// - /// The data type. - /// The artifact configuration value. - /// The context cache. - /// - /// The data type configuration. - /// - object? FromArtifact(IDataType dataType, string? configuration, IContextCache contextCache); + [Obsolete($"Implement {nameof(IDataTypeConfigurationConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + object? FromArtifact(IDataType dataType, string? configuration); } diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector2.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector2.cs new file mode 100644 index 0000000000..772bc35dc4 --- /dev/null +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector2.cs @@ -0,0 +1,56 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// +/// This interface will be merged back into and removed in Umbraco 13. +/// +public interface IDataTypeConfigurationConnector2 : IDataTypeConfigurationConnector +{ + /// + /// Gets the artifact configuration value corresponding to a data type configuration and gather dependencies. + /// + /// The data type. + /// The dependencies. + /// + /// The artifact configuration value. + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? IDataTypeConfigurationConnector.ToArtifact(IDataType dataType, ICollection dependencies) + => ToArtifact(dataType, dependencies, PassThroughCache.Instance); + + /// + /// Gets the artifact configuration value corresponding to a data type configuration and gather dependencies. + /// + /// The data type. + /// The dependencies. + /// The context cache. + /// + /// The artifact configuration value. + /// + string? ToArtifact(IDataType dataType, ICollection dependencies, IContextCache contextCache); + + /// + /// Gets the data type configuration corresponding to an artifact configuration value. + /// + /// The data type. + /// The artifact configuration value. + /// + /// The data type configuration. + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + object? IDataTypeConfigurationConnector.FromArtifact(IDataType dataType, string? configuration) + => FromArtifact(dataType, configuration, PassThroughCache.Instance); + + /// + /// Gets the data type configuration corresponding to an artifact configuration value. + /// + /// The data type. + /// The artifact configuration value. + /// The context cache. + /// + /// The data type configuration. + /// + object? FromArtifact(IDataType dataType, string? configuration, IContextCache contextCache); +} diff --git a/src/Umbraco.Core/Deploy/IServiceConnector.cs b/src/Umbraco.Core/Deploy/IServiceConnector.cs index b4f530fb35..adf4c57502 100644 --- a/src/Umbraco.Core/Deploy/IServiceConnector.cs +++ b/src/Umbraco.Core/Deploy/IServiceConnector.cs @@ -15,19 +15,8 @@ public interface IServiceConnector : IDiscoverable /// /// The corresponding artifact, or null. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - IArtifact? GetArtifact(Udi udi) - => GetArtifact(udi, PassThroughCache.Instance); - - /// - /// Gets an artifact. - /// - /// The entity identifier of the artifact. - /// The context cache. - /// - /// The corresponding artifact, or null. - /// - IArtifact? GetArtifact(Udi udi, IContextCache contextCache); + [Obsolete($"Implement {nameof(IServiceConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + IArtifact? GetArtifact(Udi udi); /// /// Gets an artifact. @@ -36,19 +25,8 @@ public interface IServiceConnector : IDiscoverable /// /// The corresponding artifact. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - IArtifact GetArtifact(object entity) - => GetArtifact(entity, PassThroughCache.Instance); - - /// - /// Gets an artifact. - /// - /// The entity. - /// The context cache. - /// - /// The corresponding artifact. - /// - IArtifact GetArtifact(object entity, IContextCache contextCache); + [Obsolete($"Implement {nameof(IServiceConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + IArtifact GetArtifact(object entity); /// /// Initializes processing for an artifact. diff --git a/src/Umbraco.Core/Deploy/IServiceConnector2.cs b/src/Umbraco.Core/Deploy/IServiceConnector2.cs new file mode 100644 index 0000000000..6c1558a956 --- /dev/null +++ b/src/Umbraco.Core/Deploy/IServiceConnector2.cs @@ -0,0 +1,38 @@ +namespace Umbraco.Cms.Core.Deploy; + +/// +/// +/// This interface will be merged back into and removed in Umbraco 13. +/// +public interface IServiceConnector2 : IServiceConnector +{ + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + IArtifact? IServiceConnector.GetArtifact(Udi udi) + => GetArtifact(udi, PassThroughCache.Instance); + + /// + /// Gets an artifact. + /// + /// The entity identifier of the artifact. + /// The context cache. + /// + /// The corresponding artifact, or null. + /// + IArtifact? GetArtifact(Udi udi, IContextCache contextCache); + + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + IArtifact IServiceConnector.GetArtifact(object entity) + => GetArtifact(entity, PassThroughCache.Instance); + + /// + /// Gets an artifact. + /// + /// The entity. + /// The context cache. + /// + /// The corresponding artifact. + /// + IArtifact GetArtifact(object entity, IContextCache contextCache); +} diff --git a/src/Umbraco.Core/Deploy/IValueConnector.cs b/src/Umbraco.Core/Deploy/IValueConnector.cs index 9f3b17f71c..fe28e41017 100644 --- a/src/Umbraco.Core/Deploy/IValueConnector.cs +++ b/src/Umbraco.Core/Deploy/IValueConnector.cs @@ -29,21 +29,8 @@ public interface IValueConnector /// /// The deploy property value. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - string? ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies) - => ToArtifact(value, propertyType, dependencies, PassThroughCache.Instance); - - /// - /// Gets the deploy property value corresponding to a content property value, and gather dependencies. - /// - /// The content property value. - /// The value property type - /// The content dependencies. - /// The context cache. - /// - /// The deploy property value. - /// - string? ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies, IContextCache contextCache); + [Obsolete($"Implement {nameof(IValueConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies); /// /// Gets the content property value corresponding to a deploy property value. @@ -54,19 +41,6 @@ public interface IValueConnector /// /// The content property value. /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - object? FromArtifact(string? value, IPropertyType propertyType, object? currentValue) - => FromArtifact(value, propertyType, currentValue, PassThroughCache.Instance); - - /// - /// Gets the content property value corresponding to a deploy property value. - /// - /// The deploy property value. - /// The value property type - /// The current content property value. - /// The context cache. - /// - /// The content property value. - /// - object? FromArtifact(string? value, IPropertyType propertyType, object? currentValue, IContextCache contextCache); + [Obsolete($"Implement {nameof(IValueConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + object? FromArtifact(string? value, IPropertyType propertyType, object? currentValue); } diff --git a/src/Umbraco.Core/Deploy/IValueConnector2.cs b/src/Umbraco.Core/Deploy/IValueConnector2.cs new file mode 100644 index 0000000000..a0c99dca06 --- /dev/null +++ b/src/Umbraco.Core/Deploy/IValueConnector2.cs @@ -0,0 +1,44 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// +/// This interface will be merged back into and removed in Umbraco 13. +/// +public interface IValueConnector2 : IValueConnector +{ + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? IValueConnector.ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies) + => ToArtifact(value, propertyType, dependencies, PassThroughCache.Instance); + + /// + /// Gets the deploy property value corresponding to a content property value, and gather dependencies. + /// + /// The content property value. + /// The value property type + /// The content dependencies. + /// The context cache. + /// + /// The deploy property value. + /// + string? ToArtifact(object? value, IPropertyType propertyType, ICollection dependencies, IContextCache contextCache); + + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + object? IValueConnector.FromArtifact(string? value, IPropertyType propertyType, object? currentValue) + => FromArtifact(value, propertyType, currentValue, PassThroughCache.Instance); + + /// + /// Gets the content property value corresponding to a deploy property value. + /// + /// The deploy property value. + /// The value property type + /// The current content property value. + /// The context cache. + /// + /// The content property value. + /// + object? FromArtifact(string? value, IPropertyType propertyType, object? currentValue, IContextCache contextCache); +} diff --git a/src/Umbraco.Core/Deploy/ServiceConnectorExtensions.cs b/src/Umbraco.Core/Deploy/ServiceConnectorExtensions.cs new file mode 100644 index 0000000000..0d0000f97c --- /dev/null +++ b/src/Umbraco.Core/Deploy/ServiceConnectorExtensions.cs @@ -0,0 +1,44 @@ +namespace Umbraco.Cms.Core.Deploy; + +/// +/// Extension methods adding backwards-compatability between and . +/// +/// +/// These extension methods will be removed in Umbraco 13. +/// +public static class ServiceConnectorExtensions +{ + /// + /// Gets an artifact. + /// + /// The connector. + /// The entity identifier of the artifact. + /// The context cache. + /// + /// The corresponding artifact, or null. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static IArtifact? GetArtifact(this IServiceConnector connector, Udi udi, IContextCache contextCache) + => connector is IServiceConnector2 connector2 + ? connector2.GetArtifact(udi, contextCache) + : connector.GetArtifact(udi); + + /// + /// Gets an artifact. + /// + /// The connector. + /// The entity. + /// The context cache. + /// + /// The corresponding artifact. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static IArtifact GetArtifact(this IServiceConnector connector, object entity, IContextCache contextCache) + => connector is IServiceConnector2 connector2 + ? connector2.GetArtifact(entity, contextCache) + : connector.GetArtifact(entity); +} diff --git a/src/Umbraco.Core/Deploy/ValueConnectorExtensions.cs b/src/Umbraco.Core/Deploy/ValueConnectorExtensions.cs new file mode 100644 index 0000000000..eadcee55e0 --- /dev/null +++ b/src/Umbraco.Core/Deploy/ValueConnectorExtensions.cs @@ -0,0 +1,50 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// Extension methods adding backwards-compatability between and . +/// +/// +/// These extension methods will be removed in Umbraco 13. +/// +public static class ValueConnectorExtensions +{ + /// + /// Gets the artifact value corresponding to a property value and gather dependencies. + /// + /// The connector. + /// The property value. + /// The property type. + /// The dependencies. + /// The context cache. + /// + /// The artifact value. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static string? ToArtifact(this IValueConnector connector, object? value, IPropertyType propertyType, ICollection dependencies, IContextCache contextCache) + => connector is IValueConnector2 connector2 + ? connector2.ToArtifact(value, propertyType, dependencies, contextCache) + : connector.ToArtifact(value, propertyType, dependencies); + + /// + /// Gets the property value corresponding to an artifact value. + /// + /// The connector. + /// The artifact value. + /// The property type. + /// The current property value. + /// The context cache. + /// + /// The property value. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static object? FromArtifact(this IValueConnector connector, string? value, IPropertyType propertyType, object? currentValue, IContextCache contextCache) + => connector is IValueConnector2 connector2 + ? connector2.FromArtifact(value, propertyType, currentValue, contextCache) + : connector.FromArtifact(value, propertyType, currentValue); +} diff --git a/src/Umbraco.Infrastructure/Deploy/GridCellValueConnectorExtensions.cs b/src/Umbraco.Infrastructure/Deploy/GridCellValueConnectorExtensions.cs new file mode 100644 index 0000000000..fec3c07e3c --- /dev/null +++ b/src/Umbraco.Infrastructure/Deploy/GridCellValueConnectorExtensions.cs @@ -0,0 +1,51 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// Extension methods adding backwards-compatability between and . +/// +/// +/// These extension methods will be removed in Umbraco 13. +/// +public static class GridCellValueConnectorExtensions +{ + /// + /// Gets the value. + /// + /// The connector. + /// The grid control. + /// The dependencies. + /// The context cache. + /// + /// The value. + /// + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static string? GetValue(this IGridCellValueConnector connector, GridValue.GridControl gridControl, ICollection dependencies, IContextCache contextCache) + => connector is IGridCellValueConnector2 connector2 + ? connector2.GetValue(gridControl, dependencies, contextCache) + : connector.GetValue(gridControl, dependencies); + + /// + /// Sets the value. + /// + /// The connector. + /// The grid control. + /// The context cache. + /// + /// This extension method tries to make use of the on types also implementing . + /// + public static void SetValue(this IGridCellValueConnector connector, GridValue.GridControl gridControl, IContextCache contextCache) + { + if (connector is IGridCellValueConnector2 connector2) + { + connector2.SetValue(gridControl, contextCache); + } + else + { + connector.SetValue(gridControl); + } + } +} diff --git a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs index a9ed5fd84d..4395202a56 100644 --- a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs +++ b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs @@ -1,5 +1,4 @@ using Umbraco.Cms.Core.Models; -using static Umbraco.Cms.Core.Models.GridValue; namespace Umbraco.Cms.Core.Deploy; @@ -37,20 +36,8 @@ public interface IGridCellValueConnector /// /// Note that /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - string? GetValue(GridValue.GridControl gridControl, ICollection dependencies) - => GetValue(gridControl, dependencies, PassThroughCache.Instance); - - /// - /// Gets the value to be deployed from the control value as a string. - /// - /// The control containing the value. - /// The dependencies of the property. - /// The context cache. - /// - /// The grid cell value to be deployed. - /// - string? GetValue(GridValue.GridControl gridControl, ICollection dependencies, IContextCache contextCache); + [Obsolete($"Implement {nameof(IGridCellValueConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? GetValue(GridValue.GridControl gridControl, ICollection dependencies); /// /// Allows you to modify the value of a control being deployed. @@ -60,18 +47,6 @@ public interface IGridCellValueConnector /// Follows the pattern of the property value connectors (). /// The SetValue method is used to modify the value of the . /// - [Obsolete("Use the overload accepting IContextCache instead. This overload will be removed in a future version.")] - void SetValue(GridValue.GridControl gridControl) - => SetValue(gridControl, PassThroughCache.Instance); - - /// - /// Allows you to modify the value of a control being deployed. - /// - /// The control being deployed. - /// The context cache. - /// - /// Follows the pattern of the property value connectors (). - /// The SetValue method is used to modify the value of the . - /// - void SetValue(GridValue.GridControl gridControl, IContextCache contextCache); + [Obsolete($"Implement {nameof(IGridCellValueConnector2)} and use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + void SetValue(GridValue.GridControl gridControl); } diff --git a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector2.cs b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector2.cs new file mode 100644 index 0000000000..44a36677e9 --- /dev/null +++ b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector2.cs @@ -0,0 +1,42 @@ +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Deploy; + +/// +/// +/// This interface will be merged back into and removed in Umbraco 13. +/// +public interface IGridCellValueConnector2 : IGridCellValueConnector +{ + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + string? IGridCellValueConnector.GetValue(GridValue.GridControl gridControl, ICollection dependencies) + => GetValue(gridControl, dependencies, PassThroughCache.Instance); + + /// + /// Gets the value to be deployed from the control value as a string. + /// + /// The control containing the value. + /// The dependencies of the property. + /// The context cache. + /// + /// The grid cell value to be deployed. + /// + string? GetValue(GridValue.GridControl gridControl, ICollection dependencies, IContextCache contextCache); + + /// + [Obsolete($"Use the overload accepting {nameof(IContextCache)} instead. This overload will be removed in Umbraco 13.")] + void IGridCellValueConnector.SetValue(GridValue.GridControl gridControl) + => SetValue(gridControl, PassThroughCache.Instance); + + /// + /// Allows you to modify the value of a control being deployed. + /// + /// The control being deployed. + /// The context cache. + /// + /// Follows the pattern of the property value connectors (). + /// The SetValue method is used to modify the value of the . + /// + void SetValue(GridValue.GridControl gridControl, IContextCache contextCache); +} diff --git a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/UdiTests.cs b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/UdiTests.cs index 3cc54f4933..e18993ede1 100644 --- a/tests/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/UdiTests.cs +++ b/tests/Umbraco.Tests.UnitTests/Umbraco.Core/CoreThings/UdiTests.cs @@ -305,7 +305,7 @@ public class UdiTests } [UdiDefinition("foo", UdiType.GuidUdi)] - public class FooConnector : IServiceConnector + public class FooConnector : IServiceConnector2 { public IArtifact GetArtifact(Udi udi, IContextCache contextCache) => throw new NotImplementedException(); From a3361606e087f8960421f1fc6bd5da06da4fac97 Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Mon, 28 Nov 2022 19:48:29 +0100 Subject: [PATCH 4/7] Create and pack empty file to add TFM dependency (#13475) --- src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj | 8 ++++++++ src/Umbraco.Cms/Umbraco.Cms.csproj | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj b/src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj index 056eb09513..922be06acc 100644 --- a/src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj +++ b/src/Umbraco.Cms.Targets/Umbraco.Cms.Targets.csproj @@ -50,4 +50,12 @@ + + + + + + + + diff --git a/src/Umbraco.Cms/Umbraco.Cms.csproj b/src/Umbraco.Cms/Umbraco.Cms.csproj index e1a0e2665c..1ff6e848ad 100644 --- a/src/Umbraco.Cms/Umbraco.Cms.csproj +++ b/src/Umbraco.Cms/Umbraco.Cms.csproj @@ -1,4 +1,4 @@ - + Umbraco CMS Installs Umbraco CMS with all default dependencies in your ASP.NET Core project. @@ -12,4 +12,12 @@ + + + + + + + + From ed67cd887fb2fab86db9eb34d1f5504a805037de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Mon, 28 Nov 2022 19:55:15 +0100 Subject: [PATCH 5/7] Change login image to new SVG. (#13493) --- .../wwwroot/umbraco/assets/img/login.svg | 1 + src/Umbraco.Core/Configuration/Models/ContentSettings.cs | 2 +- src/Umbraco.Web.UI.Client/src/less/pages/login.less | 2 +- src/Umbraco.Web.UI.Client/src/views/errors/BootFailed.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 src/Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/img/login.svg diff --git a/src/Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/img/login.svg b/src/Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/img/login.svg new file mode 100644 index 0000000000..3bd280b4af --- /dev/null +++ b/src/Umbraco.Cms.StaticAssets/wwwroot/umbraco/assets/img/login.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs index 4014930a5c..5a82d860bb 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs @@ -152,7 +152,7 @@ public class ContentSettings internal const string StaticMacroErrors = "Inline"; internal const string StaticDisallowedUploadFiles = "ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,xamlx"; internal const bool StaticShowDeprecatedPropertyEditors = false; - internal const string StaticLoginBackgroundImage = "assets/img/login.jpg"; + internal const string StaticLoginBackgroundImage = "assets/img/login.svg"; internal const string StaticLoginLogoImage = "assets/img/application/umbraco_logo_white.svg"; internal const bool StaticHideBackOfficeLogo = false; internal const bool StaticDisableDeleteWhenReferenced = false; diff --git a/src/Umbraco.Web.UI.Client/src/less/pages/login.less b/src/Umbraco.Web.UI.Client/src/less/pages/login.less index 66fe2e0ae4..74b28dabcb 100644 --- a/src/Umbraco.Web.UI.Client/src/less/pages/login.less +++ b/src/Umbraco.Web.UI.Client/src/less/pages/login.less @@ -20,7 +20,7 @@ background-position: center center; background-repeat: no-repeat; background-size: cover; - background-image: url('../img/login.jpg'); + background-image: url('../img/login.svg'); width: 100%; height: 100%; position: absolute; diff --git a/src/Umbraco.Web.UI.Client/src/views/errors/BootFailed.html b/src/Umbraco.Web.UI.Client/src/views/errors/BootFailed.html index e7aa63eff0..0f13862628 100644 --- a/src/Umbraco.Web.UI.Client/src/views/errors/BootFailed.html +++ b/src/Umbraco.Web.UI.Client/src/views/errors/BootFailed.html @@ -29,7 +29,7 @@ background-repeat: no-repeat; background-size: cover; background-position: 50%; - background-image: url(/umbraco/assets/img/login.jpg); + background-image: url(/umbraco/assets/img/login.svg); margin: 0; padding: 0; font-family: Lato, Helvetica Neue, Helvetica, Arial, sans-serif; From 8c483e8d3b39f3ec76a23fcb54ca37aaaaff21af Mon Sep 17 00:00:00 2001 From: Ronald Barendse Date: Mon, 28 Nov 2022 19:57:36 +0100 Subject: [PATCH 6/7] Only add global usings when ImplicitUsings is enabled (#13491) --- .../buildTransitive/Umbraco.Cms.Targets.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Cms.Targets/buildTransitive/Umbraco.Cms.Targets.props b/src/Umbraco.Cms.Targets/buildTransitive/Umbraco.Cms.Targets.props index 6168686bcb..b79d9f9a4b 100644 --- a/src/Umbraco.Cms.Targets/buildTransitive/Umbraco.Cms.Targets.props +++ b/src/Umbraco.Cms.Targets/buildTransitive/Umbraco.Cms.Targets.props @@ -5,7 +5,7 @@ $(DefaultItemExcludes);umbraco\Logs\** $(DefaultItemExcludes);wwwroot\media\** - + From 082864f5295e2e50a43c0a8ea1cd3776b431e8b0 Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Mon, 28 Nov 2022 19:58:02 +0100 Subject: [PATCH 7/7] bump to rc6 --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index 60cb23262d..7c1db72b53 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "11.0.0-rc5", + "version": "11.0.0-rc6", "assemblyVersion": { "precision": "build" },