Skip to content

Commit 5928275

Browse files
author
Rick Butterfield
committed
Upgrade to 14.0.0-rc4
1 parent 306d5f1 commit 5928275

27 files changed

+221
-382
lines changed

src/Umbraco.Community.Sustainability.TestSite.14.x/Umbraco.Community.Sustainability.TestSite.14.x.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Umbraco.Cms" Version="14.0.0-rc3" />
10+
<PackageReference Include="Umbraco.Cms" Version="14.0.0-rc4" />
1111
<PackageReference Include="uSync" Version="14.0.0-rc2" />
1212
</ItemGroup>
1313

src/Umbraco.Community.Sustainability.TestSite.14.x/appsettings-schema.Umbraco.Cms.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"PreviewBadge": {
146146
"type": "string",
147147
"description": "Gets or sets a value for the preview badge mark-up.\n ",
148-
"default": "\n <div id=\"umbracoPreviewBadge\" class=\"umbraco-preview-badge\">\n <span class=\"umbraco-preview-badge__header\">Preview mode</span>\n <a href=\"{0}/preview/?id={2}\" class=\"umbraco-preview-badge__a open\" title=\"Open preview in BackOffice\">\n …\n </a>\n <a href=\"{0}/preview/end?redir={1}\" class=\"umbraco-preview-badge__a end\" title=\"End preview mode\">\n <svg viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\"><title>Click to end preview mode</title><path fill=\"#fff\" d=\"M5273.1 2400.1v-2c0-2.8-5-4-9.7-4s-9.7 1.3-9.7 4v2a7 7 0 002 4.9l5 4.9c.3.3.4.6.4 1v6.4c0 .4.2.7.6.8l2.9.9c.5.1 1-.2 1-.8v-7.2c0-.4.2-.7.4-1l5.1-5a7 7 0 002-4.9zm-9.7-.1c-4.8 0-7.4-1.3-7.5-1.8.1-.5 2.7-1.8 7.5-1.8s7.3 1.3 7.5 1.8c-.2.5-2.7 1.8-7.5 1.8z\"/><path fill=\"#fff\" d=\"M5268.4 2410.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1s-.4-1-1-1h-4.3zM5272.7 2413.7h-4.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1s-.4-1-1-1zM5272.7 2417h-4.3c-.6 0-1 .4-1 1s.4 1 1 1h4.3c.6 0 1-.4 1-1 0-.5-.4-1-1-1z\"/><path fill=\"#fff\" d=\"M78.2 13l-8.7 11.7a32.5 32.5 0 11-51.9 25.8c0-10.3 4.7-19.7 12.9-25.8L21.8 13a47 47 0 1056.4 0z\"/><path fill=\"#fff\" d=\"M42.7 2.5h14.6v49.4H42.7z\"/></svg>\n </a>\n </div>\n <style type=\"text/css\">\n .umbraco-preview-badge {{\n position: fixed;\n bottom: 0;\n display: inline-flex;\n background: rgba(27, 38, 79, 0.9);\n color: #fff;\n font-size: 12px;\n z-index: 99999999;\n justify-content: center;\n align-items: center;\n box-shadow: 0 5px 10px rgba(0, 0, 0, .2), 0 1px 2px rgba(0, 0, 0, .2);\n line-height: 1;\n pointer-events:none;\n left: 50%;\n transform: translate(-50%, 40px);\n animation: umbraco-preview-badge--effect 10s 1.2s ease both;\n border-radius: 3px 3px 0 0;\n }}\n @keyframes umbraco-preview-badge--effect {{\n 0% {{\n transform: translate(-50%, 40px);\n animation-timing-function: ease-out;\n }}\n 1.5% {{\n transform: translate(-50%, -20px);\n animation-timing-function: ease-in;\n }}\n 5.0% {{\n transform: translate(-50%, -8px);\n animation-timing-function: ease-in;\n }}\n 7.5% {{\n transform: translate(-50%, -4px);\n animation-timing-function: ease-in;\n }}\n 9.2% {{\n transform: translate(-50%, -2px);\n animation-timing-function: ease-in;\n }}\n 3.5%,\n 6.5%,\n 8.5% {{\n transform: translate(-50%, 0);\n animation-timing-function: ease-out;\n }}\n 9.7% {{\n transform: translate(-50%, 0);\n animation-timing-function: ease-out;\n }}\n 10.0% {{\n transform: translate(-50%, 0);\n }}\n\n\n 60% {{\n transform: translate(-50%, 0);\n animation-timing-function: ease-out;\n }}\n 61.5% {{\n transform: translate(-50%, -20px);\n animation-timing-function: ease-in;\n }}\n 65.0% {{\n transform: translate(-50%, -8px);\n animation-timing-function: ease-in;\n }}\n 67.5% {{\n transform: translate(-50%, -4px);\n animation-timing-function: ease-in;\n }}\n 69.2% {{\n transform: translate(-50%, -2px);\n animation-timing-function: ease-in;\n }}\n 63.5%,\n 66.5%,\n 68.5% {{\n transform: translate(-50%, 0);\n animation-timing-function: ease-out;\n }}\n 69.7% {{\n transform: translate(-50%, 0);\n animation-timing-function: ease-out;\n }}\n 70.0% {{\n transform: translate(-50%, 0);\n }}\n 100.0% {{\n transform: translate(-50%, 0);\n }}\n }}\n .umbraco-preview-badge__header {{\n padding: 1em;\n font-weight: bold;\n pointer-events:none;\n }}\n .umbraco-preview-badge__a {{\n width: 3em;\n padding: 1em;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n align-self: stretch;\n color:white;\n text-decoration:none;\n font-weight: bold;\n border-left: 1px solid hsla(0,0%,100%,.25);\n pointer-events:all;\n }}\n .umbraco-preview-badge__a svg {{\n width: 1em;\n height:1em;\n }}\n .umbraco-preview-badge__a:hover {{\n background: #202d5e;\n }}\n .umbraco-preview-badge__end svg {{\n fill: #fff;\n width:1em;\n }}\n </style>\n <script type=\"text/javascript\" data-umbraco-path=\"{0}\" src=\"{0}/js/umbraco.websitepreview.min.js\"></script>"
148+
"default": "\n<script src=\"{0}/website/preview.js\"></script>\n<umb-website-preview path=\"{0}\" url=\"{1}\" unique=\"{2}\"></umb-website-preview>"
149149
},
150150
"ShowDeprecatedPropertyEditors": {
151151
"type": "boolean",
@@ -1483,9 +1483,8 @@
14831483
"description": "Gets or sets a value indicating whether the use of alternative templates should be validated.\n ",
14841484
"default": false
14851485
},
1486-
"DisableFindContentByIdPath": {
1486+
"DisableFindContentByIdentifierPath": {
14871487
"type": "boolean",
1488-
"description": "Gets or sets a value indicating whether find content ID by path is disabled.\n ",
14891488
"default": false
14901489
},
14911490
"DisableRedirectUrlTracking": {

src/Umbraco.Community.Sustainability.TestSite.14.x/umbraco-package-schema.json

Lines changed: 148 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,6 +2731,13 @@
27312731
"description": "The alias of the extension, ensure it is unique",
27322732
"type": "string"
27332733
},
2734+
"conditions": {
2735+
"description": "Set the conditions for when the extension should be loaded",
2736+
"items": {
2737+
"$ref": "#/definitions/ConditionTypes"
2738+
},
2739+
"type": "array"
2740+
},
27342741
"element": {
27352742
"description": "The file location of the element javascript file to load",
27362743
"type": "string"
@@ -2757,6 +2764,20 @@
27572764
"description": "The friendly name of the extension",
27582765
"type": "string"
27592766
},
2767+
"overwrites": {
2768+
"anyOf": [
2769+
{
2770+
"items": {
2771+
"type": "string"
2772+
},
2773+
"type": "array"
2774+
},
2775+
{
2776+
"type": "string"
2777+
}
2778+
],
2779+
"description": "Define one or more extension aliases that this extension should overwrite."
2780+
},
27602781
"type": {
27612782
"const": "menuItem",
27622783
"description": "The type of extension such as dashboard etc...",
@@ -2781,6 +2802,13 @@
27812802
"description": "The alias of the extension, ensure it is unique",
27822803
"type": "string"
27832804
},
2805+
"conditions": {
2806+
"description": "Set the conditions for when the extension should be loaded",
2807+
"items": {
2808+
"$ref": "#/definitions/ConditionTypes"
2809+
},
2810+
"type": "array"
2811+
},
27842812
"element": {
27852813
"description": "The file location of the element javascript file to load",
27862814
"type": "string"
@@ -2806,6 +2834,20 @@
28062834
"description": "The friendly name of the extension",
28072835
"type": "string"
28082836
},
2837+
"overwrites": {
2838+
"anyOf": [
2839+
{
2840+
"items": {
2841+
"type": "string"
2842+
},
2843+
"type": "array"
2844+
},
2845+
{
2846+
"type": "string"
2847+
}
2848+
],
2849+
"description": "Define one or more extension aliases that this extension should overwrite."
2850+
},
28092851
"type": {
28102852
"const": "menuItem",
28112853
"description": "The type of extension such as dashboard etc...",
@@ -2928,6 +2970,49 @@
29282970
],
29292971
"type": "object"
29302972
},
2973+
"ManifestMonacoMarkdownEditorAction": {
2974+
"properties": {
2975+
"alias": {
2976+
"description": "The alias of the extension, ensure it is unique",
2977+
"type": "string"
2978+
},
2979+
"api": {
2980+
"type": "string"
2981+
},
2982+
"js": {
2983+
"description": "The file location of the javascript file to load",
2984+
"type": "string"
2985+
},
2986+
"kind": {
2987+
"description": "The kind of the extension, used to group extensions together",
2988+
"examples": [
2989+
"button"
2990+
]
2991+
},
2992+
"meta": {
2993+
"$ref": "#/definitions/MetaMonacoMarkdownEditorAction"
2994+
},
2995+
"name": {
2996+
"description": "The friendly name of the extension",
2997+
"type": "string"
2998+
},
2999+
"type": {
3000+
"const": "monacoMarkdownEditorAction",
3001+
"description": "The type of extension such as dashboard etc...",
3002+
"type": "string"
3003+
},
3004+
"weight": {
3005+
"description": "Extensions such as dashboards are ordered by weight with lower numbers being first in the list",
3006+
"type": "number"
3007+
}
3008+
},
3009+
"required": [
3010+
"alias",
3011+
"name",
3012+
"type"
3013+
],
3014+
"type": "object"
3015+
},
29313016
"ManifestPackageView": {
29323017
"properties": {
29333018
"alias": {
@@ -2978,6 +3063,55 @@
29783063
],
29793064
"type": "object"
29803065
},
3066+
"ManifestPreviewAppProvider": {
3067+
"description": "Preview apps are displayed in the menu of the preview window.",
3068+
"properties": {
3069+
"alias": {
3070+
"description": "The alias of the extension, ensure it is unique",
3071+
"type": "string"
3072+
},
3073+
"element": {
3074+
"description": "The file location of the element javascript file to load",
3075+
"type": "string"
3076+
},
3077+
"elementName": {
3078+
"description": "The HTML web component name to use such as 'my-dashboard'\nNote it is NOT <my-dashboard></my-dashboard>, just the element name.",
3079+
"type": "string"
3080+
},
3081+
"js": {
3082+
"description": "The file location of the javascript file to load",
3083+
"type": "string"
3084+
},
3085+
"kind": {
3086+
"description": "The kind of the extension, used to group extensions together",
3087+
"examples": [
3088+
"button"
3089+
]
3090+
},
3091+
"meta": {
3092+
"description": "This contains properties specific to the type of extension"
3093+
},
3094+
"name": {
3095+
"description": "The friendly name of the extension",
3096+
"type": "string"
3097+
},
3098+
"type": {
3099+
"const": "previewApp",
3100+
"description": "The type of extension such as dashboard etc...",
3101+
"type": "string"
3102+
},
3103+
"weight": {
3104+
"description": "Extensions such as dashboards are ordered by weight with lower numbers being first in the list",
3105+
"type": "number"
3106+
}
3107+
},
3108+
"required": [
3109+
"alias",
3110+
"name",
3111+
"type"
3112+
],
3113+
"type": "object"
3114+
},
29813115
"ManifestPropertyAction<MetaPropertyAction>": {
29823116
"properties": {
29833117
"alias": {
@@ -3965,10 +4099,10 @@
39654099
"$ref": "#/definitions/ManifestTree"
39664100
},
39674101
{
3968-
"$ref": "#/definitions/ManifestAppEntryPoint"
4102+
"$ref": "#/definitions/ManifestAuthProvider"
39694103
},
39704104
{
3971-
"$ref": "#/definitions/ManifestAuthProvider"
4105+
"$ref": "#/definitions/ManifestAppEntryPoint"
39724106
},
39734107
{
39744108
"$ref": "#/definitions/ManifestBackofficeEntryPoint"
@@ -4096,9 +4230,15 @@
40964230
{
40974231
"$ref": "#/definitions/ManifestMfaLoginProvider"
40984232
},
4233+
{
4234+
"$ref": "#/definitions/ManifestMonacoMarkdownEditorAction"
4235+
},
40994236
{
41004237
"$ref": "#/definitions/ManifestPackageView"
41014238
},
4239+
{
4240+
"$ref": "#/definitions/ManifestPreviewAppProvider"
4241+
},
41024242
{
41034243
"$ref": "#/definitions/ManifestPropertyAction<MetaPropertyAction>"
41044244
},
@@ -5784,6 +5924,9 @@
57845924
},
57855925
"type": "object"
57865926
},
5927+
"MetaMonacoMarkdownEditorAction": {
5928+
"type": "object"
5929+
},
57875930
"MetaPackageView": {
57885931
"properties": {
57895932
"packageName": {
@@ -6158,6 +6301,9 @@
61586301
},
61596302
"propertyEditorUiAlias": {
61606303
"type": "string"
6304+
},
6305+
"weight": {
6306+
"type": "number"
61616307
}
61626308
},
61636309
"required": [
@@ -6418,9 +6564,6 @@
64186564
"filter": {
64196565
"type": "object"
64206566
},
6421-
"hideTreeRoot": {
6422-
"type": "boolean"
6423-
},
64246567
"multiple": {
64256568
"type": "boolean"
64266569
},

src/Umbraco.Community.Sustainability/Controllers/SustainabilityWorkspaceController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public async Task<IActionResult> GetPageData([FromQuery] Guid pageGuid)
9090
return NoContent();
9191
}
9292

93-
var pageMetrics = await _pageMetricService.GetPageMetrics(contentItem.Id);
93+
var pageMetrics = await _pageMetricService.GetPageMetrics(contentItem.Key);
9494
var mostRecent = pageMetrics.OrderByDescending(x => x.RequestDate).FirstOrDefault();
9595
if (mostRecent?.PageData == null)
9696
{

src/Umbraco.Community.Sustainability/Services/PageMetricService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public interface IPageMetricService
99
{
1010
Task<IEnumerable<PageMetric>> GetOverviewMetrics();
1111
Task<AveragePageMetrics> GetAverageMetrics();
12-
Task<IEnumerable<PageMetric>> GetPageMetrics(int pageId);
12+
Task<IEnumerable<PageMetric>> GetPageMetrics(Guid pageKey);
1313
Task AddPageMetric(PageMetric pageMetric);
1414
}
1515

@@ -61,10 +61,10 @@ public async Task<AveragePageMetrics> GetAverageMetrics()
6161
return new();
6262
}
6363

64-
public async Task<IEnumerable<PageMetric>> GetPageMetrics(int pageId)
64+
public async Task<IEnumerable<PageMetric>> GetPageMetrics(Guid pageKey)
6565
{
6666
using var scope = _scopeProvider.CreateScope();
67-
var queryResults = await scope.Database.FetchAsync<PageMetric>($"SELECT * FROM {PageMetric.TableName} WHERE NodeId = @0", pageId);
67+
var queryResults = await scope.Database.FetchAsync<PageMetric>($"SELECT * FROM {PageMetric.TableName} WHERE NodeKey = @0", pageKey);
6868
scope.Complete();
6969

7070
return queryResults;

src/Umbraco.Community.Sustainability/Umbraco.Community.Sustainability.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
</PropertyGroup>
3131

3232
<ItemGroup>
33-
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
34-
<PackageReference Include="Microsoft.Playwright" Version="1.40.0" />
35-
<PackageReference Include="Umbraco.Cms.Web.Website" Version="[14.0.0-rc3, 15.0.0)" />
36-
<PackageReference Include="Umbraco.Cms.Api.Common" Version="[14.0.0-rc3, 15.0.0)" />
33+
<PackageReference Include="Microsoft.Playwright" Version="1.44.0" />
34+
<PackageReference Include="Umbraco.Cms.Web.Website" Version="[14.0.0-rc4, 15.0.0)" />
35+
<PackageReference Include="Umbraco.Cms.Api.Common" Version="[14.0.0-rc4, 15.0.0)" />
3736
</ItemGroup>
3837

3938
<ItemGroup>

0 commit comments

Comments
 (0)