From 26d11a83141abc5e4d94c24e733cdca768d1a6f1 Mon Sep 17 00:00:00 2001 From: ric <60885685+ricbrady@users.noreply.github.com> Date: Tue, 6 Apr 2021 14:44:49 +0200 Subject: [PATCH 01/28] Fixed copy preserving sort order (#10091) --- .../Services/Implement/ContentService.cs | 10 +++---- .../Services/ContentServiceTests.cs | 26 +++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index e5363d0e2b..d8e99663ea 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -1415,7 +1415,7 @@ namespace Umbraco.Core.Services.Implement var result = CommitDocumentChangesInternal(scope, d, saveEventArgs, allLangs.Value, d.WriterId); if (result.Success == false) - Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); + Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); results.Add(result); } @@ -2201,7 +2201,7 @@ namespace Umbraco.Core.Services.Implement while (page * pageSize < total) { var descendants = GetPagedDescendants(content.Id, page++, pageSize, out total); - foreach (var descendant in descendants) + foreach (var descendant in descendants.OrderBy(x => x.Level).ThenBy(y => y.SortOrder)) { // if parent has not been copied, skip, else gets its copy id if (idmap.TryGetValue(descendant.ParentId, out parentId) == false) continue; @@ -2420,7 +2420,7 @@ namespace Umbraco.Core.Services.Implement if (report.FixedIssues.Count > 0) { //The event args needs a content item so we'll make a fake one with enough properties to not cause a null ref - var root = new Content("root", -1, new ContentType(-1)) {Id = -1, Key = Guid.Empty}; + var root = new Content("root", -1, new ContentType(-1)) { Id = -1, Key = Guid.Empty }; scope.Events.Dispatch(TreeChanged, this, new TreeChange.EventArgs(new TreeChange(root, TreeChangeTypes.RefreshAll))); } @@ -3169,7 +3169,7 @@ namespace Umbraco.Core.Services.Implement if (rollbackSaveResult.Success == false) { //Log the error/warning - Logger.Error("User '{UserId}' was unable to rollback content '{ContentId}' to version '{VersionId}'", userId, id, versionId); + Logger.Error("User '{UserId}' was unable to rollback content '{ContentId}' to version '{VersionId}'", userId, id, versionId); } else { @@ -3178,7 +3178,7 @@ namespace Umbraco.Core.Services.Implement scope.Events.Dispatch(RolledBack, this, rollbackEventArgs); //Logging & Audit message - Logger.Info("User '{UserId}' rolled back content '{ContentId}' to version '{VersionId}'", userId, id, versionId); + Logger.Info("User '{UserId}' rolled back content '{ContentId}' to version '{VersionId}'", userId, id, versionId); Audit(AuditType.RollBack, userId, id, $"Content '{content.Name}' was rolled back to version '{versionId}'"); } diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 008c24fcbf..0faa4af316 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -2082,6 +2082,32 @@ namespace Umbraco.Tests.Services Assert.AreEqual("world", copiedTags[1].Text); } + [Test] + public void Copy_Recursive_Preserves_Sort_Order() + { + // Arrange + var contentService = ServiceContext.ContentService; + var temp = contentService.GetById(NodeDto.NodeIdSeed + 2); + Assert.AreEqual("Home", temp.Name); + Assert.AreEqual(3, contentService.CountChildren(temp.Id)); + var reversedChildren = contentService.GetPagedChildren(temp.Id, 0, 10, out var total1).Reverse().ToArray(); + contentService.Sort(reversedChildren); + + // Act + var copy = contentService.Copy(temp, temp.ParentId, false, true, Constants.Security.SuperUserId); + var content = contentService.GetById(NodeDto.NodeIdSeed + 2); + + // Assert + Assert.That(copy, Is.Not.Null); + Assert.That(copy.Id, Is.Not.EqualTo(content.Id)); + Assert.AreNotSame(content, copy); + Assert.AreEqual(3, contentService.CountChildren(copy.Id)); + + var copiedChildren = contentService.GetPagedChildren(copy.Id, 0, 10, out var total2).OrderBy(c => c.SortOrder).ToArray(); + Assert.AreEqual(reversedChildren.First().Name, copiedChildren.First().Name); + Assert.AreEqual(reversedChildren.Last().Name, copiedChildren.Last().Name); + } + [Test] public void Can_Rollback_Version_On_Content() { From e21cc6f97eb1d49e2f0060186b57680e4ef44a59 Mon Sep 17 00:00:00 2001 From: Rachel Breeze Date: Sat, 10 Apr 2021 01:34:18 +0100 Subject: [PATCH 02/28] Accessibility: Adding label fors and control ids for the macro picker (#10101) * Added support for screeen reader alerts on the embed so that assitive technology knows when a url retrieve has been succesfull. Added labels for the controls Preview reload only triggered if the values for height and width change * Added support for label fors for the macro picker and also gave the ,acro search box a title * Now displays a count of the matching macros returned. Please note the language file amends shared with #10100 * Removed src-only class for the display of the count of messages --- .../macropicker/macropicker.controller.js | 31 +++++++++++++++++-- .../macropicker/macropicker.html | 24 +++++++------- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.controller.js index 40338f2dca..1701553efc 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.controller.js @@ -1,12 +1,13 @@ function MacroPickerController($scope, entityResource, macroResource, umbPropEditorHelper, macroService, formHelper, localizationService) { $scope.macros = []; + $scope.a11yInfo = ""; $scope.model.selectedMacro = null; $scope.model.macroParams = []; - + $scope.displayA11YMessageForFilter = displayA11YMessageForFilter; $scope.wizardStep = "macroSelect"; $scope.noMacroParams = false; - + $scope.model.searchTerm = ""; function onInit() { if (!$scope.model.title) { localizationService.localize("defaultdialogs_selectMacro").then(function (value) { @@ -49,6 +50,7 @@ function MacroPickerController($scope, entityResource, macroResource, umbPropEdi $scope.model.submit($scope.model); } else { $scope.wizardStep = 'macroSelect'; + displayA11yMessages($scope.macros); } } else { @@ -95,6 +97,28 @@ function MacroPickerController($scope, entityResource, macroResource, umbPropEdi }); } + function displayA11yMessages(macros) { + if ($scope.noMacroParams || !macros || macros.length === 0) + localizationService.localize("general_searchNoResult").then(function (value) { + $scope.a11yInfo = value; + }); + else if (macros) { + if (macros.length === 1) { + localizationService.localize("treeSearch_searchResult").then(function(value) { + $scope.a11yInfo = "1 " + value; + }); + } else { + localizationService.localize("treeSearch_searchResults").then(function (value) { + $scope.a11yInfo = macros.length + " " + value; + }); + } + } + } + + function displayA11YMessageForFilter() { + var macros = _.filter($scope.macros, v => v.name.toLowerCase().includes($scope.model.searchTerm.toLowerCase())); + displayA11yMessages(macros); + } //here we check to see if we've been passed a selected macro and if so we'll set the //editor to start with parameter editing if ($scope.model.dialogData && $scope.model.dialogData.macroData) { @@ -141,10 +165,11 @@ function MacroPickerController($scope, entityResource, macroResource, umbPropEdi //we don't have a pre-selected macro so ensure the correct step is set $scope.wizardStep = 'macroSelect'; } + displayA11yMessages($scope.macros); }); onInit(); - + } angular.module("umbraco").controller("Umbraco.Overlays.MacroPickerController", MacroPickerController); diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html index 33d7a471a5..8bda49b328 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/macropicker/macropicker.html @@ -16,18 +16,18 @@
- - + + - +

    -
  • +
+ position="center"> There are no macros available to insert @@ -53,7 +53,7 @@
  • - + From 3b6de9cb9ec3b2b510642379da00a6cea8cb4f3a Mon Sep 17 00:00:00 2001 From: Carole Rennie Logan Date: Fri, 9 Apr 2021 18:43:55 +0100 Subject: [PATCH 03/28] Updating typo --- src/Umbraco.Core/Constants-Security.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Constants-Security.cs b/src/Umbraco.Core/Constants-Security.cs index f900288ef5..2b6244debb 100644 --- a/src/Umbraco.Core/Constants-Security.cs +++ b/src/Umbraco.Core/Constants-Security.cs @@ -25,7 +25,7 @@ namespace Umbraco.Core /// /// The name of the 'unknown' user. /// - public const string UnknownUserName = "SYTEM"; + public const string UnknownUserName = "SYSTEM"; public const string AdminGroupAlias = "admin"; public const string EditorGroupAlias = "editor"; From 4f49e57573ba0739fdbade18fee59465fa1aa5ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20=C3=96hman?= Date: Sun, 11 Apr 2021 16:40:13 +0200 Subject: [PATCH 04/28] Removed top-margin from switcher icon --- .../src/less/components/editor/umb-variant-switcher.less | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/less/components/editor/umb-variant-switcher.less b/src/Umbraco.Web.UI.Client/src/less/components/editor/umb-variant-switcher.less index 9d2782f184..ce9286e5f5 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/editor/umb-variant-switcher.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/editor/umb-variant-switcher.less @@ -69,7 +69,6 @@ button.umb-variant-switcher__toggle { .umb-variant-switcher__expand { color: @ui-action-discreet-type; - margin-top: 3px; margin-left: 5px; margin-right: -5px; transition: color 0.2s ease-in-out; From c8b6841ef16e40670a89ba8a84aa21b2d066e9a3 Mon Sep 17 00:00:00 2001 From: Jeavon Date: Tue, 13 Apr 2021 02:10:44 +0100 Subject: [PATCH 05/28] Allow KeepAlive controller Ping method to be requested by non local requests (#10126) * Allow KeepAlive controller Ping method to be requested by non local requests and accept head requests * removed unused references --- src/Umbraco.Web/Editors/KeepAliveController.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Umbraco.Web/Editors/KeepAliveController.cs b/src/Umbraco.Web/Editors/KeepAliveController.cs index 23815e1bbe..f29ee6c60a 100644 --- a/src/Umbraco.Web/Editors/KeepAliveController.cs +++ b/src/Umbraco.Web/Editors/KeepAliveController.cs @@ -1,14 +1,12 @@ using System.Runtime.Serialization; using System.Web.Http; -using Umbraco.Web.Mvc; using Umbraco.Web.WebApi; -using Umbraco.Web.WebApi.Filters; namespace Umbraco.Web.Editors { public class KeepAliveController : UmbracoApiController { - [OnlyLocalRequests] + [HttpHead] [HttpGet] public KeepAlivePingResult Ping() { From 0dfefb72cb90bb8f2e35a2a78ecbbe17396b6ef1 Mon Sep 17 00:00:00 2001 From: Arkadiusz Biel Date: Sat, 31 Oct 2020 22:09:39 +0000 Subject: [PATCH 06/28] use v8 branch as default for API Docs --- src/ApiDocs/docfx.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ApiDocs/docfx.json b/src/ApiDocs/docfx.json index 76677d45d5..8283b351c4 100644 --- a/src/ApiDocs/docfx.json +++ b/src/ApiDocs/docfx.json @@ -50,6 +50,7 @@ ], "globalMetadata": { "_appTitle": "Umbraco c# Api docs", + "branch": "v8/contrib", "_enableSearch": true, "_disableContribution": false }, From c885831e02a8c2e4b312dec48945ca5d491130a6 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 22 Apr 2021 16:34:11 +0200 Subject: [PATCH 07/28] Revert "use v8 branch as default for API Docs" This reverts commit 0dfefb72cb90bb8f2e35a2a78ecbbe17396b6ef1. --- src/ApiDocs/docfx.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ApiDocs/docfx.json b/src/ApiDocs/docfx.json index 8283b351c4..76677d45d5 100644 --- a/src/ApiDocs/docfx.json +++ b/src/ApiDocs/docfx.json @@ -50,7 +50,6 @@ ], "globalMetadata": { "_appTitle": "Umbraco c# Api docs", - "branch": "v8/contrib", "_enableSearch": true, "_disableContribution": false }, From 22afe5e341372540357ed2380f125e6b1b9e2913 Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 26 Apr 2021 15:40:46 +1000 Subject: [PATCH 08/28] Adds cold boot restart to load test proj --- src/Umbraco.TestData/LoadTestComponent.cs | 35 ++++++++++++++ src/Umbraco.TestData/LoadTestComposer.cs | 29 +++++++++++ src/Umbraco.TestData/LoadTestController.cs | 51 +++++--------------- src/Umbraco.TestData/Umbraco.TestData.csproj | 2 + 4 files changed, 77 insertions(+), 40 deletions(-) create mode 100644 src/Umbraco.TestData/LoadTestComponent.cs create mode 100644 src/Umbraco.TestData/LoadTestComposer.cs diff --git a/src/Umbraco.TestData/LoadTestComponent.cs b/src/Umbraco.TestData/LoadTestComponent.cs new file mode 100644 index 0000000000..97c006520d --- /dev/null +++ b/src/Umbraco.TestData/LoadTestComponent.cs @@ -0,0 +1,35 @@ +using System.Web.Mvc; +using System.Web.Routing; +using Umbraco.Core.Composing; +using System.Configuration; + +// see https://github.com/Shazwazza/UmbracoScripts/tree/master/src/LoadTesting + +namespace Umbraco.TestData +{ + public class LoadTestComponent : IComponent + { + public void Initialize() + { + if (ConfigurationManager.AppSettings["Umbraco.TestData.Enabled"] != "true") + return; + + + + RouteTable.Routes.MapRoute( + name: "LoadTest", + url: "LoadTest/{action}", + defaults: new + { + controller = "LoadTest", + action = "Index" + }, + namespaces: new[] { "Umbraco.TestData" } + ); + } + + public void Terminate() + { + } + } +} diff --git a/src/Umbraco.TestData/LoadTestComposer.cs b/src/Umbraco.TestData/LoadTestComposer.cs new file mode 100644 index 0000000000..2c5e404642 --- /dev/null +++ b/src/Umbraco.TestData/LoadTestComposer.cs @@ -0,0 +1,29 @@ +using Umbraco.Core.Composing; +using System.Configuration; +using Umbraco.Web.PublishedCache.NuCache; + +// see https://github.com/Shazwazza/UmbracoScripts/tree/master/src/LoadTesting + +namespace Umbraco.TestData +{ + public class LoadTestComposer : ComponentComposer, IUserComposer + { + public override void Compose(Composition composition) + { + base.Compose(composition); + + if (ConfigurationManager.AppSettings["Umbraco.TestData.Enabled"] != "true") + return; + + composition.Register(typeof(LoadTestController), Lifetime.Request); + + if (ConfigurationManager.AppSettings["Umbraco.TestData.IgnoreLocalDb"] == "true") + { + composition.Register(factory => new PublishedSnapshotServiceOptions + { + IgnoreLocalDb = true + }); + } + } + } +} diff --git a/src/Umbraco.TestData/LoadTestController.cs b/src/Umbraco.TestData/LoadTestController.cs index 97665dd084..8e1faf56d1 100644 --- a/src/Umbraco.TestData/LoadTestController.cs +++ b/src/Umbraco.TestData/LoadTestController.cs @@ -6,10 +6,9 @@ using Umbraco.Core.Services; using Umbraco.Core.Models; using System.Web; using System.Web.Hosting; -using System.Web.Routing; using System.Diagnostics; -using Umbraco.Core.Composing; -using System.Configuration; +using Umbraco.Core.IO; +using System.IO; // see https://github.com/Shazwazza/UmbracoScripts/tree/master/src/LoadTesting @@ -261,6 +260,15 @@ namespace Umbraco.TestData HttpRuntime.UnloadAppDomain(); } + public ActionResult ColdBootRestart() + { + Directory.Delete(IOHelper.MapPath("~/App_Data/TEMP/DistCache"), true); + + DoRestart(); + + return Content("Cold Boot Restarted."); + } + public ActionResult Restart() { DoRestart(); @@ -331,41 +339,4 @@ namespace Umbraco.TestData return t; } } - - public class TestComponent : IComponent - { - public void Initialize() - { - if (ConfigurationManager.AppSettings["Umbraco.TestData.Enabled"] != "true") - return; - - RouteTable.Routes.MapRoute( - name: "LoadTest", - url: "LoadTest/{action}", - defaults: new - { - controller = "LoadTest", - action = "Index" - }, - namespaces: new[] { "Umbraco.TestData" } - ); - } - - public void Terminate() - { - } - } - - public class TestComposer : ComponentComposer, IUserComposer - { - public override void Compose(Composition composition) - { - base.Compose(composition); - - if (ConfigurationManager.AppSettings["Umbraco.TestData.Enabled"] != "true") - return; - - composition.Register(typeof(LoadTestController), Lifetime.Request); - } - } } diff --git a/src/Umbraco.TestData/Umbraco.TestData.csproj b/src/Umbraco.TestData/Umbraco.TestData.csproj index a3753cc17b..113d209ef4 100644 --- a/src/Umbraco.TestData/Umbraco.TestData.csproj +++ b/src/Umbraco.TestData/Umbraco.TestData.csproj @@ -41,6 +41,8 @@ + + From 4ade2264d2da7ae38112a6aaad6b101c6f56c87e Mon Sep 17 00:00:00 2001 From: Anders Bjerner Date: Thu, 22 Apr 2021 19:25:59 +0200 Subject: [PATCH 09/28] Minor Danish translations --- src/Umbraco.Web.UI/Umbraco/config/lang/da.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml index 39a6fee671..9e564635fa 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/da.xml @@ -804,12 +804,12 @@ Vis genveje Brug listevisning Tillad på rodniveau - Comment/Uncomment lines - Remove line - Copy Lines Up - Copy Lines Down - Move Lines Up - Move Lines Down + Lommentér/Udkommentér linjer + Slet linje + Kopiér linjer op + Kopiér linjer ned + Flyt linjer op + Flyt linjer ned Generelt Editor Skift tillad sprogvarianter From e7a3fd37ce9b00097a45825ed46da692023a94bc Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Tue, 27 Apr 2021 14:57:17 +0200 Subject: [PATCH 10/28] Revert "Fixed copy preserving sort order (#10091)" This reverts commit 26d11a83141abc5e4d94c24e733cdca768d1a6f1. --- .../Services/Implement/ContentService.cs | 10 +++---- .../Services/ContentServiceTests.cs | 26 ------------------- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index d8e99663ea..e5363d0e2b 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -1415,7 +1415,7 @@ namespace Umbraco.Core.Services.Implement var result = CommitDocumentChangesInternal(scope, d, saveEventArgs, allLangs.Value, d.WriterId); if (result.Success == false) - Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); + Logger.Error(null, "Failed to publish document id={DocumentId}, reason={Reason}.", d.Id, result.Result); results.Add(result); } @@ -2201,7 +2201,7 @@ namespace Umbraco.Core.Services.Implement while (page * pageSize < total) { var descendants = GetPagedDescendants(content.Id, page++, pageSize, out total); - foreach (var descendant in descendants.OrderBy(x => x.Level).ThenBy(y => y.SortOrder)) + foreach (var descendant in descendants) { // if parent has not been copied, skip, else gets its copy id if (idmap.TryGetValue(descendant.ParentId, out parentId) == false) continue; @@ -2420,7 +2420,7 @@ namespace Umbraco.Core.Services.Implement if (report.FixedIssues.Count > 0) { //The event args needs a content item so we'll make a fake one with enough properties to not cause a null ref - var root = new Content("root", -1, new ContentType(-1)) { Id = -1, Key = Guid.Empty }; + var root = new Content("root", -1, new ContentType(-1)) {Id = -1, Key = Guid.Empty}; scope.Events.Dispatch(TreeChanged, this, new TreeChange.EventArgs(new TreeChange(root, TreeChangeTypes.RefreshAll))); } @@ -3169,7 +3169,7 @@ namespace Umbraco.Core.Services.Implement if (rollbackSaveResult.Success == false) { //Log the error/warning - Logger.Error("User '{UserId}' was unable to rollback content '{ContentId}' to version '{VersionId}'", userId, id, versionId); + Logger.Error("User '{UserId}' was unable to rollback content '{ContentId}' to version '{VersionId}'", userId, id, versionId); } else { @@ -3178,7 +3178,7 @@ namespace Umbraco.Core.Services.Implement scope.Events.Dispatch(RolledBack, this, rollbackEventArgs); //Logging & Audit message - Logger.Info("User '{UserId}' rolled back content '{ContentId}' to version '{VersionId}'", userId, id, versionId); + Logger.Info("User '{UserId}' rolled back content '{ContentId}' to version '{VersionId}'", userId, id, versionId); Audit(AuditType.RollBack, userId, id, $"Content '{content.Name}' was rolled back to version '{versionId}'"); } diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 0faa4af316..008c24fcbf 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -2082,32 +2082,6 @@ namespace Umbraco.Tests.Services Assert.AreEqual("world", copiedTags[1].Text); } - [Test] - public void Copy_Recursive_Preserves_Sort_Order() - { - // Arrange - var contentService = ServiceContext.ContentService; - var temp = contentService.GetById(NodeDto.NodeIdSeed + 2); - Assert.AreEqual("Home", temp.Name); - Assert.AreEqual(3, contentService.CountChildren(temp.Id)); - var reversedChildren = contentService.GetPagedChildren(temp.Id, 0, 10, out var total1).Reverse().ToArray(); - contentService.Sort(reversedChildren); - - // Act - var copy = contentService.Copy(temp, temp.ParentId, false, true, Constants.Security.SuperUserId); - var content = contentService.GetById(NodeDto.NodeIdSeed + 2); - - // Assert - Assert.That(copy, Is.Not.Null); - Assert.That(copy.Id, Is.Not.EqualTo(content.Id)); - Assert.AreNotSame(content, copy); - Assert.AreEqual(3, contentService.CountChildren(copy.Id)); - - var copiedChildren = contentService.GetPagedChildren(copy.Id, 0, 10, out var total2).OrderBy(c => c.SortOrder).ToArray(); - Assert.AreEqual(reversedChildren.First().Name, copiedChildren.First().Name); - Assert.AreEqual(reversedChildren.Last().Name, copiedChildren.Last().Name); - } - [Test] public void Can_Rollback_Version_On_Content() { From b783399c5cd730cfcbff3fdcedf2f7a4ab2eb25c Mon Sep 17 00:00:00 2001 From: Mike Chambers Date: Tue, 27 Apr 2021 13:56:31 +0100 Subject: [PATCH 11/28] Update ModelsBuilderComposer.cs issue #10186 typo in IsExternalModelsBuilderInstalled -> Umbraco.ModelsBuider --- .../Compose/ModelsBuilderComposer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs b/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs index 01010cca66..fee9b6f62e 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs +++ b/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComposer.cs @@ -47,7 +47,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Compose { var assemblyNames = new[] { - "Umbraco.ModelsBuider", + "Umbraco.ModelsBuilder", "ModelsBuilder.Umbraco" }; From 349c5ac3ab56fe0cc6c0bb3abd0d6ad314fd2bf6 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Sun, 21 Mar 2021 15:14:01 +0100 Subject: [PATCH 12/28] Fix issue with active style affected nested block list elements --- .../inlineblock/inlineblock.editor.less | 28 +++++++++++-------- .../umb-block-list-property-editor.html | 1 - .../blocklist/umbblocklistblock.component.js | 4 +-- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less index 45a4c08598..12862d8f41 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less @@ -45,18 +45,6 @@ } } - .umb-block-list__block.--active & { - border-color: @gray-8; - box-shadow: 0 0 2px 0px rgba(0, 0, 0, 0.05); - - > button { - > .caret { - transform: rotate(0deg); - } - } - } - - ng-form.ng-invalid-val-server-match-content > .umb-block-list__block > .umb-block-list__block--content > div > & { > button { color: @formErrorText; @@ -104,6 +92,22 @@ } } +.umb-block-list__block.--active { + border-color: @gray-8; + box-shadow: 0 0 2px 0px rgba(0, 0, 0, 0.05); + + > .umb-block-list__block--content { + > .umb-block-list__block--view { + > .blockelement-inlineblock-editor { + > button { + > .caret { + transform: rotate(0deg); + } + } + } + } + } +} .blockelement-inlineblock-editor__inner { border-top: 1px solid @gray-8; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html index 9726daf5e6..38959da6ba 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html @@ -61,5 +61,4 @@ model="vm.blockTypePicker"> -
  • diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js index 285437b011..1027b82e51 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umbblocklistblock.component.js @@ -59,12 +59,12 @@ -
    +
    `; $compile(shadowRoot)($scope); } else { - $element.append($compile('
    ')($scope)); + $element.append($compile('
    ')($scope)); } }; From 727be420ff0d7732c19efc395b9ab75ed65ab3b2 Mon Sep 17 00:00:00 2001 From: Bjarne Fyrstenborg Date: Tue, 30 Mar 2021 17:33:33 +0200 Subject: [PATCH 13/28] Use umb-icon component in listview dropdown --- .../src/views/propertyeditors/listview/listview.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html index 1f66d324df..dc226ec307 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/listview/listview.html @@ -31,12 +31,12 @@ @@ -53,12 +53,12 @@ @@ -69,7 +69,7 @@