Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/Umbraco.Core/Constants-PropertyEditors.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.ComponentModel;
using Umbraco.Cms.Core.PropertyEditors;

namespace Umbraco.Cms.Core;
Expand Down Expand Up @@ -44,7 +43,6 @@ public static class Aliases
/// <summary>
/// Block Grid.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4
public const string BlockGrid = "Umbraco.BlockGrid";

/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Umbraco.Core/Models/Blocks/BlockGridArea.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.

using System.ComponentModel;
using System.Runtime.Serialization;

namespace Umbraco.Cms.Core.Models.Blocks;

[DataContract(Name = "area", Namespace = "")]
[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4
public class BlockGridArea : BlockModelCollection<BlockGridItem>
{
/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Umbraco.Core/Models/Blocks/BlockGridItem.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.

using System.ComponentModel;
using System.Runtime.Serialization;
using Umbraco.Cms.Core.Models.PublishedContent;

Expand All @@ -12,7 +11,6 @@ namespace Umbraco.Cms.Core.Models.Blocks
/// </summary>
/// <seealso cref="IBlockReference{TContent,TSettings}" />
[DataContract(Name = "block", Namespace = "")]
[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4
public class BlockGridItem : IBlockReference<IPublishedElement, IPublishedElement>
{
/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions src/Umbraco.Core/Models/Blocks/BlockGridModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// See LICENSE for more details.

using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace Umbraco.Cms.Core.Models.Blocks;
Expand All @@ -12,7 +11,6 @@ namespace Umbraco.Cms.Core.Models.Blocks;
/// </summary>
/// <seealso cref="ReadOnlyCollection{BlockGridItem}" />
[DataContract(Name = "blockgrid", Namespace = "")]
[EditorBrowsable(EditorBrowsableState.Never)] // TODO: Remove this for V11/V10.4
public class BlockGridModel : BlockModelCollection<BlockGridItem>
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.

using System.ComponentModel;
using Newtonsoft.Json.Linq;
using Umbraco.Cms.Core.Serialization;

Expand All @@ -10,7 +9,6 @@ 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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System.ComponentModel;
using Newtonsoft.Json;
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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.

using System.ComponentModel;
using Newtonsoft.Json;
using Umbraco.Cms.Infrastructure.Serialization;

Expand All @@ -10,7 +9,6 @@ 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)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
// 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;

/// <summary>
/// Represents a block list property editor.
/// </summary>
// 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)]
[DataEditor(
Constants.PropertyEditors.Aliases.BlockGrid,
"Block Grid",
"blockgrid",
ValueType = ValueTypes.Json,
Group = Constants.PropertyEditors.Groups.RichContent,
Icon = "icon-layout")]
public class BlockGridPropertyEditor : BlockGridPropertyEditorBase
{
private readonly IIOHelper _ioHelper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// 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;
Expand All @@ -18,9 +16,7 @@ namespace Umbraco.Cms.Core.PropertyEditors;

/// <summary>
/// Abstract base class for block grid based editors.
// /// </summary>
[HideFromTypeFinder]
[EditorBrowsable(EditorBrowsableState.Never)]
/// </summary>
public abstract class BlockGridPropertyEditorBase : DataEditor
{
protected BlockGridPropertyEditorBase(IDataValueEditorFactory dataValueEditorFactory)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.

using System.ComponentModel;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
using Umbraco.Cms.Core.Models.Blocks;
using Umbraco.Cms.Core.Models.PublishedContent;

namespace Umbraco.Extensions;

[EditorBrowsable(EditorBrowsableState.Never)]
public static class BlockGridTemplateExtensions
{
public const string DefaultFolder = "blockgrid/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ public void Resolves_Types()
public void GetDataEditors()
{
var types = _typeLoader.GetDataEditors();
// TODO: Increase this to 42 when BlockGridEditor is re-added
Assert.AreEqual(41, types.Count());
Assert.AreEqual(42, types.Count());
}

/// <summary>
Expand Down