@wordpress/edit-site 5.3.1 → 5.3.2

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.
Files changed (60) hide show
  1. package/build/components/editor/index.js +1 -15
  2. package/build/components/editor/index.js.map +1 -1
  3. package/build/components/global-styles/block-preview-panel.js +10 -12
  4. package/build/components/global-styles/block-preview-panel.js.map +1 -1
  5. package/build/components/global-styles/context-menu.js +9 -2
  6. package/build/components/global-styles/context-menu.js.map +1 -1
  7. package/build/components/global-styles/screen-border.js +0 -6
  8. package/build/components/global-styles/screen-border.js.map +1 -1
  9. package/build/components/global-styles/screen-effects.js +53 -0
  10. package/build/components/global-styles/screen-effects.js.map +1 -0
  11. package/build/components/global-styles/shadow-panel.js +1 -1
  12. package/build/components/global-styles/shadow-panel.js.map +1 -1
  13. package/build/components/global-styles/ui.js +7 -0
  14. package/build/components/global-styles/ui.js.map +1 -1
  15. package/build/components/layout/index.js +3 -1
  16. package/build/components/layout/index.js.map +1 -1
  17. package/build/components/save-panel/index.js +77 -0
  18. package/build/components/save-panel/index.js.map +1 -0
  19. package/build/components/sidebar/index.js +25 -2
  20. package/build/components/sidebar/index.js.map +1 -1
  21. package/build-module/components/editor/index.js +3 -17
  22. package/build-module/components/editor/index.js.map +1 -1
  23. package/build-module/components/global-styles/block-preview-panel.js +10 -11
  24. package/build-module/components/global-styles/block-preview-panel.js.map +1 -1
  25. package/build-module/components/global-styles/context-menu.js +9 -3
  26. package/build-module/components/global-styles/context-menu.js.map +1 -1
  27. package/build-module/components/global-styles/screen-border.js +0 -5
  28. package/build-module/components/global-styles/screen-border.js.map +1 -1
  29. package/build-module/components/global-styles/screen-effects.js +35 -0
  30. package/build-module/components/global-styles/screen-effects.js.map +1 -0
  31. package/build-module/components/global-styles/shadow-panel.js +1 -1
  32. package/build-module/components/global-styles/shadow-panel.js.map +1 -1
  33. package/build-module/components/global-styles/ui.js +6 -0
  34. package/build-module/components/global-styles/ui.js.map +1 -1
  35. package/build-module/components/layout/index.js +2 -1
  36. package/build-module/components/layout/index.js.map +1 -1
  37. package/build-module/components/save-panel/index.js +63 -0
  38. package/build-module/components/save-panel/index.js.map +1 -0
  39. package/build-module/components/sidebar/index.js +22 -2
  40. package/build-module/components/sidebar/index.js.map +1 -1
  41. package/build-style/style-rtl.css +83 -26
  42. package/build-style/style.css +83 -26
  43. package/package.json +8 -8
  44. package/src/components/editor/index.js +3 -43
  45. package/src/components/editor/style.scss +2 -2
  46. package/src/components/global-styles/block-preview-panel.js +8 -12
  47. package/src/components/global-styles/context-menu.js +14 -2
  48. package/src/components/global-styles/screen-border.js +0 -5
  49. package/src/components/global-styles/screen-effects.js +28 -0
  50. package/src/components/global-styles/shadow-panel.js +1 -1
  51. package/src/components/global-styles/style.scss +0 -4
  52. package/src/components/global-styles/ui.js +5 -0
  53. package/src/components/layout/index.js +3 -0
  54. package/src/components/layout/style.scss +25 -3
  55. package/src/components/save-panel/index.js +65 -0
  56. package/src/components/save-panel/style.scss +5 -0
  57. package/src/components/sidebar/index.js +26 -6
  58. package/src/components/sidebar/style.scss +15 -0
  59. package/src/components/site-hub/style.scss +1 -0
  60. package/src/style.scss +1 -0
@@ -403,13 +403,28 @@ body.is-fullscreen-mode .interface-interface-skeleton {
403
403
  bottom: auto;
404
404
  right: auto;
405
405
  left: 0;
406
- width: 280px;
407
406
  color: #1e1e1e;
407
+ background: #fff;
408
+ width: 100vw;
409
+ }
410
+ @media (min-width: 782px) {
411
+ .interface-interface-skeleton__actions {
412
+ width: 280px;
413
+ }
408
414
  }
409
415
  .interface-interface-skeleton__actions:focus, .interface-interface-skeleton__actions:focus-within {
410
- top: auto;
416
+ top: 46px;
411
417
  bottom: 0;
412
418
  }
419
+ @media (min-width: 782px) {
420
+ .interface-interface-skeleton__actions:focus, .interface-interface-skeleton__actions:focus-within {
421
+ border-right: 1px solid #ddd;
422
+ top: 32px;
423
+ }
424
+ .is-fullscreen-mode .interface-interface-skeleton__actions:focus, .is-fullscreen-mode .interface-interface-skeleton__actions:focus-within {
425
+ top: 0;
426
+ }
427
+ }
413
428
 
414
429
  .interface-more-menu-dropdown {
415
430
  margin-right: -4px;
@@ -1049,7 +1064,6 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
1049
1064
  .edit-site-global-styles__block-preview-panel {
1050
1065
  position: relative;
1051
1066
  width: 100%;
1052
- height: 152px;
1053
1067
  overflow: auto;
1054
1068
  border: #e0e0e0 1px solid;
1055
1069
  border-radius: 2px;
@@ -1832,7 +1846,7 @@ h3.edit-site-template-card__template-areas-title {
1832
1846
  display: flex;
1833
1847
  justify-content: center;
1834
1848
  }
1835
- .interface-interface-skeleton__actions:focus .edit-site-editor__toggle-save-panel, .interface-interface-skeleton__actions:focus-within .edit-site-editor__toggle-save-panel {
1849
+ .edit-site-layout__actions:focus .edit-site-editor__toggle-save-panel, .edit-site-layout__actions:focus-within .edit-site-editor__toggle-save-panel {
1836
1850
  top: auto;
1837
1851
  bottom: 0;
1838
1852
  }
@@ -2200,28 +2214,9 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2200
2214
  top: 0;
2201
2215
  }
2202
2216
  .edit-site-layout__sidebar > div {
2203
- overflow-y: auto;
2204
- min-height: 100%;
2205
- visibility: hidden;
2206
- scrollbar-color: #757575 #1e1e1e;
2207
- scrollbar-width: thin;
2208
- scrollbar-gutter: stable;
2209
- }
2210
- .edit-site-layout__sidebar > div::-webkit-scrollbar {
2211
- width: 12px;
2212
- height: 12px;
2213
- }
2214
- .edit-site-layout__sidebar > div::-webkit-scrollbar-track {
2215
- background-color: #1e1e1e;
2216
- }
2217
- .edit-site-layout__sidebar > div::-webkit-scrollbar-thumb {
2218
- background-color: #757575;
2219
- border-radius: 8px;
2220
- border: 3px solid transparent;
2221
- background-clip: padding-box;
2222
- }
2223
- .edit-site-layout__sidebar > div:hover, .edit-site-layout__sidebar > div:focus, .edit-site-layout__sidebar > div > * {
2224
- visibility: visible;
2217
+ display: flex;
2218
+ flex-direction: column;
2219
+ height: 100%;
2225
2220
  }
2226
2221
  .edit-site-layout__sidebar .resizable-editor__drag-handle {
2227
2222
  left: 0;
@@ -2324,6 +2319,67 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2324
2319
  border-radius: 2px;
2325
2320
  }
2326
2321
 
2322
+ .edit-site-layout__actions {
2323
+ z-index: 100000;
2324
+ position: fixed !important;
2325
+ top: -9999em;
2326
+ bottom: auto;
2327
+ right: auto;
2328
+ left: 0;
2329
+ width: 280px;
2330
+ color: #1e1e1e;
2331
+ background: #fff;
2332
+ }
2333
+ .edit-site-layout__actions:focus, .edit-site-layout__actions:focus-within {
2334
+ top: 0;
2335
+ bottom: 0;
2336
+ }
2337
+ @media (min-width: 782px) {
2338
+ .edit-site-layout__actions {
2339
+ border-right: 1px solid #ddd;
2340
+ }
2341
+ }
2342
+
2343
+ @media (min-width: 600px) {
2344
+ .edit-site-save-panel__modal {
2345
+ width: 600px;
2346
+ }
2347
+ }
2348
+
2349
+ .edit-site-sidebar__content {
2350
+ flex-grow: 1;
2351
+ overflow-y: auto;
2352
+ visibility: hidden;
2353
+ scrollbar-color: #757575 #1e1e1e;
2354
+ scrollbar-width: thin;
2355
+ scrollbar-gutter: stable;
2356
+ }
2357
+ .edit-site-sidebar__content::-webkit-scrollbar {
2358
+ width: 12px;
2359
+ height: 12px;
2360
+ }
2361
+ .edit-site-sidebar__content::-webkit-scrollbar-track {
2362
+ background-color: #1e1e1e;
2363
+ }
2364
+ .edit-site-sidebar__content::-webkit-scrollbar-thumb {
2365
+ background-color: #757575;
2366
+ border-radius: 8px;
2367
+ border: 3px solid transparent;
2368
+ background-clip: padding-box;
2369
+ }
2370
+ .edit-site-sidebar__content:hover, .edit-site-sidebar__content:focus, .edit-site-sidebar__content > * {
2371
+ visibility: visible;
2372
+ }
2373
+
2374
+ .edit-site-sidebar__footer {
2375
+ border-top: 1px solid #2f2f2f;
2376
+ flex-shrink: 0;
2377
+ margin: 0 24px;
2378
+ padding: 24px 0;
2379
+ display: flex;
2380
+ justify-content: flex-end;
2381
+ }
2382
+
2327
2383
  .edit-site-sidebar__content.edit-site-sidebar__content {
2328
2384
  overflow-x: unset;
2329
2385
  }
@@ -2425,6 +2481,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2425
2481
 
2426
2482
  .edit-site-site-hub__edit-button {
2427
2483
  height: 32px;
2484
+ color: #fff;
2428
2485
  }
2429
2486
 
2430
2487
  .edit-site-site-hub__post-type {
@@ -403,13 +403,28 @@ body.is-fullscreen-mode .interface-interface-skeleton {
403
403
  bottom: auto;
404
404
  left: auto;
405
405
  right: 0;
406
- width: 280px;
407
406
  color: #1e1e1e;
407
+ background: #fff;
408
+ width: 100vw;
409
+ }
410
+ @media (min-width: 782px) {
411
+ .interface-interface-skeleton__actions {
412
+ width: 280px;
413
+ }
408
414
  }
409
415
  .interface-interface-skeleton__actions:focus, .interface-interface-skeleton__actions:focus-within {
410
- top: auto;
416
+ top: 46px;
411
417
  bottom: 0;
412
418
  }
419
+ @media (min-width: 782px) {
420
+ .interface-interface-skeleton__actions:focus, .interface-interface-skeleton__actions:focus-within {
421
+ border-left: 1px solid #ddd;
422
+ top: 32px;
423
+ }
424
+ .is-fullscreen-mode .interface-interface-skeleton__actions:focus, .is-fullscreen-mode .interface-interface-skeleton__actions:focus-within {
425
+ top: 0;
426
+ }
427
+ }
413
428
 
414
429
  .interface-more-menu-dropdown {
415
430
  margin-left: -4px;
@@ -1049,7 +1064,6 @@ textarea.edit-site-code-editor-text-area.edit-site-code-editor-text-area:-ms-inp
1049
1064
  .edit-site-global-styles__block-preview-panel {
1050
1065
  position: relative;
1051
1066
  width: 100%;
1052
- height: 152px;
1053
1067
  overflow: auto;
1054
1068
  border: #e0e0e0 1px solid;
1055
1069
  border-radius: 2px;
@@ -1832,7 +1846,7 @@ h3.edit-site-template-card__template-areas-title {
1832
1846
  display: flex;
1833
1847
  justify-content: center;
1834
1848
  }
1835
- .interface-interface-skeleton__actions:focus .edit-site-editor__toggle-save-panel, .interface-interface-skeleton__actions:focus-within .edit-site-editor__toggle-save-panel {
1849
+ .edit-site-layout__actions:focus .edit-site-editor__toggle-save-panel, .edit-site-layout__actions:focus-within .edit-site-editor__toggle-save-panel {
1836
1850
  top: auto;
1837
1851
  bottom: 0;
1838
1852
  }
@@ -2200,28 +2214,9 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2200
2214
  top: 0;
2201
2215
  }
2202
2216
  .edit-site-layout__sidebar > div {
2203
- overflow-y: auto;
2204
- min-height: 100%;
2205
- visibility: hidden;
2206
- scrollbar-color: #757575 #1e1e1e;
2207
- scrollbar-width: thin;
2208
- scrollbar-gutter: stable;
2209
- }
2210
- .edit-site-layout__sidebar > div::-webkit-scrollbar {
2211
- width: 12px;
2212
- height: 12px;
2213
- }
2214
- .edit-site-layout__sidebar > div::-webkit-scrollbar-track {
2215
- background-color: #1e1e1e;
2216
- }
2217
- .edit-site-layout__sidebar > div::-webkit-scrollbar-thumb {
2218
- background-color: #757575;
2219
- border-radius: 8px;
2220
- border: 3px solid transparent;
2221
- background-clip: padding-box;
2222
- }
2223
- .edit-site-layout__sidebar > div:hover, .edit-site-layout__sidebar > div:focus, .edit-site-layout__sidebar > div > * {
2224
- visibility: visible;
2217
+ display: flex;
2218
+ flex-direction: column;
2219
+ height: 100%;
2225
2220
  }
2226
2221
  .edit-site-layout__sidebar .resizable-editor__drag-handle {
2227
2222
  right: 0;
@@ -2324,6 +2319,67 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2324
2319
  border-radius: 2px;
2325
2320
  }
2326
2321
 
2322
+ .edit-site-layout__actions {
2323
+ z-index: 100000;
2324
+ position: fixed !important;
2325
+ top: -9999em;
2326
+ bottom: auto;
2327
+ left: auto;
2328
+ right: 0;
2329
+ width: 280px;
2330
+ color: #1e1e1e;
2331
+ background: #fff;
2332
+ }
2333
+ .edit-site-layout__actions:focus, .edit-site-layout__actions:focus-within {
2334
+ top: 0;
2335
+ bottom: 0;
2336
+ }
2337
+ @media (min-width: 782px) {
2338
+ .edit-site-layout__actions {
2339
+ border-left: 1px solid #ddd;
2340
+ }
2341
+ }
2342
+
2343
+ @media (min-width: 600px) {
2344
+ .edit-site-save-panel__modal {
2345
+ width: 600px;
2346
+ }
2347
+ }
2348
+
2349
+ .edit-site-sidebar__content {
2350
+ flex-grow: 1;
2351
+ overflow-y: auto;
2352
+ visibility: hidden;
2353
+ scrollbar-color: #757575 #1e1e1e;
2354
+ scrollbar-width: thin;
2355
+ scrollbar-gutter: stable;
2356
+ }
2357
+ .edit-site-sidebar__content::-webkit-scrollbar {
2358
+ width: 12px;
2359
+ height: 12px;
2360
+ }
2361
+ .edit-site-sidebar__content::-webkit-scrollbar-track {
2362
+ background-color: #1e1e1e;
2363
+ }
2364
+ .edit-site-sidebar__content::-webkit-scrollbar-thumb {
2365
+ background-color: #757575;
2366
+ border-radius: 8px;
2367
+ border: 3px solid transparent;
2368
+ background-clip: padding-box;
2369
+ }
2370
+ .edit-site-sidebar__content:hover, .edit-site-sidebar__content:focus, .edit-site-sidebar__content > * {
2371
+ visibility: visible;
2372
+ }
2373
+
2374
+ .edit-site-sidebar__footer {
2375
+ border-top: 1px solid #2f2f2f;
2376
+ flex-shrink: 0;
2377
+ margin: 0 24px;
2378
+ padding: 24px 0;
2379
+ display: flex;
2380
+ justify-content: flex-end;
2381
+ }
2382
+
2327
2383
  .edit-site-sidebar__content.edit-site-sidebar__content {
2328
2384
  overflow-x: unset;
2329
2385
  }
@@ -2425,6 +2481,7 @@ body.is-fullscreen-mode .edit-site .components-editor-notices__snackbar {
2425
2481
 
2426
2482
  .edit-site-site-hub__edit-button {
2427
2483
  height: 32px;
2484
+ color: #fff;
2428
2485
  }
2429
2486
 
2430
2487
  .edit-site-site-hub__post-type {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/edit-site",
3
- "version": "5.3.1",
3
+ "version": "5.3.2",
4
4
  "description": "Edit Site Page module for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,33 +29,33 @@
29
29
  "@babel/runtime": "^7.16.0",
30
30
  "@wordpress/a11y": "^3.26.1",
31
31
  "@wordpress/api-fetch": "^6.23.1",
32
- "@wordpress/block-editor": "^11.3.1",
33
- "@wordpress/block-library": "^8.3.1",
32
+ "@wordpress/block-editor": "^11.3.2",
33
+ "@wordpress/block-library": "^8.3.2",
34
34
  "@wordpress/blocks": "^12.3.1",
35
35
  "@wordpress/components": "^23.3.1",
36
36
  "@wordpress/compose": "^6.3.1",
37
37
  "@wordpress/core-data": "^6.3.1",
38
38
  "@wordpress/data": "^8.3.1",
39
39
  "@wordpress/deprecated": "^3.26.1",
40
- "@wordpress/editor": "^13.3.1",
40
+ "@wordpress/editor": "^13.3.2",
41
41
  "@wordpress/element": "^5.3.1",
42
42
  "@wordpress/experiments": "^0.8.1",
43
43
  "@wordpress/hooks": "^3.26.1",
44
44
  "@wordpress/html-entities": "^3.26.1",
45
45
  "@wordpress/i18n": "^4.26.1",
46
46
  "@wordpress/icons": "^9.17.1",
47
- "@wordpress/interface": "^5.3.1",
47
+ "@wordpress/interface": "^5.3.2",
48
48
  "@wordpress/keyboard-shortcuts": "^4.3.1",
49
49
  "@wordpress/keycodes": "^3.26.1",
50
50
  "@wordpress/media-utils": "^4.17.1",
51
51
  "@wordpress/notices": "^3.26.1",
52
52
  "@wordpress/plugins": "^5.3.1",
53
53
  "@wordpress/preferences": "^3.3.1",
54
- "@wordpress/reusable-blocks": "^4.3.1",
54
+ "@wordpress/reusable-blocks": "^4.3.2",
55
55
  "@wordpress/style-engine": "^1.9.1",
56
56
  "@wordpress/url": "^3.27.1",
57
57
  "@wordpress/viewport": "^5.3.1",
58
- "@wordpress/widgets": "^3.3.1",
58
+ "@wordpress/widgets": "^3.3.2",
59
59
  "classnames": "^2.3.1",
60
60
  "colord": "^2.9.2",
61
61
  "downloadjs": "^1.4.7",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "e9ff92d836928aba65dde94d9d193bc401a934d7"
76
+ "gitHead": "3eb2c536278d5a17f698b9c378fe3db746a89622"
77
77
  }
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { useMemo } from '@wordpress/element';
5
5
  import { useSelect, useDispatch } from '@wordpress/data';
6
- import { Button, Notice } from '@wordpress/components';
6
+ import { Notice } from '@wordpress/components';
7
7
  import { EntityProvider, store as coreStore } from '@wordpress/core-data';
8
8
  import { store as preferencesStore } from '@wordpress/preferences';
9
9
  import {
@@ -16,11 +16,7 @@ import {
16
16
  ComplementaryArea,
17
17
  store as interfaceStore,
18
18
  } from '@wordpress/interface';
19
- import {
20
- EditorNotices,
21
- EditorSnackbars,
22
- EntitiesSavedStates,
23
- } from '@wordpress/editor';
19
+ import { EditorNotices, EditorSnackbars } from '@wordpress/editor';
24
20
  import { __ } from '@wordpress/i18n';
25
21
 
26
22
  /**
@@ -64,7 +60,6 @@ export default function Editor() {
64
60
  isRightSidebarOpen,
65
61
  isInserterOpen,
66
62
  isListViewOpen,
67
- isSaveViewOpen,
68
63
  showIconLabels,
69
64
  } = useSelect( ( select ) => {
70
65
  const {
@@ -75,7 +70,6 @@ export default function Editor() {
75
70
  getCanvasMode,
76
71
  isInserterOpened,
77
72
  isListViewOpened,
78
- isSaveViewOpened,
79
73
  } = unlock( select( editSiteStore ) );
80
74
  const { hasFinishedResolution, getEntityRecord } = select( coreStore );
81
75
  const { __unstableGetEditorMode } = select( blockEditorStore );
@@ -104,7 +98,6 @@ export default function Editor() {
104
98
  blockEditorMode: __unstableGetEditorMode(),
105
99
  isInserterOpen: isInserterOpened(),
106
100
  isListViewOpen: isListViewOpened(),
107
- isSaveViewOpen: isSaveViewOpened(),
108
101
  isRightSidebarOpen: getActiveComplementaryArea(
109
102
  editSiteStore.name
110
103
  ),
@@ -114,8 +107,7 @@ export default function Editor() {
114
107
  ),
115
108
  };
116
109
  }, [] );
117
- const { setIsSaveViewOpened, setEditedPostContext } =
118
- useDispatch( editSiteStore );
110
+ const { setEditedPostContext } = useDispatch( editSiteStore );
119
111
 
120
112
  const isViewMode = canvasMode === 'view';
121
113
  const isEditMode = canvasMode === 'edit';
@@ -211,38 +203,6 @@ export default function Editor() {
211
203
  <ComplementaryArea.Slot scope="core/edit-site" />
212
204
  )
213
205
  }
214
- actions={
215
- isEditMode && (
216
- <>
217
- { isSaveViewOpen ? (
218
- <EntitiesSavedStates
219
- close={ () =>
220
- setIsSaveViewOpened(
221
- false
222
- )
223
- }
224
- />
225
- ) : (
226
- <div className="edit-site-editor__toggle-save-panel">
227
- <Button
228
- variant="secondary"
229
- className="edit-site-editor__toggle-save-panel-button"
230
- onClick={ () =>
231
- setIsSaveViewOpened(
232
- true
233
- )
234
- }
235
- aria-expanded={ false }
236
- >
237
- { __(
238
- 'Open save panel'
239
- ) }
240
- </Button>
241
- </div>
242
- ) }
243
- </>
244
- )
245
- }
246
206
  footer={
247
207
  showBlockBreakcrumb && (
248
208
  <BlockBreadcrumb
@@ -7,8 +7,8 @@
7
7
  display: flex;
8
8
  justify-content: center;
9
9
 
10
- .interface-interface-skeleton__actions:focus &,
11
- .interface-interface-skeleton__actions:focus-within & {
10
+ .edit-site-layout__actions:focus &,
11
+ .edit-site-layout__actions:focus-within & {
12
12
  top: auto;
13
13
  bottom: 0;
14
14
  }
@@ -3,14 +3,9 @@
3
3
  */
4
4
  import { BlockPreview } from '@wordpress/block-editor';
5
5
  import { getBlockType, getBlockFromExample } from '@wordpress/blocks';
6
- import { useResizeObserver } from '@wordpress/compose';
7
6
  import { __experimentalSpacer as Spacer } from '@wordpress/components';
8
7
 
9
8
  const BlockPreviewPanel = ( { name, variation = '' } ) => {
10
- const [
11
- containerResizeListener,
12
- { width: containerWidth, height: containerHeight },
13
- ] = useResizeObserver();
14
9
  const blockExample = getBlockType( name )?.example;
15
10
  const blockExampleWithVariation = {
16
11
  ...blockExample,
@@ -25,23 +20,24 @@ const BlockPreviewPanel = ( { name, variation = '' } ) => {
25
20
  name,
26
21
  variation ? blockExampleWithVariation : blockExample
27
22
  );
28
- const viewportWidth = blockExample?.viewportWidth || containerWidth;
29
- const minHeight = containerHeight;
23
+ const viewportWidth = blockExample?.viewportWidth || null;
24
+ const previewHeight = '150px';
30
25
 
31
26
  return ! blockExample ? null : (
32
27
  <Spacer marginX={ 4 } marginBottom={ 4 }>
33
- <div className="edit-site-global-styles__block-preview-panel">
34
- { containerResizeListener }
35
-
28
+ <div
29
+ className="edit-site-global-styles__block-preview-panel"
30
+ style={ { maxHeight: previewHeight, boxSizing: 'initial' } }
31
+ >
36
32
  <BlockPreview
37
33
  blocks={ blocks }
38
34
  viewportWidth={ viewportWidth }
39
- minHeight={ minHeight }
35
+ minHeight={ previewHeight }
40
36
  additionalStyles={ [
41
37
  {
42
38
  css: `
43
39
  body{
44
- min-height:${ minHeight }px;
40
+ min-height:${ previewHeight };
45
41
  display:flex;align-items:center;justify-content:center;
46
42
  }
47
43
  `,
@@ -12,6 +12,7 @@ import {
12
12
  import {
13
13
  typography,
14
14
  border,
15
+ shadow,
15
16
  color,
16
17
  layout,
17
18
  chevronLeft,
@@ -32,11 +33,13 @@ import { useHasVariationsPanel } from './variations-panel';
32
33
  import { NavigationButtonAsItem } from './navigation-button';
33
34
  import { IconWithCurrentColor } from './icon-with-current-color';
34
35
  import { ScreenVariations } from './screen-variations';
36
+ import { useHasShadowControl } from './shadow-panel';
35
37
 
36
38
  function ContextMenu( { name, parentMenu = '' } ) {
37
39
  const hasTypographyPanel = useHasTypographyPanel( name );
38
40
  const hasColorPanel = useHasColorPanel( name );
39
41
  const hasBorderPanel = useHasBorderPanel( name );
42
+ const hasEffectsPanel = useHasShadowControl( name );
40
43
  const hasDimensionsPanel = useHasDimensionsPanel( name );
41
44
  const hasLayoutPanel = hasDimensionsPanel;
42
45
  const hasVariationsPanel = useHasVariationsPanel( name, parentMenu );
@@ -85,9 +88,18 @@ function ContextMenu( { name, parentMenu = '' } ) {
85
88
  <NavigationButtonAsItem
86
89
  icon={ border }
87
90
  path={ parentMenu + '/border' }
88
- aria-label={ __( 'Border & shadow styles' ) }
91
+ aria-label={ __( 'Border' ) }
89
92
  >
90
- { __( 'Border & Shadow' ) }
93
+ { __( 'Border' ) }
94
+ </NavigationButtonAsItem>
95
+ ) }
96
+ { hasEffectsPanel && (
97
+ <NavigationButtonAsItem
98
+ icon={ shadow }
99
+ path={ parentMenu + '/effects' }
100
+ aria-label={ __( 'Shadow' ) }
101
+ >
102
+ { __( 'Shadow' ) }
91
103
  </NavigationButtonAsItem>
92
104
  ) }
93
105
  { hasLayoutPanel && (
@@ -10,12 +10,10 @@ import ScreenHeader from './header';
10
10
  import BorderPanel, { useHasBorderPanel } from './border-panel';
11
11
  import BlockPreviewPanel from './block-preview-panel';
12
12
  import { getVariationClassName } from './utils';
13
- import ShadowPanel, { useHasShadowControl } from './shadow-panel';
14
13
 
15
14
  function ScreenBorder( { name, variation = '' } ) {
16
15
  const hasBorderPanel = useHasBorderPanel( name );
17
16
  const variationClassName = getVariationClassName( variation );
18
- const hasShadowPanel = useHasShadowControl( name );
19
17
  return (
20
18
  <>
21
19
  <ScreenHeader title={ __( 'Border & Shadow' ) } />
@@ -23,9 +21,6 @@ function ScreenBorder( { name, variation = '' } ) {
23
21
  { hasBorderPanel && (
24
22
  <BorderPanel name={ name } variation={ variation } />
25
23
  ) }
26
- { hasShadowPanel && (
27
- <ShadowPanel name={ name } variation={ variation } />
28
- ) }
29
24
  </>
30
25
  );
31
26
  }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import ScreenHeader from './header';
10
+ import BlockPreviewPanel from './block-preview-panel';
11
+ import { getVariationClassName } from './utils';
12
+ import ShadowPanel, { useHasShadowControl } from './shadow-panel';
13
+
14
+ function ScreenEffects( { name, variation = '' } ) {
15
+ const variationClassName = getVariationClassName( variation );
16
+ const hasShadowPanel = useHasShadowControl( name );
17
+ return (
18
+ <>
19
+ <ScreenHeader title={ __( 'Shadow' ) } />
20
+ <BlockPreviewPanel name={ name } variation={ variationClassName } />
21
+ { hasShadowPanel && (
22
+ <ShadowPanel name={ name } variation={ variation } />
23
+ ) }
24
+ </>
25
+ );
26
+ }
27
+
28
+ export default ScreenEffects;
@@ -129,7 +129,7 @@ function ShadowPopoverContainer( { shadow, onShadowChange } ) {
129
129
  return (
130
130
  <div className="edit-site-global-styles__shadow-panel">
131
131
  <VStack spacing={ 4 }>
132
- <Heading level={ 5 }>{ __( 'Shadows' ) }</Heading>
132
+ <Heading level={ 5 }>{ __( 'Shadow' ) }</Heading>
133
133
  <ShadowPresets
134
134
  presets={ shadows }
135
135
  activeShadow={ shadow }
@@ -1,6 +1,3 @@
1
- // Variables
2
- $block-preview-height: 150px;
3
-
4
1
  .edit-site-global-styles-preview {
5
2
  display: flex;
6
3
  align-items: center;
@@ -130,7 +127,6 @@ $block-preview-height: 150px;
130
127
  .edit-site-global-styles__block-preview-panel {
131
128
  position: relative;
132
129
  width: 100%;
133
- height: $block-preview-height + 2 * $border-width;
134
130
  overflow: auto;
135
131
  border: $gray-200 $border-width solid;
136
132
  border-radius: $radius-block-ui;
@@ -38,6 +38,7 @@ import ScreenBorder from './screen-border';
38
38
  import StyleBook from '../style-book';
39
39
  import ScreenCSS from './screen-css';
40
40
  import { unlock } from '../../experiments';
41
+ import ScreenEffects from './screen-effects';
41
42
 
42
43
  const SLOT_FILL_NAME = 'GlobalStylesMenu';
43
44
  const { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =
@@ -228,6 +229,10 @@ function ContextScreens( { name, parentMenu = '', variation = '' } ) {
228
229
  <ScreenBorder name={ name } variation={ variation } />
229
230
  </GlobalStylesNavigationScreen>
230
231
 
232
+ <GlobalStylesNavigationScreen path={ parentMenu + '/effects' }>
233
+ <ScreenEffects name={ name } variation={ variation } />
234
+ </GlobalStylesNavigationScreen>
235
+
231
236
  <GlobalStylesNavigationScreen path={ parentMenu + '/layout' }>
232
237
  <ScreenLayout name={ name } variation={ variation } />
233
238
  </GlobalStylesNavigationScreen>
@@ -39,6 +39,7 @@ import SiteHub from '../site-hub';
39
39
  import ResizeHandle from '../block-editor/resize-handle';
40
40
  import useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';
41
41
  import { unlock } from '../../experiments';
42
+ import SavePanel from '../save-panel';
42
43
 
43
44
  const ANIMATION_DURATION = 0.5;
44
45
  const emptyResizeHandleStyles = {
@@ -267,6 +268,8 @@ export default function Layout() {
267
268
  ) }
268
269
  </AnimatePresence>
269
270
 
271
+ <SavePanel />
272
+
270
273
  { showCanvas && (
271
274
  <div
272
275
  className={ classnames(