Disable BlockGridEditor (#13229)
* Disable BlockGridEditor * Fix typeloader test * Update src/Umbraco.Core/Models/Blocks/BlockGridItem.cs Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> * Apply suggestions from code review Co-authored-by: Kenn Jacobsen <kja@umbraco.dk> Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System.ComponentModel;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Umbraco.Cms.Core.Serialization;
|
||||
|
||||
@@ -9,6 +10,7 @@ namespace Umbraco.Cms.Core.Models.Blocks;
|
||||
/// <summary>
|
||||
/// Data converter for the block grid property editor
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4
|
||||
public class BlockGridEditorDataConverter : BlockEditorDataConverter
|
||||
{
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Umbraco.Cms.Core.Models.Blocks;
|
||||
|
||||
[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4
|
||||
public class BlockGridLayoutAreaItem
|
||||
{
|
||||
[JsonProperty("key", NullValueHandling = NullValueHandling.Ignore)]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System.ComponentModel;
|
||||
using Newtonsoft.Json;
|
||||
using Umbraco.Cms.Infrastructure.Serialization;
|
||||
|
||||
@@ -9,6 +10,7 @@ namespace Umbraco.Cms.Core.Models.Blocks;
|
||||
/// <summary>
|
||||
/// Used for deserializing the block grid layout
|
||||
/// </summary>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4
|
||||
public class BlockGridLayoutItem : IBlockLayoutItem
|
||||
{
|
||||
[JsonProperty("contentUdi", Required = Required.Always)]
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System.ComponentModel;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Cms.Core.IO;
|
||||
|
||||
namespace Umbraco.Cms.Core.PropertyEditors;
|
||||
@@ -8,13 +10,16 @@ namespace Umbraco.Cms.Core.PropertyEditors;
|
||||
/// <summary>
|
||||
/// Represents a block list property editor.
|
||||
/// </summary>
|
||||
[DataEditor(
|
||||
Constants.PropertyEditors.Aliases.BlockGrid,
|
||||
"Block Grid",
|
||||
"blockgrid",
|
||||
ValueType = ValueTypes.Json,
|
||||
Group = Constants.PropertyEditors.Groups.RichContent,
|
||||
Icon = "icon-layout")]
|
||||
// TODO: Re-add this DataEditor attribute to re-enable the BlockGridEditor for V11/V10.4
|
||||
// [DataEditor(
|
||||
// Constants.PropertyEditors.Aliases.BlockGrid,
|
||||
// "Block Grid",
|
||||
// "blockgrid",
|
||||
// ValueType = ValueTypes.Json,
|
||||
// Group = Constants.PropertyEditors.Groups.RichContent,
|
||||
// Icon = "icon-layout")]
|
||||
[HideFromTypeFinder]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public class BlockGridPropertyEditor : BlockGridPropertyEditorBase
|
||||
{
|
||||
private readonly IIOHelper _ioHelper;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
// Copyright (c) Umbraco.
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Cms.Core.IO;
|
||||
using Umbraco.Cms.Core.Models;
|
||||
using Umbraco.Cms.Core.Models.Blocks;
|
||||
@@ -16,7 +18,9 @@ namespace Umbraco.Cms.Core.PropertyEditors;
|
||||
|
||||
/// <summary>
|
||||
/// Abstract base class for block grid based editors.
|
||||
/// </summary>
|
||||
// /// </summary>
|
||||
[HideFromTypeFinder]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public abstract class BlockGridPropertyEditorBase : DataEditor
|
||||
{
|
||||
protected BlockGridPropertyEditorBase(IDataValueEditorFactory dataValueEditorFactory)
|
||||
|
||||
Reference in New Issue
Block a user