@wordpress/edit-site 6.18.0 → 6.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js +3 -1
- package/build/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build/components/save-panel/index.js +14 -8
- package/build/components/save-panel/index.js.map +1 -1
- package/build/components/sidebar-navigation-screen/index.js +1 -1
- package/build/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build/components/site-editor-routes/navigation-item.js +1 -4
- package/build/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build/components/site-editor-routes/notfound.js +12 -4
- package/build/components/site-editor-routes/notfound.js.map +1 -1
- package/build/components/site-editor-routes/patterns.js +21 -1
- package/build/components/site-editor-routes/patterns.js.map +1 -1
- package/build/components/site-hub/index.js +7 -5
- package/build/components/site-hub/index.js.map +1 -1
- package/build/components/welcome-guide/page.js +3 -1
- package/build/components/welcome-guide/page.js.map +1 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js +3 -1
- package/build-module/components/add-new-template/add-custom-generic-template-modal-content.js.map +1 -1
- package/build-module/components/save-panel/index.js +14 -8
- package/build-module/components/save-panel/index.js.map +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js +1 -1
- package/build-module/components/sidebar-navigation-screen/index.js.map +1 -1
- package/build-module/components/site-editor-routes/navigation-item.js +1 -4
- package/build-module/components/site-editor-routes/navigation-item.js.map +1 -1
- package/build-module/components/site-editor-routes/notfound.js +12 -4
- package/build-module/components/site-editor-routes/notfound.js.map +1 -1
- package/build-module/components/site-editor-routes/patterns.js +21 -1
- package/build-module/components/site-editor-routes/patterns.js.map +1 -1
- package/build-module/components/site-hub/index.js +9 -7
- package/build-module/components/site-hub/index.js.map +1 -1
- package/build-module/components/welcome-guide/page.js +3 -1
- package/build-module/components/welcome-guide/page.js.map +1 -1
- package/build-style/posts-rtl.css +9 -12
- package/build-style/posts.css +9 -12
- package/build-style/style-rtl.css +9 -12
- package/build-style/style.css +9 -12
- package/package.json +42 -42
- package/src/components/add-new-template/add-custom-generic-template-modal-content.js +1 -0
- package/src/components/layout/style.scss +4 -4
- package/src/components/save-panel/index.js +16 -8
- package/src/components/sidebar-navigation-screen/index.js +2 -2
- package/src/components/site-editor-routes/navigation-item.js +1 -4
- package/src/components/site-editor-routes/notfound.js +15 -4
- package/src/components/site-editor-routes/patterns.js +20 -1
- package/src/components/site-hub/index.js +17 -21
- package/src/components/welcome-guide/page.js +1 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -448,7 +448,6 @@
|
|
|
448
448
|
color: rgba(30, 30, 30, 0.62);
|
|
449
449
|
}
|
|
450
450
|
.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder {
|
|
451
|
-
opacity: 1;
|
|
452
451
|
color: rgba(30, 30, 30, 0.62);
|
|
453
452
|
}
|
|
454
453
|
.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder {
|
|
@@ -1000,6 +999,7 @@ div.dataviews-view-list {
|
|
|
1000
999
|
.dataviews-view-table td.dataviews-view-table__checkbox-column,
|
|
1001
1000
|
.dataviews-view-table th.dataviews-view-table__checkbox-column {
|
|
1002
1001
|
padding-left: 0;
|
|
1002
|
+
width: 1%;
|
|
1003
1003
|
}
|
|
1004
1004
|
.dataviews-view-table tr {
|
|
1005
1005
|
border-top: 1px solid #f0f0f0;
|
|
@@ -1012,9 +1012,7 @@ div.dataviews-view-list {
|
|
|
1012
1012
|
padding-right: 48px;
|
|
1013
1013
|
}
|
|
1014
1014
|
.dataviews-view-table tr td:first-child .dataviews-view-table-header-button,
|
|
1015
|
-
.dataviews-view-table tr
|
|
1016
|
-
.dataviews-view-table tr th:first-child .dataviews-view-table-header-button,
|
|
1017
|
-
.dataviews-view-table tr th:first-child .dataviews-view-table-header {
|
|
1015
|
+
.dataviews-view-table tr th:first-child .dataviews-view-table-header-button {
|
|
1018
1016
|
margin-right: -8px;
|
|
1019
1017
|
}
|
|
1020
1018
|
.dataviews-view-table tr td:last-child,
|
|
@@ -2547,6 +2545,9 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
2547
2545
|
.edit-site-layout__mobile .edit-site-sidebar__screen-wrapper {
|
|
2548
2546
|
padding: 0;
|
|
2549
2547
|
}
|
|
2548
|
+
.edit-site-layout__mobile .edit-site-sidebar-navigation-screen__main {
|
|
2549
|
+
padding: 0 12px;
|
|
2550
|
+
}
|
|
2550
2551
|
|
|
2551
2552
|
.edit-site-layout__canvas-container {
|
|
2552
2553
|
position: relative;
|
|
@@ -2725,10 +2726,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2725
2726
|
}
|
|
2726
2727
|
}
|
|
2727
2728
|
|
|
2728
|
-
.edit-site-layout__area__404 {
|
|
2729
|
-
margin: 16px;
|
|
2730
|
-
}
|
|
2731
|
-
|
|
2732
2729
|
.edit-site .components-editor-notices__snackbar {
|
|
2733
2730
|
position: fixed;
|
|
2734
2731
|
left: 0;
|
|
@@ -2773,7 +2770,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2773
2770
|
contain: content;
|
|
2774
2771
|
}
|
|
2775
2772
|
|
|
2776
|
-
@keyframes
|
|
2773
|
+
@keyframes _xk1qy_slide-from-right {
|
|
2777
2774
|
from {
|
|
2778
2775
|
transform: translateX(-50px);
|
|
2779
2776
|
opacity: 0;
|
|
@@ -2783,7 +2780,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2783
2780
|
opacity: 1;
|
|
2784
2781
|
}
|
|
2785
2782
|
}
|
|
2786
|
-
@keyframes
|
|
2783
|
+
@keyframes _xk1qy_slide-from-left {
|
|
2787
2784
|
from {
|
|
2788
2785
|
transform: translateX(50px);
|
|
2789
2786
|
opacity: 0;
|
|
@@ -2839,10 +2836,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2839
2836
|
}
|
|
2840
2837
|
}
|
|
2841
2838
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
2842
|
-
animation-name:
|
|
2839
|
+
animation-name: _xk1qy_slide-from-left;
|
|
2843
2840
|
}
|
|
2844
2841
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
2845
|
-
animation-name:
|
|
2842
|
+
animation-name: _xk1qy_slide-from-right;
|
|
2846
2843
|
}
|
|
2847
2844
|
|
|
2848
2845
|
.edit-site-sidebar-button {
|
package/build-style/style.css
CHANGED
|
@@ -448,7 +448,6 @@
|
|
|
448
448
|
color: rgba(30, 30, 30, 0.62);
|
|
449
449
|
}
|
|
450
450
|
.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input::-moz-placeholder {
|
|
451
|
-
opacity: 1;
|
|
452
451
|
color: rgba(30, 30, 30, 0.62);
|
|
453
452
|
}
|
|
454
453
|
.dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input:-ms-input-placeholder {
|
|
@@ -1000,6 +999,7 @@ div.dataviews-view-list {
|
|
|
1000
999
|
.dataviews-view-table td.dataviews-view-table__checkbox-column,
|
|
1001
1000
|
.dataviews-view-table th.dataviews-view-table__checkbox-column {
|
|
1002
1001
|
padding-right: 0;
|
|
1002
|
+
width: 1%;
|
|
1003
1003
|
}
|
|
1004
1004
|
.dataviews-view-table tr {
|
|
1005
1005
|
border-top: 1px solid #f0f0f0;
|
|
@@ -1012,9 +1012,7 @@ div.dataviews-view-list {
|
|
|
1012
1012
|
padding-left: 48px;
|
|
1013
1013
|
}
|
|
1014
1014
|
.dataviews-view-table tr td:first-child .dataviews-view-table-header-button,
|
|
1015
|
-
.dataviews-view-table tr
|
|
1016
|
-
.dataviews-view-table tr th:first-child .dataviews-view-table-header-button,
|
|
1017
|
-
.dataviews-view-table tr th:first-child .dataviews-view-table-header {
|
|
1015
|
+
.dataviews-view-table tr th:first-child .dataviews-view-table-header-button {
|
|
1018
1016
|
margin-left: -8px;
|
|
1019
1017
|
}
|
|
1020
1018
|
.dataviews-view-table tr td:last-child,
|
|
@@ -2548,6 +2546,9 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
2548
2546
|
.edit-site-layout__mobile .edit-site-sidebar__screen-wrapper {
|
|
2549
2547
|
padding: 0;
|
|
2550
2548
|
}
|
|
2549
|
+
.edit-site-layout__mobile .edit-site-sidebar-navigation-screen__main {
|
|
2550
|
+
padding: 0 12px;
|
|
2551
|
+
}
|
|
2551
2552
|
|
|
2552
2553
|
.edit-site-layout__canvas-container {
|
|
2553
2554
|
position: relative;
|
|
@@ -2726,10 +2727,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2726
2727
|
}
|
|
2727
2728
|
}
|
|
2728
2729
|
|
|
2729
|
-
.edit-site-layout__area__404 {
|
|
2730
|
-
margin: 16px;
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
2730
|
.edit-site .components-editor-notices__snackbar {
|
|
2734
2731
|
position: fixed;
|
|
2735
2732
|
right: 0;
|
|
@@ -2774,7 +2771,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2774
2771
|
contain: content;
|
|
2775
2772
|
}
|
|
2776
2773
|
|
|
2777
|
-
@keyframes
|
|
2774
|
+
@keyframes _xk1qy_slide-from-right {
|
|
2778
2775
|
from {
|
|
2779
2776
|
transform: translateX(50px);
|
|
2780
2777
|
opacity: 0;
|
|
@@ -2784,7 +2781,7 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2784
2781
|
opacity: 1;
|
|
2785
2782
|
}
|
|
2786
2783
|
}
|
|
2787
|
-
@keyframes
|
|
2784
|
+
@keyframes _xk1qy_slide-from-left {
|
|
2788
2785
|
from {
|
|
2789
2786
|
transform: translateX(-50px);
|
|
2790
2787
|
opacity: 0;
|
|
@@ -2840,10 +2837,10 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
2840
2837
|
}
|
|
2841
2838
|
}
|
|
2842
2839
|
.edit-site-sidebar__screen-wrapper.slide-from-left {
|
|
2843
|
-
animation-name:
|
|
2840
|
+
animation-name: _xk1qy_slide-from-left;
|
|
2844
2841
|
}
|
|
2845
2842
|
.edit-site-sidebar__screen-wrapper.slide-from-right {
|
|
2846
|
-
animation-name:
|
|
2843
|
+
animation-name: _xk1qy_slide-from-right;
|
|
2847
2844
|
}
|
|
2848
2845
|
|
|
2849
2846
|
.edit-site-sidebar-button {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/edit-site",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.19.0",
|
|
4
4
|
"description": "Edit Site Page module for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -30,46 +30,46 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "7.25.7",
|
|
32
32
|
"@react-spring/web": "^9.4.5",
|
|
33
|
-
"@wordpress/a11y": "^4.
|
|
34
|
-
"@wordpress/api-fetch": "^7.
|
|
35
|
-
"@wordpress/blob": "^4.
|
|
36
|
-
"@wordpress/block-editor": "^14.
|
|
37
|
-
"@wordpress/block-library": "^9.
|
|
38
|
-
"@wordpress/blocks": "^14.
|
|
39
|
-
"@wordpress/commands": "^1.
|
|
40
|
-
"@wordpress/components": "^29.
|
|
41
|
-
"@wordpress/compose": "^7.
|
|
42
|
-
"@wordpress/core-commands": "^1.
|
|
43
|
-
"@wordpress/core-data": "^7.
|
|
44
|
-
"@wordpress/data": "^10.
|
|
45
|
-
"@wordpress/dataviews": "^4.
|
|
46
|
-
"@wordpress/date": "^5.
|
|
47
|
-
"@wordpress/deprecated": "^4.
|
|
48
|
-
"@wordpress/dom": "^4.
|
|
49
|
-
"@wordpress/editor": "^14.
|
|
50
|
-
"@wordpress/element": "^6.
|
|
51
|
-
"@wordpress/escape-html": "^3.
|
|
52
|
-
"@wordpress/fields": "^0.
|
|
53
|
-
"@wordpress/hooks": "^4.
|
|
54
|
-
"@wordpress/html-entities": "^4.
|
|
55
|
-
"@wordpress/i18n": "^5.
|
|
56
|
-
"@wordpress/icons": "^10.
|
|
57
|
-
"@wordpress/keyboard-shortcuts": "^5.
|
|
58
|
-
"@wordpress/keycodes": "^4.
|
|
59
|
-
"@wordpress/media-utils": "^5.
|
|
60
|
-
"@wordpress/notices": "^5.
|
|
61
|
-
"@wordpress/patterns": "^2.
|
|
62
|
-
"@wordpress/plugins": "^7.
|
|
63
|
-
"@wordpress/preferences": "^4.
|
|
64
|
-
"@wordpress/primitives": "^4.
|
|
65
|
-
"@wordpress/private-apis": "^1.
|
|
66
|
-
"@wordpress/reusable-blocks": "^5.
|
|
67
|
-
"@wordpress/router": "^1.
|
|
68
|
-
"@wordpress/style-engine": "^2.
|
|
69
|
-
"@wordpress/url": "^4.
|
|
70
|
-
"@wordpress/viewport": "^6.
|
|
71
|
-
"@wordpress/widgets": "^4.
|
|
72
|
-
"@wordpress/wordcount": "^4.
|
|
33
|
+
"@wordpress/a11y": "^4.19.0",
|
|
34
|
+
"@wordpress/api-fetch": "^7.19.0",
|
|
35
|
+
"@wordpress/blob": "^4.19.0",
|
|
36
|
+
"@wordpress/block-editor": "^14.14.0",
|
|
37
|
+
"@wordpress/block-library": "^9.19.0",
|
|
38
|
+
"@wordpress/blocks": "^14.8.0",
|
|
39
|
+
"@wordpress/commands": "^1.19.0",
|
|
40
|
+
"@wordpress/components": "^29.5.0",
|
|
41
|
+
"@wordpress/compose": "^7.19.0",
|
|
42
|
+
"@wordpress/core-commands": "^1.19.0",
|
|
43
|
+
"@wordpress/core-data": "^7.19.0",
|
|
44
|
+
"@wordpress/data": "^10.19.0",
|
|
45
|
+
"@wordpress/dataviews": "^4.15.0",
|
|
46
|
+
"@wordpress/date": "^5.19.0",
|
|
47
|
+
"@wordpress/deprecated": "^4.19.0",
|
|
48
|
+
"@wordpress/dom": "^4.19.0",
|
|
49
|
+
"@wordpress/editor": "^14.19.0",
|
|
50
|
+
"@wordpress/element": "^6.19.0",
|
|
51
|
+
"@wordpress/escape-html": "^3.19.0",
|
|
52
|
+
"@wordpress/fields": "^0.11.0",
|
|
53
|
+
"@wordpress/hooks": "^4.19.0",
|
|
54
|
+
"@wordpress/html-entities": "^4.19.0",
|
|
55
|
+
"@wordpress/i18n": "^5.19.0",
|
|
56
|
+
"@wordpress/icons": "^10.19.0",
|
|
57
|
+
"@wordpress/keyboard-shortcuts": "^5.19.0",
|
|
58
|
+
"@wordpress/keycodes": "^4.19.0",
|
|
59
|
+
"@wordpress/media-utils": "^5.19.0",
|
|
60
|
+
"@wordpress/notices": "^5.19.0",
|
|
61
|
+
"@wordpress/patterns": "^2.19.0",
|
|
62
|
+
"@wordpress/plugins": "^7.19.0",
|
|
63
|
+
"@wordpress/preferences": "^4.19.0",
|
|
64
|
+
"@wordpress/primitives": "^4.19.0",
|
|
65
|
+
"@wordpress/private-apis": "^1.19.0",
|
|
66
|
+
"@wordpress/reusable-blocks": "^5.19.0",
|
|
67
|
+
"@wordpress/router": "^1.19.0",
|
|
68
|
+
"@wordpress/style-engine": "^2.19.0",
|
|
69
|
+
"@wordpress/url": "^4.19.0",
|
|
70
|
+
"@wordpress/viewport": "^6.19.0",
|
|
71
|
+
"@wordpress/widgets": "^4.19.0",
|
|
72
|
+
"@wordpress/wordcount": "^4.19.0",
|
|
73
73
|
"change-case": "^4.1.2",
|
|
74
74
|
"clsx": "^2.1.1",
|
|
75
75
|
"colord": "^2.9.2",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"access": "public"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "d6b0b20fa927b110140dc7fdd906a7e0bf662004"
|
|
88
88
|
}
|
|
@@ -51,6 +51,7 @@ function AddCustomGenericTemplateModalContent( { onClose, createTemplate } ) {
|
|
|
51
51
|
placeholder={ defaultTitle }
|
|
52
52
|
disabled={ isBusy }
|
|
53
53
|
help={ __(
|
|
54
|
+
// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
|
|
54
55
|
'Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.'
|
|
55
56
|
) }
|
|
56
57
|
/>
|
|
@@ -68,6 +68,10 @@
|
|
|
68
68
|
.edit-site-sidebar__screen-wrapper {
|
|
69
69
|
padding: 0;
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
.edit-site-sidebar-navigation-screen__main {
|
|
73
|
+
padding: 0 $grid-unit-15;
|
|
74
|
+
}
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
.edit-site-layout__canvas-container {
|
|
@@ -262,10 +266,6 @@ html.canvas-mode-edit-transition::view-transition-group(toggle) {
|
|
|
262
266
|
}
|
|
263
267
|
}
|
|
264
268
|
|
|
265
|
-
.edit-site-layout__area__404 {
|
|
266
|
-
margin: $canvas-padding;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
269
|
.edit-site .components-editor-notices__snackbar {
|
|
270
270
|
position: fixed;
|
|
271
271
|
right: 0;
|
|
@@ -31,7 +31,11 @@ const { EntitiesSavedStatesExtensible, NavigableRegion } =
|
|
|
31
31
|
unlock( privateApis );
|
|
32
32
|
const { useLocation } = unlock( routerPrivateApis );
|
|
33
33
|
|
|
34
|
-
const EntitiesSavedStatesForPreview = ( {
|
|
34
|
+
const EntitiesSavedStatesForPreview = ( {
|
|
35
|
+
onClose,
|
|
36
|
+
renderDialog,
|
|
37
|
+
variant,
|
|
38
|
+
} ) => {
|
|
35
39
|
const isDirtyProps = useEntitiesSavedStatesIsDirty();
|
|
36
40
|
let activateSaveLabel;
|
|
37
41
|
if ( isDirtyProps.isDirty ) {
|
|
@@ -76,22 +80,28 @@ const EntitiesSavedStatesForPreview = ( { onClose, renderDialog } ) => {
|
|
|
76
80
|
saveEnabled: true,
|
|
77
81
|
saveLabel: activateSaveLabel,
|
|
78
82
|
renderDialog,
|
|
83
|
+
variant,
|
|
79
84
|
} }
|
|
80
85
|
/>
|
|
81
86
|
);
|
|
82
87
|
};
|
|
83
88
|
|
|
84
|
-
const _EntitiesSavedStates = ( { onClose, renderDialog } ) => {
|
|
89
|
+
const _EntitiesSavedStates = ( { onClose, renderDialog, variant } ) => {
|
|
85
90
|
if ( isPreviewingTheme() ) {
|
|
86
91
|
return (
|
|
87
92
|
<EntitiesSavedStatesForPreview
|
|
88
93
|
onClose={ onClose }
|
|
89
94
|
renderDialog={ renderDialog }
|
|
95
|
+
variant={ variant }
|
|
90
96
|
/>
|
|
91
97
|
);
|
|
92
98
|
}
|
|
93
99
|
return (
|
|
94
|
-
<EntitiesSavedStates
|
|
100
|
+
<EntitiesSavedStates
|
|
101
|
+
close={ onClose }
|
|
102
|
+
renderDialog={ renderDialog }
|
|
103
|
+
variant={ variant }
|
|
104
|
+
/>
|
|
95
105
|
);
|
|
96
106
|
};
|
|
97
107
|
|
|
@@ -130,12 +140,10 @@ export default function SavePanel() {
|
|
|
130
140
|
<Modal
|
|
131
141
|
className="edit-site-save-panel__modal"
|
|
132
142
|
onRequestClose={ onClose }
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
'Save site, content, and template changes'
|
|
136
|
-
) }
|
|
143
|
+
title={ __( 'Review changes' ) }
|
|
144
|
+
size="small"
|
|
137
145
|
>
|
|
138
|
-
<_EntitiesSavedStates onClose={ onClose } />
|
|
146
|
+
<_EntitiesSavedStates onClose={ onClose } variant="inline" />
|
|
139
147
|
</Modal>
|
|
140
148
|
) : null;
|
|
141
149
|
}
|
|
@@ -122,9 +122,9 @@ export default function SidebarNavigationScreen( {
|
|
|
122
122
|
</HStack>
|
|
123
123
|
<div className="edit-site-sidebar-navigation-screen__content">
|
|
124
124
|
{ description && (
|
|
125
|
-
<
|
|
125
|
+
<div className="edit-site-sidebar-navigation-screen__description">
|
|
126
126
|
{ description }
|
|
127
|
-
</
|
|
127
|
+
</div>
|
|
128
128
|
) }
|
|
129
129
|
{ content }
|
|
130
130
|
</div>
|
|
@@ -6,7 +6,6 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { NAVIGATION_POST_TYPE } from '../../utils/constants';
|
|
10
9
|
import Editor from '../editor';
|
|
11
10
|
import SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';
|
|
12
11
|
import { unlock } from '../../lock-unlock';
|
|
@@ -20,9 +19,7 @@ function MobileNavigationItemView() {
|
|
|
20
19
|
return canvas === 'edit' ? (
|
|
21
20
|
<Editor />
|
|
22
21
|
) : (
|
|
23
|
-
<SidebarNavigationScreenNavigationMenu
|
|
24
|
-
backPath={ { postType: NAVIGATION_POST_TYPE } }
|
|
25
|
-
/>
|
|
22
|
+
<SidebarNavigationScreenNavigationMenu backPath="/navigation" />
|
|
26
23
|
);
|
|
27
24
|
}
|
|
28
25
|
|
|
@@ -6,8 +6,19 @@ import { __ } from '@wordpress/i18n';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
+
import { Notice, __experimentalSpacer as Spacer } from '@wordpress/components';
|
|
9
10
|
import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';
|
|
10
11
|
|
|
12
|
+
function NotFoundError() {
|
|
13
|
+
return (
|
|
14
|
+
<Notice status="error" isDismissible={ false }>
|
|
15
|
+
{ __(
|
|
16
|
+
'The requested page could not be found. Please check the URL.'
|
|
17
|
+
) }
|
|
18
|
+
</Notice>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
11
22
|
export const notFoundRoute = {
|
|
12
23
|
name: 'notfound',
|
|
13
24
|
path: '*',
|
|
@@ -15,13 +26,13 @@ export const notFoundRoute = {
|
|
|
15
26
|
sidebar: <SidebarNavigationScreenMain />,
|
|
16
27
|
mobile: (
|
|
17
28
|
<SidebarNavigationScreenMain
|
|
18
|
-
customDescription={
|
|
29
|
+
customDescription={ <NotFoundError /> }
|
|
19
30
|
/>
|
|
20
31
|
),
|
|
21
32
|
content: (
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
</
|
|
33
|
+
<Spacer padding={ 2 }>
|
|
34
|
+
<NotFoundError />
|
|
35
|
+
</Spacer>
|
|
25
36
|
),
|
|
26
37
|
},
|
|
27
38
|
};
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Internal dependencies
|
|
3
8
|
*/
|
|
4
9
|
import SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';
|
|
5
10
|
import PagePatterns from '../page-patterns';
|
|
11
|
+
import { unlock } from '../../lock-unlock';
|
|
12
|
+
|
|
13
|
+
const { useLocation } = unlock( routerPrivateApis );
|
|
14
|
+
|
|
15
|
+
function MobilePatternsView() {
|
|
16
|
+
const { query = {} } = useLocation();
|
|
17
|
+
const { categoryId } = query;
|
|
18
|
+
|
|
19
|
+
return !! categoryId ? (
|
|
20
|
+
<PagePatterns />
|
|
21
|
+
) : (
|
|
22
|
+
<SidebarNavigationScreenPatterns backPath="/" />
|
|
23
|
+
);
|
|
24
|
+
}
|
|
6
25
|
|
|
7
26
|
export const patternsRoute = {
|
|
8
27
|
name: 'patterns',
|
|
@@ -10,6 +29,6 @@ export const patternsRoute = {
|
|
|
10
29
|
areas: {
|
|
11
30
|
sidebar: <SidebarNavigationScreenPatterns backPath="/" />,
|
|
12
31
|
content: <PagePatterns />,
|
|
13
|
-
mobile: <
|
|
32
|
+
mobile: <MobilePatternsView />,
|
|
14
33
|
},
|
|
15
34
|
};
|
|
@@ -28,8 +28,8 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
|
|
|
28
28
|
import { store as editSiteStore } from '../../store';
|
|
29
29
|
import SiteIcon from '../site-icon';
|
|
30
30
|
import { unlock } from '../../lock-unlock';
|
|
31
|
-
const { useHistory } = unlock( routerPrivateApis );
|
|
32
31
|
import { SidebarNavigationContext } from '../sidebar';
|
|
32
|
+
const { useLocation, useHistory } = unlock( routerPrivateApis );
|
|
33
33
|
|
|
34
34
|
const SiteHub = memo(
|
|
35
35
|
forwardRef( ( { isTransparent }, ref ) => {
|
|
@@ -117,29 +117,25 @@ export default SiteHub;
|
|
|
117
117
|
|
|
118
118
|
export const SiteHubMobile = memo(
|
|
119
119
|
forwardRef( ( { isTransparent }, ref ) => {
|
|
120
|
+
const { path } = useLocation();
|
|
120
121
|
const history = useHistory();
|
|
121
122
|
const { navigate } = useContext( SidebarNavigationContext );
|
|
122
123
|
|
|
123
|
-
const { dashboardLink,
|
|
124
|
-
( select )
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
? filterURLForDisplay( _site?.url )
|
|
137
|
-
: _site?.title,
|
|
138
|
-
};
|
|
139
|
-
},
|
|
140
|
-
[]
|
|
141
|
-
);
|
|
124
|
+
const { dashboardLink, homeUrl, siteTitle } = useSelect( ( select ) => {
|
|
125
|
+
const { getSettings } = unlock( select( editSiteStore ) );
|
|
126
|
+
const { getEntityRecord } = select( coreStore );
|
|
127
|
+
const _site = getEntityRecord( 'root', 'site' );
|
|
128
|
+
return {
|
|
129
|
+
dashboardLink: getSettings().__experimentalDashboardLink,
|
|
130
|
+
homeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,
|
|
131
|
+
siteTitle:
|
|
132
|
+
! _site?.title && !! _site?.url
|
|
133
|
+
? filterURLForDisplay( _site?.url )
|
|
134
|
+
: _site?.title,
|
|
135
|
+
};
|
|
136
|
+
}, [] );
|
|
142
137
|
const { open: openCommandCenter } = useDispatch( commandsStore );
|
|
138
|
+
const isRoot = path === '/';
|
|
143
139
|
|
|
144
140
|
return (
|
|
145
141
|
<div className="edit-site-site-hub">
|
|
@@ -160,7 +156,7 @@ export const SiteHubMobile = memo(
|
|
|
160
156
|
transform: 'scale(0.5)',
|
|
161
157
|
borderRadius: 4,
|
|
162
158
|
} }
|
|
163
|
-
{ ...(
|
|
159
|
+
{ ...( isRoot
|
|
164
160
|
? {
|
|
165
161
|
href: dashboardLink,
|
|
166
162
|
label: __( 'Go to the Dashboard' ),
|
|
@@ -57,6 +57,7 @@ export default function WelcomeGuidePage() {
|
|
|
57
57
|
</h1>
|
|
58
58
|
<p className="edit-site-welcome-guide__text">
|
|
59
59
|
{ __(
|
|
60
|
+
// eslint-disable-next-line no-restricted-syntax -- 'sidebar' is a common web design term for layouts
|
|
60
61
|
'It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.'
|
|
61
62
|
) }
|
|
62
63
|
</p>
|