From ce372abf8a87398e0a8d485f86caf00567e9ef73 Mon Sep 17 00:00:00 2001
From: Ethan Nagano <50598649+nagolucky18@users.noreply.github.com>
Date: Mon, 25 Mar 2024 06:27:36 -0700
Subject: [PATCH 1/5] Add check for ContentVariation.Nothing when copying
documents. (#15185)
A new check for ContentVariation.Nothing is necessary when copying from
documents to ensure that if there is no content variation as defined by
the Nothing property, values are still copied even if variation is not
supported since the content itself will not vary.
---
.../Models/ContentRepositoryExtensions.cs | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs b/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs
index 5b7d68a72b..24fd7847b4 100644
--- a/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs
+++ b/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs
@@ -174,15 +174,17 @@ public static class ContentRepositoryExtensions
foreach (IProperty property in content.Properties)
{
// each property type may or may not support the variation
- if (!property.PropertyType?.SupportsVariation(culture, "*", true) ?? false)
+ if ((!property.PropertyType?.SupportsVariation(culture, "*", true) ?? false) &&
+ !(property.PropertyType?.Variations == ContentVariation.Nothing))
{
continue;
}
foreach (IPropertyValue pvalue in property.Values)
{
- if ((property.PropertyType?.SupportsVariation(pvalue.Culture, pvalue.Segment, true) ?? false) &&
- (culture == "*" || (pvalue.Culture?.InvariantEquals(culture) ?? false)))
+ if (((property.PropertyType?.SupportsVariation(pvalue.Culture, pvalue.Segment, true) ?? false) &&
+ (culture == "*" || (pvalue.Culture?.InvariantEquals(culture) ?? false))) ||
+ property.PropertyType?.Variations == ContentVariation.Nothing)
{
property.SetValue(null, pvalue.Culture, pvalue.Segment);
}
@@ -193,7 +195,8 @@ public static class ContentRepositoryExtensions
IPropertyCollection otherProperties = other.Properties;
foreach (IProperty otherProperty in otherProperties)
{
- if (!otherProperty?.PropertyType?.SupportsVariation(culture, "*", true) ?? true)
+ if ((!otherProperty?.PropertyType?.SupportsVariation(culture, "*", true) ?? true) &&
+ !(otherProperty?.PropertyType?.Variations == ContentVariation.Nothing))
{
continue;
}
@@ -203,8 +206,9 @@ public static class ContentRepositoryExtensions
{
foreach (IPropertyValue pvalue in otherProperty.Values)
{
- if (otherProperty.PropertyType.SupportsVariation(pvalue.Culture, pvalue.Segment, true) &&
- (culture == "*" || (pvalue.Culture?.InvariantEquals(culture) ?? false)))
+ if (((otherProperty?.PropertyType.SupportsVariation(pvalue.Culture, pvalue.Segment, true) ?? false) &&
+ (culture == "*" ||(pvalue.Culture?.InvariantEquals(culture) ?? false))) ||
+ otherProperty?.PropertyType?.Variations == ContentVariation.Nothing)
{
var value = published ? pvalue.PublishedValue : pvalue.EditedValue;
content.SetValue(alias, value, pvalue.Culture, pvalue.Segment);
From fdea8c28c89c62bf33272e67b3d7770ff2becf9f Mon Sep 17 00:00:00 2001
From: Ethan Nagano <50598649+nagolucky18@users.noreply.github.com>
Date: Tue, 26 Mar 2024 02:39:34 -0700
Subject: [PATCH 2/5] 14744 tour not coded to best practice (#15133)
* Apply focusLockService to TourStepDirective
Apply focusLockService to TourStepDirective in order to ensure that
non-modal page contents are inert and do not interfere with focus on
modal dialog with regards to screen reading technologies.
* Add properties to umb-tour.html.
Add properties to umb-tour html page to ensure that it aligns with modal
dialog best practices.
* Add dialog properties to Umbraco tour .html files.
Add properties relating to dialog and accessibility to the Umbraco tour
.html files, including aria-label, role, and tab index.
---
.../components/application/umbtour/umbtourstep.directive.js | 6 ++++--
.../src/views/components/application/umb-tour.html | 6 +++---
.../application/umbtour/umb-tour-step-content.html | 4 ++--
.../application/umbtour/umb-tour-step-counter.html | 2 +-
.../application/umbtour/umb-tour-step-header.html | 4 ++--
5 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour/umbtourstep.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour/umbtourstep.directive.js
index 381ecc76c3..53ff989c7d 100644
--- a/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour/umbtourstep.directive.js
+++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/application/umbtour/umbtourstep.directive.js
@@ -14,16 +14,18 @@
(function () {
'use strict';
- function TourStepDirective() {
+ function TourStepDirective(focusLockService) {
function link(scope, element, attrs, ctrl) {
scope.close = function () {
if (scope.onClose) {
- scope.onClose();
+ scope.onClose();
+ focusLockService.removeInertAttribute();
}
}
+ focusLockService.addInertAttribute();
}
var directive = {
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html
index 064dcf6945..76baebc645 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-tour.html
@@ -1,4 +1,4 @@
-