@wordpress/edit-post 7.32.0 → 7.34.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.
Files changed (302) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +17 -223
  3. package/build/components/browser-url/index.js.map +1 -1
  4. package/build/components/editor-initialization/index.js +0 -1
  5. package/build/components/editor-initialization/index.js.map +1 -1
  6. package/build/components/editor-initialization/listener-hooks.js +1 -38
  7. package/build/components/editor-initialization/listener-hooks.js.map +1 -1
  8. package/build/components/header/fullscreen-mode-close/index.js.map +1 -1
  9. package/build/components/header/header-toolbar/index.native.js.map +1 -1
  10. package/build/components/header/index.js +20 -51
  11. package/build/components/header/index.js.map +1 -1
  12. package/build/components/header/index.native.js +1 -1
  13. package/build/components/header/index.native.js.map +1 -1
  14. package/build/components/header/main-dashboard-button/index.js.map +1 -1
  15. package/build/components/header/more-menu/index.js +17 -42
  16. package/build/components/header/more-menu/index.js.map +1 -1
  17. package/build/components/header/more-menu/manage-patterns-menu-item.js +40 -0
  18. package/build/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
  19. package/build/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
  20. package/build/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  21. package/build/components/init-pattern-modal/index.js.map +1 -1
  22. package/build/components/keyboard-shortcuts/index.js +0 -123
  23. package/build/components/keyboard-shortcuts/index.js.map +1 -1
  24. package/build/components/layout/index.js +28 -29
  25. package/build/components/layout/index.js.map +1 -1
  26. package/build/components/layout/index.native.js.map +1 -1
  27. package/build/components/meta-boxes/index.js.map +1 -1
  28. package/build/components/meta-boxes/meta-box-visibility.js.map +1 -1
  29. package/build/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  30. package/build/components/preferences-modal/enable-custom-fields.js.map +1 -1
  31. package/build/components/preferences-modal/enable-panel.js.map +1 -1
  32. package/build/components/preferences-modal/index.js +3 -32
  33. package/build/components/preferences-modal/index.js.map +1 -1
  34. package/build/components/preferences-modal/meta-boxes-section.js.map +1 -1
  35. package/build/components/sidebar/post-format/index.js.map +1 -1
  36. package/build/components/sidebar/post-pending-status/index.js.map +1 -1
  37. package/build/components/sidebar/post-slug/index.js.map +1 -1
  38. package/build/components/sidebar/post-status/index.js +35 -12
  39. package/build/components/sidebar/post-status/index.js.map +1 -1
  40. package/build/components/sidebar/post-sticky/index.js.map +1 -1
  41. package/build/components/sidebar/post-trash/index.js.map +1 -1
  42. package/build/components/sidebar/post-visibility/index.js.map +1 -1
  43. package/build/components/sidebar/settings-header/index.js.map +1 -1
  44. package/build/components/sidebar/settings-sidebar/index.js +68 -41
  45. package/build/components/sidebar/settings-sidebar/index.js.map +1 -1
  46. package/build/components/text-editor/index.js.map +1 -1
  47. package/build/components/visual-editor/block-inspector-button.js +1 -1
  48. package/build/components/visual-editor/block-inspector-button.js.map +1 -1
  49. package/build/components/visual-editor/header.native.js.map +1 -1
  50. package/build/components/visual-editor/index.js +4 -1
  51. package/build/components/visual-editor/index.js.map +1 -1
  52. package/build/components/visual-editor/index.native.js.map +1 -1
  53. package/build/components/visual-editor/use-padding-appender.js +62 -0
  54. package/build/components/visual-editor/use-padding-appender.js.map +1 -0
  55. package/build/components/welcome-guide/default.js.map +1 -1
  56. package/build/components/welcome-guide/image.js.map +1 -1
  57. package/build/components/welcome-guide/index.js.map +1 -1
  58. package/build/components/welcome-guide/template.js.map +1 -1
  59. package/build/deprecated.js +132 -0
  60. package/build/deprecated.js.map +1 -0
  61. package/build/editor.js +2 -2
  62. package/build/editor.js.map +1 -1
  63. package/build/editor.native.js.map +1 -1
  64. package/build/hooks/commands/use-common-commands.js +5 -22
  65. package/build/hooks/commands/use-common-commands.js.map +1 -1
  66. package/build/hooks/components/index.js.map +1 -1
  67. package/build/hooks/index.js.map +1 -1
  68. package/build/hooks/use-navigate-to-entity-record.js.map +1 -1
  69. package/build/hooks/validate-multiple-use/index.js.map +1 -1
  70. package/build/index.js +19 -62
  71. package/build/index.js.map +1 -1
  72. package/build/index.native.js.map +1 -1
  73. package/build/lock-unlock.js.map +1 -1
  74. package/build/store/actions.js +10 -8
  75. package/build/store/actions.js.map +1 -1
  76. package/build/store/constants.js.map +1 -1
  77. package/build/store/index.js +1 -1
  78. package/build/store/index.js.map +1 -1
  79. package/build/store/reducer.js.map +1 -1
  80. package/build/store/selectors.js +34 -19
  81. package/build/store/selectors.js.map +1 -1
  82. package/build/utils/meta-boxes.js.map +1 -1
  83. package/build-module/components/browser-url/index.js.map +1 -1
  84. package/build-module/components/editor-initialization/index.js +1 -2
  85. package/build-module/components/editor-initialization/index.js.map +1 -1
  86. package/build-module/components/editor-initialization/listener-hooks.js +2 -38
  87. package/build-module/components/editor-initialization/listener-hooks.js.map +1 -1
  88. package/build-module/components/header/fullscreen-mode-close/index.js.map +1 -1
  89. package/build-module/components/header/header-toolbar/index.native.js.map +1 -1
  90. package/build-module/components/header/index.js +22 -53
  91. package/build-module/components/header/index.js.map +1 -1
  92. package/build-module/components/header/index.native.js +1 -1
  93. package/build-module/components/header/index.native.js.map +1 -1
  94. package/build-module/components/header/main-dashboard-button/index.js.map +1 -1
  95. package/build-module/components/header/more-menu/index.js +17 -42
  96. package/build-module/components/header/more-menu/index.js.map +1 -1
  97. package/build-module/components/header/more-menu/manage-patterns-menu-item.js +33 -0
  98. package/build-module/components/header/more-menu/manage-patterns-menu-item.js.map +1 -0
  99. package/build-module/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +1 -1
  100. package/build-module/components/header/more-menu/welcome-guide-menu-item.js.map +1 -0
  101. package/build-module/components/init-pattern-modal/index.js.map +1 -1
  102. package/build-module/components/keyboard-shortcuts/index.js +1 -124
  103. package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
  104. package/build-module/components/layout/index.js +28 -29
  105. package/build-module/components/layout/index.js.map +1 -1
  106. package/build-module/components/layout/index.native.js.map +1 -1
  107. package/build-module/components/meta-boxes/index.js.map +1 -1
  108. package/build-module/components/meta-boxes/meta-box-visibility.js.map +1 -1
  109. package/build-module/components/meta-boxes/meta-boxes-area/index.js.map +1 -1
  110. package/build-module/components/preferences-modal/enable-custom-fields.js.map +1 -1
  111. package/build-module/components/preferences-modal/enable-panel.js.map +1 -1
  112. package/build-module/components/preferences-modal/index.js +4 -32
  113. package/build-module/components/preferences-modal/index.js.map +1 -1
  114. package/build-module/components/preferences-modal/meta-boxes-section.js.map +1 -1
  115. package/build-module/components/sidebar/post-format/index.js.map +1 -1
  116. package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
  117. package/build-module/components/sidebar/post-slug/index.js.map +1 -1
  118. package/build-module/components/sidebar/post-status/index.js +36 -14
  119. package/build-module/components/sidebar/post-status/index.js.map +1 -1
  120. package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
  121. package/build-module/components/sidebar/post-trash/index.js.map +1 -1
  122. package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
  123. package/build-module/components/sidebar/settings-header/index.js.map +1 -1
  124. package/build-module/components/sidebar/settings-sidebar/index.js +71 -44
  125. package/build-module/components/sidebar/settings-sidebar/index.js.map +1 -1
  126. package/build-module/components/text-editor/index.js.map +1 -1
  127. package/build-module/components/visual-editor/block-inspector-button.js +1 -1
  128. package/build-module/components/visual-editor/block-inspector-button.js.map +1 -1
  129. package/build-module/components/visual-editor/header.native.js.map +1 -1
  130. package/build-module/components/visual-editor/index.js +4 -1
  131. package/build-module/components/visual-editor/index.js.map +1 -1
  132. package/build-module/components/visual-editor/index.native.js.map +1 -1
  133. package/build-module/components/visual-editor/use-padding-appender.js +55 -0
  134. package/build-module/components/visual-editor/use-padding-appender.js.map +1 -0
  135. package/build-module/components/welcome-guide/default.js.map +1 -1
  136. package/build-module/components/welcome-guide/image.js.map +1 -1
  137. package/build-module/components/welcome-guide/index.js.map +1 -1
  138. package/build-module/components/welcome-guide/template.js.map +1 -1
  139. package/build-module/deprecated.js +116 -0
  140. package/build-module/deprecated.js.map +1 -0
  141. package/build-module/editor.js +2 -2
  142. package/build-module/editor.js.map +1 -1
  143. package/build-module/editor.native.js.map +1 -1
  144. package/build-module/hooks/commands/use-common-commands.js +7 -24
  145. package/build-module/hooks/commands/use-common-commands.js.map +1 -1
  146. package/build-module/hooks/components/index.js.map +1 -1
  147. package/build-module/hooks/index.js.map +1 -1
  148. package/build-module/hooks/use-navigate-to-entity-record.js.map +1 -1
  149. package/build-module/hooks/validate-multiple-use/index.js.map +1 -1
  150. package/build-module/index.js +2 -15
  151. package/build-module/index.js.map +1 -1
  152. package/build-module/index.native.js.map +1 -1
  153. package/build-module/lock-unlock.js.map +1 -1
  154. package/build-module/store/actions.js +8 -7
  155. package/build-module/store/actions.js.map +1 -1
  156. package/build-module/store/constants.js.map +1 -1
  157. package/build-module/store/index.js.map +1 -1
  158. package/build-module/store/reducer.js.map +1 -1
  159. package/build-module/store/selectors.js +33 -18
  160. package/build-module/store/selectors.js.map +1 -1
  161. package/build-module/utils/meta-boxes.js.map +1 -1
  162. package/build-style/classic-rtl.css +2 -2
  163. package/build-style/classic.css +2 -2
  164. package/build-style/style-rtl.css +18 -589
  165. package/build-style/style.css +18 -589
  166. package/package.json +32 -34
  167. package/src/classic.scss +1 -1
  168. package/src/components/editor-initialization/index.js +1 -5
  169. package/src/components/editor-initialization/listener-hooks.js +1 -40
  170. package/src/components/editor-initialization/test/listener-hooks.js +1 -96
  171. package/src/components/header/index.js +25 -71
  172. package/src/components/header/index.native.js +1 -1
  173. package/src/components/header/more-menu/index.js +27 -43
  174. package/src/components/header/more-menu/manage-patterns-menu-item.js +33 -0
  175. package/src/components/header/style.scss +5 -82
  176. package/src/components/keyboard-shortcuts/index.js +2 -148
  177. package/src/components/layout/index.js +26 -47
  178. package/src/components/layout/style.scss +7 -80
  179. package/src/components/preferences-modal/index.js +3 -46
  180. package/src/components/sidebar/post-status/index.js +61 -24
  181. package/src/components/sidebar/settings-sidebar/index.js +113 -73
  182. package/src/components/visual-editor/block-inspector-button.js +1 -1
  183. package/src/components/visual-editor/index.js +4 -0
  184. package/src/components/visual-editor/use-padding-appender.js +66 -0
  185. package/src/deprecated.js +107 -0
  186. package/src/editor.js +2 -2
  187. package/src/hooks/commands/use-common-commands.js +11 -26
  188. package/src/index.js +3 -20
  189. package/src/store/actions.js +10 -12
  190. package/src/store/selectors.js +41 -33
  191. package/src/store/test/actions.js +11 -10
  192. package/src/style.scss +1 -19
  193. package/build/components/header/plugin-more-menu-item/index.js +0 -78
  194. package/build/components/header/plugin-more-menu-item/index.js.map +0 -1
  195. package/build/components/header/plugin-sidebar-more-menu-item/index.js +0 -71
  196. package/build/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
  197. package/build/components/header/post-publish-button-or-toggle.js +0 -91
  198. package/build/components/header/post-publish-button-or-toggle.js.map +0 -1
  199. package/build/components/header/preferences-menu-item/index.js +0 -31
  200. package/build/components/header/preferences-menu-item/index.js.map +0 -1
  201. package/build/components/header/tools-more-menu-group/index.js +0 -26
  202. package/build/components/header/tools-more-menu-group/index.js.map +0 -1
  203. package/build/components/header/writing-menu/index.js +0 -71
  204. package/build/components/header/writing-menu/index.js.map +0 -1
  205. package/build/components/keyboard-shortcut-help-modal/config.js +0 -78
  206. package/build/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  207. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -49
  208. package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  209. package/build/components/keyboard-shortcut-help-modal/index.js +0 -132
  210. package/build/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  211. package/build/components/keyboard-shortcut-help-modal/shortcut.js +0 -55
  212. package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  213. package/build/components/layout/actions-panel.js +0 -86
  214. package/build/components/layout/actions-panel.js.map +0 -1
  215. package/build/components/preferences-modal/enable-publish-sidebar.js +0 -38
  216. package/build/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
  217. package/build/components/sidebar/plugin-post-publish-panel/index.js +0 -39
  218. package/build/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
  219. package/build/components/sidebar/plugin-post-status-info/index.js +0 -73
  220. package/build/components/sidebar/plugin-post-status-info/index.js.map +0 -1
  221. package/build/components/sidebar/plugin-pre-publish-panel/index.js +0 -43
  222. package/build/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
  223. package/build/components/sidebar/plugin-sidebar/index.js +0 -104
  224. package/build/components/sidebar/plugin-sidebar/index.js.map +0 -1
  225. package/build/components/start-page-options/index.js +0 -107
  226. package/build/components/start-page-options/index.js.map +0 -1
  227. package/build/plugins/copy-content-menu-item/index.js +0 -39
  228. package/build/plugins/copy-content-menu-item/index.js.map +0 -1
  229. package/build/plugins/index.js +0 -69
  230. package/build/plugins/index.js.map +0 -1
  231. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -41
  232. package/build/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
  233. package/build/plugins/welcome-guide-menu-item/index.js.map +0 -1
  234. package/build-module/components/header/plugin-more-menu-item/index.js +0 -73
  235. package/build-module/components/header/plugin-more-menu-item/index.js.map +0 -1
  236. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js +0 -65
  237. package/build-module/components/header/plugin-sidebar-more-menu-item/index.js.map +0 -1
  238. package/build-module/components/header/post-publish-button-or-toggle.js +0 -83
  239. package/build-module/components/header/post-publish-button-or-toggle.js.map +0 -1
  240. package/build-module/components/header/preferences-menu-item/index.js +0 -24
  241. package/build-module/components/header/preferences-menu-item/index.js.map +0 -1
  242. package/build-module/components/header/tools-more-menu-group/index.js +0 -19
  243. package/build-module/components/header/tools-more-menu-group/index.js.map +0 -1
  244. package/build-module/components/header/writing-menu/index.js +0 -64
  245. package/build-module/components/header/writing-menu/index.js.map +0 -1
  246. package/build-module/components/keyboard-shortcut-help-modal/config.js +0 -71
  247. package/build-module/components/keyboard-shortcut-help-modal/config.js.map +0 -1
  248. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -41
  249. package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +0 -1
  250. package/build-module/components/keyboard-shortcut-help-modal/index.js +0 -122
  251. package/build-module/components/keyboard-shortcut-help-modal/index.js.map +0 -1
  252. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +0 -48
  253. package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +0 -1
  254. package/build-module/components/layout/actions-panel.js +0 -78
  255. package/build-module/components/layout/actions-panel.js.map +0 -1
  256. package/build-module/components/preferences-modal/enable-publish-sidebar.js +0 -31
  257. package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +0 -1
  258. package/build-module/components/sidebar/plugin-post-publish-panel/index.js +0 -32
  259. package/build-module/components/sidebar/plugin-post-publish-panel/index.js.map +0 -1
  260. package/build-module/components/sidebar/plugin-post-status-info/index.js +0 -66
  261. package/build-module/components/sidebar/plugin-post-status-info/index.js.map +0 -1
  262. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js +0 -36
  263. package/build-module/components/sidebar/plugin-pre-publish-panel/index.js.map +0 -1
  264. package/build-module/components/sidebar/plugin-sidebar/index.js +0 -98
  265. package/build-module/components/sidebar/plugin-sidebar/index.js.map +0 -1
  266. package/build-module/components/start-page-options/index.js +0 -100
  267. package/build-module/components/start-page-options/index.js.map +0 -1
  268. package/build-module/plugins/copy-content-menu-item/index.js +0 -32
  269. package/build-module/plugins/copy-content-menu-item/index.js.map +0 -1
  270. package/build-module/plugins/index.js +0 -65
  271. package/build-module/plugins/index.js.map +0 -1
  272. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -33
  273. package/build-module/plugins/keyboard-shortcuts-help-menu-item/index.js.map +0 -1
  274. package/build-module/plugins/welcome-guide-menu-item/index.js.map +0 -1
  275. package/src/components/header/plugin-more-menu-item/index.js +0 -73
  276. package/src/components/header/plugin-sidebar-more-menu-item/index.js +0 -64
  277. package/src/components/header/post-publish-button-or-toggle.js +0 -92
  278. package/src/components/header/preferences-menu-item/index.js +0 -25
  279. package/src/components/header/test/index.js +0 -51
  280. package/src/components/header/tools-more-menu-group/index.js +0 -20
  281. package/src/components/header/writing-menu/index.js +0 -73
  282. package/src/components/keyboard-shortcut-help-modal/config.js +0 -53
  283. package/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +0 -43
  284. package/src/components/keyboard-shortcut-help-modal/index.js +0 -163
  285. package/src/components/keyboard-shortcut-help-modal/shortcut.js +0 -67
  286. package/src/components/keyboard-shortcut-help-modal/style.scss +0 -61
  287. package/src/components/keyboard-shortcut-help-modal/test/index.js +0 -36
  288. package/src/components/layout/actions-panel.js +0 -103
  289. package/src/components/preferences-modal/enable-publish-sidebar.js +0 -32
  290. package/src/components/preferences-modal/test/index.js +0 -28
  291. package/src/components/sidebar/plugin-post-publish-panel/index.js +0 -28
  292. package/src/components/sidebar/plugin-post-status-info/index.js +0 -63
  293. package/src/components/sidebar/plugin-post-status-info/test/__snapshots__/index.js.snap +0 -11
  294. package/src/components/sidebar/plugin-post-status-info/test/index.js +0 -29
  295. package/src/components/sidebar/plugin-pre-publish-panel/index.js +0 -32
  296. package/src/components/sidebar/plugin-sidebar/index.js +0 -94
  297. package/src/components/start-page-options/index.js +0 -108
  298. package/src/components/start-page-options/style.scss +0 -26
  299. package/src/plugins/copy-content-menu-item/index.js +0 -29
  300. package/src/plugins/index.js +0 -85
  301. package/src/plugins/keyboard-shortcuts-help-menu-item/index.js +0 -34
  302. /package/src/{plugins/welcome-guide-menu-item/index.js → components/header/more-menu/welcome-guide-menu-item.js} +0 -0
@@ -25,6 +25,10 @@
25
25
  // Leave enough room for the focus ring to show.
26
26
  padding: 2px 0;
27
27
  align-items: center;
28
+ // Allow focus ring to be fully visible on furthest right button.
29
+ @include break-medium() {
30
+ padding-right: var(--wp-admin-border-width-focus);
31
+ }
28
32
 
29
33
  .table-of-contents {
30
34
  display: none;
@@ -33,85 +37,6 @@
33
37
  display: block;
34
38
  }
35
39
  }
36
-
37
- .selected-block-tools-wrapper {
38
- overflow: hidden;
39
- display: flex;
40
- align-items: center;
41
- height: $header-height;
42
-
43
- .block-editor-block-contextual-toolbar {
44
- border-bottom: 0;
45
- height: 100%;
46
- }
47
-
48
- // These rules ensure that icons are always positioned in a way that lines up with the rest of the icons in the toolbar.
49
- .block-editor-block-toolbar {
50
- height: 100%;
51
- // Push down so that buttons are centered vertically.
52
- // It should be 14px (60px header height - 32px compact button height = 28 / 2),
53
- // but there is a -1px top-margin down the stack that affects this.
54
- padding-top: math.div($header-height - $button-size-compact, 2) + 1;
55
-
56
- // Match the height of other buttons in the header toolbar.
57
- .components-button:not(.block-editor-block-mover-button) {
58
- height: $button-size-compact;
59
- }
60
- }
61
-
62
- &::after {
63
- content: "";
64
- width: $border-width;
65
- height: $grid-unit-30;
66
- background-color: $gray-300;
67
- margin-left: $grid-unit;
68
- }
69
-
70
- // Modified group borders.
71
- .components-toolbar-group,
72
- .components-toolbar {
73
- border-right: none;
74
-
75
- &::after {
76
- content: "";
77
- width: $border-width;
78
- height: $grid-unit-30;
79
- background-color: $gray-300;
80
- margin-top: $grid-unit-05;
81
- margin-left: $grid-unit;
82
- }
83
-
84
- & .components-toolbar-group.components-toolbar-group {
85
- &::after {
86
- display: none;
87
- }
88
- }
89
- }
90
-
91
- .block-editor-block-mover {
92
- // Match the height of other buttons in the header toolbar.
93
- &.is-horizontal .block-editor-block-mover-button {
94
- height: $button-size-compact;
95
- overflow: visible;
96
- }
97
-
98
- // Move up a little to prevent the toolbar shift when focus is on the vertical movers.
99
- @include break-small() {
100
- &:not(.is-horizontal) .block-editor-block-mover__move-button-container {
101
- position: relative;
102
- top: -10px;
103
- }
104
- }
105
- }
106
-
107
- &.is-collapsed {
108
- display: none;
109
- }
110
- }
111
- }
112
-
113
- .edit-post-header__block-tools-toggle {
114
- margin-left: 2px; // Allow focus ring to be fully visible
115
40
  }
116
41
 
117
42
  .edit-post-header__center {
@@ -286,8 +211,7 @@
286
211
  }
287
212
 
288
213
  .edit-post-header {
289
- backdrop-filter: blur(20px) !important;
290
- background-color: rgba(255, 255, 255, 0.9);
214
+ background-color: $white;
291
215
  border-bottom: 1px solid #e0e0e0;
292
216
  position: absolute;
293
217
  width: 100%;
@@ -298,7 +222,6 @@
298
222
  visibility: hidden;
299
223
  }
300
224
 
301
- & > .edit-post-header__toolbar .editor-document-tools__inserter-toggle,
302
225
  & > .edit-post-header__toolbar .editor-document-tools__document-overview-toggle,
303
226
  & > .edit-post-header__settings > .editor-preview-dropdown,
304
227
  & > .edit-post-header__settings > .interface-pinned-items {
@@ -2,14 +2,12 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useEffect } from '@wordpress/element';
5
- import { useSelect, useDispatch } from '@wordpress/data';
5
+ import { useDispatch } from '@wordpress/data';
6
6
  import {
7
7
  useShortcut,
8
8
  store as keyboardShortcutsStore,
9
9
  } from '@wordpress/keyboard-shortcuts';
10
10
  import { __ } from '@wordpress/i18n';
11
- import { store as blockEditorStore } from '@wordpress/block-editor';
12
- import { createBlock } from '@wordpress/blocks';
13
11
 
14
12
  /**
15
13
  * Internal dependencies
@@ -17,45 +15,8 @@ import { createBlock } from '@wordpress/blocks';
17
15
  import { store as editPostStore } from '../../store';
18
16
 
19
17
  function KeyboardShortcuts() {
20
- const { isEditorSidebarOpened } = useSelect( editPostStore );
21
- const { openGeneralSidebar, closeGeneralSidebar, toggleFeature } =
22
- useDispatch( editPostStore );
18
+ const { toggleFeature } = useDispatch( editPostStore );
23
19
  const { registerShortcut } = useDispatch( keyboardShortcutsStore );
24
- const { replaceBlocks } = useDispatch( blockEditorStore );
25
- const {
26
- getBlockName,
27
- getSelectedBlockClientId,
28
- getBlockAttributes,
29
- getBlockSelectionStart,
30
- } = useSelect( blockEditorStore );
31
-
32
- const handleTextLevelShortcut = ( event, level ) => {
33
- event.preventDefault();
34
- const destinationBlockName =
35
- level === 0 ? 'core/paragraph' : 'core/heading';
36
- const currentClientId = getSelectedBlockClientId();
37
- if ( currentClientId === null ) {
38
- return;
39
- }
40
- const blockName = getBlockName( currentClientId );
41
- if ( blockName !== 'core/paragraph' && blockName !== 'core/heading' ) {
42
- return;
43
- }
44
- const attributes = getBlockAttributes( currentClientId );
45
- const textAlign =
46
- blockName === 'core/paragraph' ? 'align' : 'textAlign';
47
- const destinationTextAlign =
48
- destinationBlockName === 'core/paragraph' ? 'align' : 'textAlign';
49
-
50
- replaceBlocks(
51
- currentClientId,
52
- createBlock( destinationBlockName, {
53
- level,
54
- content: attributes.content,
55
- ...{ [ destinationTextAlign ]: attributes[ textAlign ] },
56
- } )
57
- );
58
- };
59
20
 
60
21
  useEffect( () => {
61
22
  registerShortcut( {
@@ -67,119 +28,12 @@ function KeyboardShortcuts() {
67
28
  character: 'f',
68
29
  },
69
30
  } );
70
-
71
- registerShortcut( {
72
- name: 'core/edit-post/toggle-sidebar',
73
- category: 'global',
74
- description: __( 'Show or hide the Settings sidebar.' ),
75
- keyCombination: {
76
- modifier: 'primaryShift',
77
- character: ',',
78
- },
79
- } );
80
-
81
- registerShortcut( {
82
- name: 'core/edit-post/next-region',
83
- category: 'global',
84
- description: __( 'Navigate to the next part of the editor.' ),
85
- keyCombination: {
86
- modifier: 'ctrl',
87
- character: '`',
88
- },
89
- aliases: [
90
- {
91
- modifier: 'access',
92
- character: 'n',
93
- },
94
- ],
95
- } );
96
-
97
- registerShortcut( {
98
- name: 'core/edit-post/previous-region',
99
- category: 'global',
100
- description: __( 'Navigate to the previous part of the editor.' ),
101
- keyCombination: {
102
- modifier: 'ctrlShift',
103
- character: '`',
104
- },
105
- aliases: [
106
- {
107
- modifier: 'access',
108
- character: 'p',
109
- },
110
- {
111
- modifier: 'ctrlShift',
112
- character: '~',
113
- },
114
- ],
115
- } );
116
-
117
- registerShortcut( {
118
- name: 'core/edit-post/keyboard-shortcuts',
119
- category: 'main',
120
- description: __( 'Display these keyboard shortcuts.' ),
121
- keyCombination: {
122
- modifier: 'access',
123
- character: 'h',
124
- },
125
- } );
126
-
127
- registerShortcut( {
128
- name: 'core/edit-post/transform-heading-to-paragraph',
129
- category: 'block-library',
130
- description: __( 'Transform heading to paragraph.' ),
131
- keyCombination: {
132
- modifier: 'access',
133
- character: `0`,
134
- },
135
- } );
136
-
137
- [ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
138
- registerShortcut( {
139
- name: `core/edit-post/transform-paragraph-to-heading-${ level }`,
140
- category: 'block-library',
141
- description: __( 'Transform paragraph to heading.' ),
142
- keyCombination: {
143
- modifier: 'access',
144
- character: `${ level }`,
145
- },
146
- } );
147
- } );
148
31
  }, [] );
149
32
 
150
33
  useShortcut( 'core/edit-post/toggle-fullscreen', () => {
151
34
  toggleFeature( 'fullscreenMode' );
152
35
  } );
153
36
 
154
- useShortcut( 'core/edit-post/toggle-sidebar', ( event ) => {
155
- // This shortcut has no known clashes, but use preventDefault to prevent any
156
- // obscure shortcuts from triggering.
157
- event.preventDefault();
158
-
159
- if ( isEditorSidebarOpened() ) {
160
- closeGeneralSidebar();
161
- } else {
162
- const sidebarToOpen = getBlockSelectionStart()
163
- ? 'edit-post/block'
164
- : 'edit-post/document';
165
- openGeneralSidebar( sidebarToOpen );
166
- }
167
- } );
168
-
169
- useShortcut( 'core/edit-post/transform-heading-to-paragraph', ( event ) =>
170
- handleTextLevelShortcut( event, 0 )
171
- );
172
-
173
- [ 1, 2, 3, 4, 5, 6 ].forEach( ( level ) => {
174
- //the loop is based off on a constant therefore
175
- //the hook will execute the same way every time
176
- //eslint-disable-next-line react-hooks/rules-of-hooks
177
- useShortcut(
178
- `core/edit-post/transform-paragraph-to-heading-${ level }`,
179
- ( event ) => handleTextLevelShortcut( event, level )
180
- );
181
- } );
182
-
183
37
  return null;
184
38
  }
185
39
 
@@ -24,22 +24,17 @@ import {
24
24
  privateApis as blockEditorPrivateApis,
25
25
  store as blockEditorStore,
26
26
  } from '@wordpress/block-editor';
27
- import { Button, ScrollLock } from '@wordpress/components';
27
+ import { ScrollLock } from '@wordpress/components';
28
28
  import { useViewportMatch } from '@wordpress/compose';
29
29
  import { PluginArea } from '@wordpress/plugins';
30
30
  import { __, _x, sprintf } from '@wordpress/i18n';
31
- import {
32
- ComplementaryArea,
33
- FullscreenMode,
34
- InterfaceSkeleton,
35
- store as interfaceStore,
36
- } from '@wordpress/interface';
37
31
  import { useState, useEffect, useCallback, useMemo } from '@wordpress/element';
38
32
  import { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';
39
33
  import { store as noticesStore } from '@wordpress/notices';
40
34
  import { store as preferencesStore } from '@wordpress/preferences';
41
35
  import { privateApis as commandsPrivateApis } from '@wordpress/commands';
42
36
  import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';
37
+ import { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';
43
38
 
44
39
  /**
45
40
  * Internal dependencies
@@ -47,16 +42,12 @@ import { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands
47
42
  import TextEditor from '../text-editor';
48
43
  import VisualEditor from '../visual-editor';
49
44
  import EditPostKeyboardShortcuts from '../keyboard-shortcuts';
50
- import KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';
51
- import EditPostPreferencesModal from '../preferences-modal';
52
45
  import InitPatternModal from '../init-pattern-modal';
53
46
  import BrowserURL from '../browser-url';
54
47
  import Header from '../header';
55
48
  import SettingsSidebar from '../sidebar/settings-sidebar';
56
49
  import MetaBoxes from '../meta-boxes';
57
50
  import WelcomeGuide from '../welcome-guide';
58
- import ActionsPanel from './actions-panel';
59
- import StartPageOptions from '../start-page-options';
60
51
  import { store as editPostStore } from '../../store';
61
52
  import { unlock } from '../../lock-unlock';
62
53
  import useCommonCommands from '../../hooks/commands/use-common-commands';
@@ -64,7 +55,16 @@ import useCommonCommands from '../../hooks/commands/use-common-commands';
64
55
  const { getLayoutStyles } = unlock( blockEditorPrivateApis );
65
56
  const { useCommands } = unlock( coreCommandsPrivateApis );
66
57
  const { useCommandContext } = unlock( commandsPrivateApis );
67
- const { InserterSidebar, ListViewSidebar } = unlock( editorPrivateApis );
58
+ const {
59
+ InserterSidebar,
60
+ ListViewSidebar,
61
+ ComplementaryArea,
62
+ FullscreenMode,
63
+ SavePublishPanels,
64
+ InterfaceSkeleton,
65
+ interfaceStore,
66
+ } = unlock( editorPrivateApis );
67
+ const { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );
68
68
 
69
69
  const interfaceLabels = {
70
70
  /* translators: accessibility text for the editor top bar landmark region. */
@@ -139,8 +139,7 @@ function Layout( { initialPost } ) {
139
139
  const isWideViewport = useViewportMatch( 'large' );
140
140
  const isLargeViewport = useViewportMatch( 'medium' );
141
141
 
142
- const { openGeneralSidebar, closeGeneralSidebar } =
143
- useDispatch( editPostStore );
142
+ const { closeGeneralSidebar } = useDispatch( editPostStore );
144
143
  const { createErrorNotice } = useDispatch( noticesStore );
145
144
  const { setIsInserterOpened } = useDispatch( editorStore );
146
145
  const {
@@ -160,6 +159,7 @@ function Layout( { initialPost } ) {
160
159
  showMetaBoxes,
161
160
  documentLabel,
162
161
  hasHistory,
162
+ hasBlockBreadcrumbs,
163
163
  } = useSelect( ( select ) => {
164
164
  const { get } = select( preferencesStore );
165
165
  const { getEditorSettings, getPostTypeLabel } = select( editorStore );
@@ -170,9 +170,8 @@ function Layout( { initialPost } ) {
170
170
  showMetaBoxes:
171
171
  select( editorStore ).getRenderingMode() === 'post-only',
172
172
  sidebarIsOpened: !! (
173
- select( interfaceStore ).getActiveComplementaryArea(
174
- editPostStore.name
175
- ) || select( editorStore ).isPublishSidebarOpened()
173
+ select( interfaceStore ).getActiveComplementaryArea( 'core' ) ||
174
+ select( editorStore ).isPublishSidebarOpened()
176
175
  ),
177
176
  isFullscreenActive:
178
177
  select( editPostStore ).isFeatureActive( 'fullscreenMode' ),
@@ -183,10 +182,10 @@ function Layout( { initialPost } ) {
183
182
  hasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),
184
183
  previousShortcut: select(
185
184
  keyboardShortcutsStore
186
- ).getAllShortcutKeyCombinations( 'core/edit-post/previous-region' ),
185
+ ).getAllShortcutKeyCombinations( 'core/editor/previous-region' ),
187
186
  nextShortcut: select(
188
187
  keyboardShortcutsStore
189
- ).getAllShortcutKeyCombinations( 'core/edit-post/next-region' ),
188
+ ).getAllShortcutKeyCombinations( 'core/editor/next-region' ),
190
189
  showIconLabels: get( 'core', 'showIconLabels' ),
191
190
  isDistractionFree: get( 'core', 'distractionFree' ),
192
191
  showBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),
@@ -195,6 +194,7 @@ function Layout( { initialPost } ) {
195
194
  hasBlockSelected:
196
195
  !! select( blockEditorStore ).getBlockSelectionStart(),
197
196
  hasHistory: !! getEditorSettings().onNavigateToPreviousEntityRecord,
197
+ hasBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),
198
198
  };
199
199
  }, [] );
200
200
 
@@ -206,11 +206,6 @@ function Layout( { initialPost } ) {
206
206
 
207
207
  const styles = useEditorStyles();
208
208
 
209
- const openSidebarPanel = () =>
210
- openGeneralSidebar(
211
- hasBlockSelected ? 'edit-post/block' : 'edit-post/document'
212
- );
213
-
214
209
  // Inserter and Sidebars are mutually exclusive
215
210
  useEffect( () => {
216
211
  if ( sidebarIsOpened && ! isHugeViewport ) {
@@ -250,6 +245,8 @@ function Layout( { initialPost } ) {
250
245
  'has-metaboxes': hasActiveMetaboxes,
251
246
  'is-distraction-free': isDistractionFree && isWideViewport,
252
247
  'is-entity-save-view-open': !! entitiesSavedStatesCallback,
248
+ 'has-block-breadcrumbs':
249
+ hasBlockBreadcrumbs && ! isDistractionFree && isWideViewport,
253
250
  } );
254
251
 
255
252
  const secondarySidebarLabel = isListViewOpened
@@ -294,6 +291,7 @@ function Layout( { initialPost } ) {
294
291
  <EditPostKeyboardShortcuts />
295
292
  <EditorKeyboardShortcutsRegister />
296
293
  <EditorKeyboardShortcuts />
294
+ <BlockKeyboardShortcuts />
297
295
 
298
296
  <InterfaceSkeleton
299
297
  isDistractionFree={ isDistractionFree && isWideViewport }
@@ -313,25 +311,8 @@ function Layout( { initialPost } ) {
313
311
  editorNotices={ <EditorNotices /> }
314
312
  secondarySidebar={ secondarySidebar() }
315
313
  sidebar={
316
- ( ( isMobileViewport && sidebarIsOpened ) ||
317
- ( ! isMobileViewport && ! isDistractionFree ) ) && (
318
- <>
319
- { ! isMobileViewport && ! sidebarIsOpened && (
320
- <div className="edit-post-layout__toggle-sidebar-panel">
321
- <Button
322
- variant="secondary"
323
- className="edit-post-layout__toggle-sidebar-panel-button"
324
- onClick={ openSidebarPanel }
325
- aria-expanded={ false }
326
- >
327
- { hasBlockSelected
328
- ? __( 'Open block settings' )
329
- : __( 'Open document settings' ) }
330
- </Button>
331
- </div>
332
- ) }
333
- <ComplementaryArea.Slot scope="core/edit-post" />
334
- </>
314
+ ! isDistractionFree && (
315
+ <ComplementaryArea.Slot scope="core" />
335
316
  )
336
317
  }
337
318
  notices={ <EditorSnackbars /> }
@@ -368,7 +349,7 @@ function Layout( { initialPost } ) {
368
349
  )
369
350
  }
370
351
  actions={
371
- <ActionsPanel
352
+ <SavePublishPanels
372
353
  closeEntitiesSavedStates={ closeEntitiesSavedStates }
373
354
  isEntitiesSavedStatesOpen={
374
355
  entitiesSavedStatesCallback
@@ -376,6 +357,7 @@ function Layout( { initialPost } ) {
376
357
  setEntitiesSavedStatesCallback={
377
358
  setEntitiesSavedStatesCallback
378
359
  }
360
+ forceIsDirtyPublishPanel={ hasActiveMetaboxes }
379
361
  />
380
362
  }
381
363
  shortcuts={ {
@@ -383,11 +365,8 @@ function Layout( { initialPost } ) {
383
365
  next: nextShortcut,
384
366
  } }
385
367
  />
386
- <EditPostPreferencesModal />
387
- <KeyboardShortcutHelpModal />
388
368
  <WelcomeGuide />
389
369
  <InitPatternModal />
390
- <StartPageOptions />
391
370
  <PluginArea onError={ onPluginAreaError } />
392
371
  { ! isDistractionFree && <SettingsSidebar /> }
393
372
  </>
@@ -7,95 +7,22 @@
7
7
  .edit-post-layout .components-editor-notices__snackbar {
8
8
  position: fixed;
9
9
  right: 0;
10
- bottom: 40px;
10
+ bottom: 16px;
11
11
  padding-left: 16px;
12
12
  padding-right: 16px;
13
13
  }
14
14
 
15
15
  .is-distraction-free {
16
16
  .components-editor-notices__snackbar {
17
- bottom: 20px;
17
+ bottom: 16px;
18
18
  }
19
19
  }
20
20
 
21
- @include editor-left(".edit-post-layout .components-editor-notices__snackbar");
22
-
23
- .edit-post-layout .editor-post-publish-panel {
24
- position: fixed;
25
- z-index: z-index(".edit-post-layout .edit-post-post-publish-panel");
26
- top: $admin-bar-height-big;
27
- bottom: 0;
28
- right: 0;
29
- left: 0;
30
- overflow: auto;
31
-
32
- @include break-medium() {
33
- z-index: z-index(".edit-post-layout .edit-post-post-publish-panel {greater than small}");
34
- top: $admin-bar-height;
35
- left: auto;
36
- width: $sidebar-width + $border-width;
37
- border-left: $border-width solid $gray-300;
38
- transform: translateX(+100%);
39
- animation: edit-post-post-publish-panel__slide-in-animation 0.1s forwards;
40
- @include reduce-motion("animation");
41
-
42
- body.is-fullscreen-mode & {
43
- top: 0;
44
- }
45
-
46
- // Keep it open on focus to avoid conflict with navigate-regions animation.
47
- [role="region"]:focus & {
48
- transform: translateX(0%);
49
- }
50
- }
51
- }
52
-
53
- @keyframes edit-post-post-publish-panel__slide-in-animation {
54
- 100% {
55
- transform: translateX(0%);
56
- }
57
- }
58
-
59
- .edit-post-layout .editor-post-publish-panel__header-publish-button {
60
- justify-content: center;
61
- }
62
-
63
- .edit-post-layout__toggle-publish-panel,
64
- .edit-post-layout__toggle-sidebar-panel,
65
- .edit-post-layout__toggle-entities-saved-states-panel {
66
- z-index: z-index(".edit-post-layout__toggle-sidebar-panel");
67
- position: fixed !important; // Need to override the default relative positionning
68
- top: -9999em;
69
- bottom: auto;
70
- left: auto;
71
- right: 0;
72
- box-sizing: border-box;
73
- width: $sidebar-width;
74
- background-color: $white;
75
- border: 1px dotted $gray-300;
76
- height: auto !important; // Need to override the default sidebar positionnings
77
- padding: $grid-unit-30;
78
- display: flex;
79
- justify-content: center;
80
- }
81
-
82
- .edit-post-layout__toggle-sidebar-panel {
83
- .interface-interface-skeleton__sidebar:focus &,
84
- .interface-interface-skeleton__sidebar:focus-within & {
85
- top: auto;
86
- bottom: 0;
87
- }
88
- }
89
-
90
- .edit-post-layout__toggle-entities-saved-states-panel,
91
- .edit-post-layout__toggle-publish-panel {
92
- .interface-interface-skeleton__actions:focus &,
93
- .interface-interface-skeleton__actions:focus-within & {
94
- top: auto;
95
- bottom: 0;
21
+ // Adjust the position of the notices when breadcrumbs are present
22
+ .has-block-breadcrumbs {
23
+ .components-editor-notices__snackbar {
24
+ bottom: 40px;
96
25
  }
97
26
  }
98
27
 
99
- .edit-post-layout .entities-saved-states__panel-header {
100
- height: $header-height + $border-width;
101
- }
28
+ @include editor-left(".edit-post-layout .components-editor-notices__snackbar");
@@ -3,9 +3,6 @@
3
3
  */
4
4
 
5
5
  import { __ } from '@wordpress/i18n';
6
- import { useViewportMatch } from '@wordpress/compose';
7
- import { useSelect, useDispatch } from '@wordpress/data';
8
- import { store as interfaceStore } from '@wordpress/interface';
9
6
  import { privateApis as preferencesPrivateApis } from '@wordpress/preferences';
10
7
  import { privateApis as editorPrivateApis } from '@wordpress/editor';
11
8
 
@@ -14,43 +11,13 @@ import { privateApis as editorPrivateApis } from '@wordpress/editor';
14
11
  */
15
12
  import { unlock } from '../../lock-unlock';
16
13
  import MetaBoxesSection from './meta-boxes-section';
17
- import EnablePublishSidebarOption from './enable-publish-sidebar';
18
14
 
19
- const { PreferencesModalSection, PreferenceToggleControl } = unlock(
20
- preferencesPrivateApis
21
- );
15
+ const { PreferenceToggleControl } = unlock( preferencesPrivateApis );
22
16
  const { PreferencesModal } = unlock( editorPrivateApis );
23
17
 
24
- export const PREFERENCES_MODAL_NAME = 'edit-post/preferences';
25
-
26
18
  export default function EditPostPreferencesModal() {
27
- const isLargeViewport = useViewportMatch( 'medium' );
28
- const { closeModal } = useDispatch( interfaceStore );
29
- const { isModalActive } = useSelect( ( select ) => {
30
- const modalActive = select( interfaceStore ).isModalActive(
31
- PREFERENCES_MODAL_NAME
32
- );
33
- return {
34
- isModalActive: modalActive,
35
- };
36
- }, [] );
37
-
38
19
  const extraSections = {
39
- general: (
40
- <>
41
- { isLargeViewport && (
42
- <PreferencesModalSection title={ __( 'Publishing' ) }>
43
- <EnablePublishSidebarOption
44
- help={ __(
45
- 'Review settings, such as visibility and tags.'
46
- ) }
47
- label={ __( 'Enable pre-publish checks' ) }
48
- />
49
- </PreferencesModalSection>
50
- ) }
51
- <MetaBoxesSection title={ __( 'Advanced' ) } />
52
- </>
53
- ),
20
+ general: <MetaBoxesSection title={ __( 'Advanced' ) } />,
54
21
  appearance: (
55
22
  <PreferenceToggleControl
56
23
  scope="core/edit-post"
@@ -61,15 +28,5 @@ export default function EditPostPreferencesModal() {
61
28
  ),
62
29
  };
63
30
 
64
- if ( ! isModalActive ) {
65
- return null;
66
- }
67
-
68
- return (
69
- <PreferencesModal
70
- extraSections={ extraSections }
71
- isActive={ isModalActive }
72
- onClose={ closeModal }
73
- />
74
- );
31
+ return <PreferencesModal extraSections={ extraSections } />;
75
32
  }