@wordpress/editor 14.48.1 → 14.48.2-next.v.202606191442.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 (401) hide show
  1. package/build/bindings/pattern-overrides.cjs +1 -1
  2. package/build/bindings/pattern-overrides.cjs.map +2 -2
  3. package/build/components/collab-sidebar/note-byline.cjs +1 -1
  4. package/build/components/collab-sidebar/note-byline.cjs.map +2 -2
  5. package/build/components/collab-sidebar/note.cjs +49 -17
  6. package/build/components/collab-sidebar/note.cjs.map +3 -3
  7. package/build/components/collab-sidebar/notes.cjs.map +1 -1
  8. package/build/components/collab-sidebar/utils.cjs +1 -1
  9. package/build/components/collab-sidebar/utils.cjs.map +2 -2
  10. package/build/components/collaborators-overlay/avatar-iframe-styles.cjs.map +1 -1
  11. package/build/components/collaborators-overlay/collaborator-styles.cjs.map +1 -1
  12. package/build/components/collaborators-overlay/compute-selection.cjs.map +1 -1
  13. package/build/components/collaborators-overlay/overlay-iframe-styles.cjs +1 -1
  14. package/build/components/collaborators-overlay/overlay-iframe-styles.cjs.map +1 -1
  15. package/build/components/collaborators-overlay/use-block-highlighting.cjs.map +1 -1
  16. package/build/components/collaborators-presence/avatar/component.cjs.map +2 -2
  17. package/build/components/collaborators-presence/avatar/use-image-loading-status.cjs.map +1 -1
  18. package/build/components/document-bar/index.cjs +7 -5
  19. package/build/components/document-bar/index.cjs.map +2 -2
  20. package/build/components/global-keyboard-shortcuts/index.cjs +3 -2
  21. package/build/components/global-keyboard-shortcuts/index.cjs.map +2 -2
  22. package/build/components/global-styles-sidebar/welcome-guide.cjs +3 -3
  23. package/build/components/global-styles-sidebar/welcome-guide.cjs.map +1 -1
  24. package/build/components/local-autosave-monitor/index.cjs +14 -15
  25. package/build/components/local-autosave-monitor/index.cjs.map +2 -2
  26. package/build/components/page-attributes/parent.cjs +1 -1
  27. package/build/components/page-attributes/parent.cjs.map +2 -2
  28. package/build/components/post-card-panel/index.cjs +1 -1
  29. package/build/components/post-card-panel/index.cjs.map +2 -2
  30. package/build/components/post-excerpt/panel.cjs +1 -1
  31. package/build/components/post-excerpt/panel.cjs.map +2 -2
  32. package/build/components/post-locked-modal/index.cjs +3 -3
  33. package/build/components/post-locked-modal/index.cjs.map +1 -1
  34. package/build/components/post-preview-button/index.cjs +2 -2
  35. package/build/components/post-preview-button/index.cjs.map +2 -2
  36. package/build/components/post-publish-button/index.cjs +4 -3
  37. package/build/components/post-publish-button/index.cjs.map +2 -2
  38. package/build/components/post-publish-button/label.cjs +2 -2
  39. package/build/components/post-publish-button/label.cjs.map +2 -2
  40. package/build/components/post-publish-panel/index.cjs.map +1 -1
  41. package/build/components/post-publish-panel/postpublish.cjs +1 -1
  42. package/build/components/post-publish-panel/postpublish.cjs.map +2 -2
  43. package/build/components/post-revisions-preview/block-diff.cjs.map +1 -1
  44. package/build/components/post-revisions-preview/diff-markers.cjs.map +2 -2
  45. package/build/components/post-revisions-preview/revisions-slider.cjs +1 -1
  46. package/build/components/post-revisions-preview/revisions-slider.cjs.map +2 -2
  47. package/build/components/post-revisions-timeline/index.cjs +173 -0
  48. package/build/components/post-revisions-timeline/index.cjs.map +7 -0
  49. package/build/components/post-saved-state/index.cjs +17 -26
  50. package/build/components/post-saved-state/index.cjs.map +2 -2
  51. package/build/components/post-schedule/label.cjs +5 -5
  52. package/build/components/post-schedule/label.cjs.map +1 -1
  53. package/build/components/post-taxonomies/flat-term-selector.cjs +2 -1
  54. package/build/components/post-taxonomies/flat-term-selector.cjs.map +3 -3
  55. package/build/components/post-taxonomies/hierarchical-term-selector.cjs +1 -1
  56. package/build/components/post-taxonomies/hierarchical-term-selector.cjs.map +2 -2
  57. package/build/components/post-text-editor/index.cjs +51 -0
  58. package/build/components/post-text-editor/index.cjs.map +2 -2
  59. package/build/components/post-text-editor/utils.cjs +150 -0
  60. package/build/components/post-text-editor/utils.cjs.map +7 -0
  61. package/build/components/post-url/index.cjs +1 -1
  62. package/build/components/post-url/index.cjs.map +2 -2
  63. package/build/components/post-view-link/index.cjs +1 -1
  64. package/build/components/post-view-link/index.cjs.map +2 -2
  65. package/build/components/provider/disable-non-page-content-blocks.cjs.map +1 -1
  66. package/build/components/provider/index.cjs +1 -1
  67. package/build/components/provider/index.cjs.map +2 -2
  68. package/build/components/resizable-editor/resize-handle.cjs.map +2 -2
  69. package/build/components/revision-diff-panel/index.cjs +7 -2
  70. package/build/components/revision-diff-panel/index.cjs.map +2 -2
  71. package/build/components/revision-fields-diff/index.cjs +6 -2
  72. package/build/components/revision-fields-diff/index.cjs.map +2 -2
  73. package/build/components/sidebar/dataform-post-summary.cjs +125 -20
  74. package/build/components/sidebar/dataform-post-summary.cjs.map +3 -3
  75. package/build/components/sidebar/index.cjs +1 -11
  76. package/build/components/sidebar/index.cjs.map +3 -3
  77. package/build/components/sidebar/post-revision-summary.cjs +11 -17
  78. package/build/components/sidebar/post-revision-summary.cjs.map +3 -3
  79. package/build/components/sidebar/post-summary.cjs +1 -1
  80. package/build/components/sidebar/post-summary.cjs.map +2 -2
  81. package/build/components/style-book/examples.cjs +1 -1
  82. package/build/components/style-book/examples.cjs.map +1 -1
  83. package/build/components/style-book/index.cjs +1 -1
  84. package/build/components/style-book/index.cjs.map +2 -2
  85. package/build/components/sync-connection-error-modal/index.cjs +3 -3
  86. package/build/components/sync-connection-error-modal/index.cjs.map +1 -1
  87. package/build/components/template-actions-panel/block-theme-content.cjs.map +2 -2
  88. package/build/components/template-actions-panel/index.cjs +0 -9
  89. package/build/components/template-actions-panel/index.cjs.map +3 -3
  90. package/build/components/template-validation-notice/index.cjs +1 -1
  91. package/build/components/template-validation-notice/index.cjs.map +1 -1
  92. package/build/components/upload-progress-snackbar/index.cjs +3 -3
  93. package/build/components/upload-progress-snackbar/index.cjs.map +2 -2
  94. package/build/components/upload-progress-snackbar/tracker.cjs.map +1 -1
  95. package/build/components/visual-editor/edit-template-blocks-notification.cjs +1 -1
  96. package/build/components/visual-editor/edit-template-blocks-notification.cjs.map +1 -1
  97. package/build/{components/revision-author-panel → dataviews/fields/revisions}/index.cjs +18 -26
  98. package/build/dataviews/fields/revisions/index.cjs.map +7 -0
  99. package/build/dataviews/fields/revisions/revisions-view.cjs +74 -0
  100. package/build/dataviews/fields/revisions/revisions-view.cjs.map +7 -0
  101. package/build/dataviews/store/private-actions.cjs +14 -4
  102. package/build/dataviews/store/private-actions.cjs.map +3 -3
  103. package/build/hooks/push-changes-to-global-styles/index.cjs +1 -1
  104. package/build/hooks/push-changes-to-global-styles/index.cjs.map +1 -1
  105. package/build/store/actions.cjs +1 -1
  106. package/build/store/actions.cjs.map +2 -2
  107. package/build/store/private-selectors.cjs +6 -1
  108. package/build/store/private-selectors.cjs.map +2 -2
  109. package/build/utils/media-upload/index.cjs.map +1 -1
  110. package/build/utils/set-nested-value.cjs.map +1 -1
  111. package/build-module/bindings/pattern-overrides.mjs +1 -1
  112. package/build-module/bindings/pattern-overrides.mjs.map +2 -2
  113. package/build-module/components/collab-sidebar/note-byline.mjs +1 -1
  114. package/build-module/components/collab-sidebar/note-byline.mjs.map +2 -2
  115. package/build-module/components/collab-sidebar/note.mjs +50 -18
  116. package/build-module/components/collab-sidebar/note.mjs.map +2 -2
  117. package/build-module/components/collab-sidebar/notes.mjs.map +1 -1
  118. package/build-module/components/collab-sidebar/utils.mjs +1 -1
  119. package/build-module/components/collab-sidebar/utils.mjs.map +2 -2
  120. package/build-module/components/collaborators-overlay/avatar-iframe-styles.mjs.map +1 -1
  121. package/build-module/components/collaborators-overlay/collaborator-styles.mjs.map +1 -1
  122. package/build-module/components/collaborators-overlay/compute-selection.mjs.map +1 -1
  123. package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs +1 -1
  124. package/build-module/components/collaborators-overlay/overlay-iframe-styles.mjs.map +1 -1
  125. package/build-module/components/collaborators-overlay/use-block-highlighting.mjs.map +1 -1
  126. package/build-module/components/collaborators-presence/avatar/component.mjs.map +2 -2
  127. package/build-module/components/collaborators-presence/avatar/use-image-loading-status.mjs.map +1 -1
  128. package/build-module/components/document-bar/index.mjs +7 -5
  129. package/build-module/components/document-bar/index.mjs.map +2 -2
  130. package/build-module/components/global-keyboard-shortcuts/index.mjs +3 -2
  131. package/build-module/components/global-keyboard-shortcuts/index.mjs.map +2 -2
  132. package/build-module/components/global-styles-sidebar/welcome-guide.mjs +3 -3
  133. package/build-module/components/global-styles-sidebar/welcome-guide.mjs.map +1 -1
  134. package/build-module/components/local-autosave-monitor/index.mjs +15 -16
  135. package/build-module/components/local-autosave-monitor/index.mjs.map +2 -2
  136. package/build-module/components/page-attributes/parent.mjs +1 -1
  137. package/build-module/components/page-attributes/parent.mjs.map +2 -2
  138. package/build-module/components/post-card-panel/index.mjs +1 -1
  139. package/build-module/components/post-card-panel/index.mjs.map +2 -2
  140. package/build-module/components/post-excerpt/panel.mjs +1 -1
  141. package/build-module/components/post-excerpt/panel.mjs.map +2 -2
  142. package/build-module/components/post-locked-modal/index.mjs +3 -3
  143. package/build-module/components/post-locked-modal/index.mjs.map +1 -1
  144. package/build-module/components/post-preview-button/index.mjs +2 -2
  145. package/build-module/components/post-preview-button/index.mjs.map +2 -2
  146. package/build-module/components/post-publish-button/index.mjs +4 -3
  147. package/build-module/components/post-publish-button/index.mjs.map +2 -2
  148. package/build-module/components/post-publish-button/label.mjs +2 -2
  149. package/build-module/components/post-publish-button/label.mjs.map +2 -2
  150. package/build-module/components/post-publish-panel/index.mjs.map +1 -1
  151. package/build-module/components/post-publish-panel/postpublish.mjs +1 -1
  152. package/build-module/components/post-publish-panel/postpublish.mjs.map +2 -2
  153. package/build-module/components/post-revisions-preview/block-diff.mjs.map +1 -1
  154. package/build-module/components/post-revisions-preview/diff-markers.mjs.map +2 -2
  155. package/build-module/components/post-revisions-preview/revisions-slider.mjs +1 -1
  156. package/build-module/components/post-revisions-preview/revisions-slider.mjs.map +2 -2
  157. package/build-module/components/post-revisions-timeline/index.mjs +152 -0
  158. package/build-module/components/post-revisions-timeline/index.mjs.map +7 -0
  159. package/build-module/components/post-saved-state/index.mjs +17 -26
  160. package/build-module/components/post-saved-state/index.mjs.map +2 -2
  161. package/build-module/components/post-schedule/label.mjs +5 -5
  162. package/build-module/components/post-schedule/label.mjs.map +1 -1
  163. package/build-module/components/post-taxonomies/flat-term-selector.mjs +3 -6
  164. package/build-module/components/post-taxonomies/flat-term-selector.mjs.map +2 -2
  165. package/build-module/components/post-taxonomies/hierarchical-term-selector.mjs +1 -1
  166. package/build-module/components/post-taxonomies/hierarchical-term-selector.mjs.map +2 -2
  167. package/build-module/components/post-text-editor/index.mjs +51 -0
  168. package/build-module/components/post-text-editor/index.mjs.map +2 -2
  169. package/build-module/components/post-text-editor/utils.mjs +123 -0
  170. package/build-module/components/post-text-editor/utils.mjs.map +7 -0
  171. package/build-module/components/post-url/index.mjs +1 -1
  172. package/build-module/components/post-url/index.mjs.map +2 -2
  173. package/build-module/components/post-view-link/index.mjs +1 -1
  174. package/build-module/components/post-view-link/index.mjs.map +2 -2
  175. package/build-module/components/provider/disable-non-page-content-blocks.mjs.map +1 -1
  176. package/build-module/components/provider/index.mjs +1 -1
  177. package/build-module/components/provider/index.mjs.map +2 -2
  178. package/build-module/components/resizable-editor/resize-handle.mjs.map +2 -2
  179. package/build-module/components/revision-diff-panel/index.mjs +7 -2
  180. package/build-module/components/revision-diff-panel/index.mjs.map +2 -2
  181. package/build-module/components/revision-fields-diff/index.mjs +6 -2
  182. package/build-module/components/revision-fields-diff/index.mjs.map +2 -2
  183. package/build-module/components/sidebar/dataform-post-summary.mjs +125 -20
  184. package/build-module/components/sidebar/dataform-post-summary.mjs.map +2 -2
  185. package/build-module/components/sidebar/index.mjs +1 -11
  186. package/build-module/components/sidebar/index.mjs.map +2 -2
  187. package/build-module/components/sidebar/post-revision-summary.mjs +11 -17
  188. package/build-module/components/sidebar/post-revision-summary.mjs.map +2 -2
  189. package/build-module/components/sidebar/post-summary.mjs +1 -1
  190. package/build-module/components/sidebar/post-summary.mjs.map +2 -2
  191. package/build-module/components/style-book/examples.mjs +1 -1
  192. package/build-module/components/style-book/examples.mjs.map +1 -1
  193. package/build-module/components/style-book/index.mjs +1 -1
  194. package/build-module/components/style-book/index.mjs.map +2 -2
  195. package/build-module/components/sync-connection-error-modal/index.mjs +3 -3
  196. package/build-module/components/sync-connection-error-modal/index.mjs.map +1 -1
  197. package/build-module/components/template-actions-panel/block-theme-content.mjs.map +2 -2
  198. package/build-module/components/template-actions-panel/index.mjs +0 -9
  199. package/build-module/components/template-actions-panel/index.mjs.map +2 -2
  200. package/build-module/components/template-validation-notice/index.mjs +1 -1
  201. package/build-module/components/template-validation-notice/index.mjs.map +1 -1
  202. package/build-module/components/upload-progress-snackbar/index.mjs +3 -3
  203. package/build-module/components/upload-progress-snackbar/index.mjs.map +2 -2
  204. package/build-module/components/upload-progress-snackbar/tracker.mjs.map +1 -1
  205. package/build-module/components/visual-editor/edit-template-blocks-notification.mjs +1 -1
  206. package/build-module/components/visual-editor/edit-template-blocks-notification.mjs.map +1 -1
  207. package/build-module/dataviews/fields/revisions/index.mjs +20 -0
  208. package/build-module/dataviews/fields/revisions/index.mjs.map +7 -0
  209. package/build-module/dataviews/fields/revisions/revisions-view.mjs +53 -0
  210. package/build-module/dataviews/fields/revisions/revisions-view.mjs.map +7 -0
  211. package/build-module/dataviews/store/private-actions.mjs +23 -7
  212. package/build-module/dataviews/store/private-actions.mjs.map +2 -2
  213. package/build-module/hooks/push-changes-to-global-styles/index.mjs +1 -1
  214. package/build-module/hooks/push-changes-to-global-styles/index.mjs.map +1 -1
  215. package/build-module/store/actions.mjs +1 -1
  216. package/build-module/store/actions.mjs.map +2 -2
  217. package/build-module/store/private-selectors.mjs +7 -1
  218. package/build-module/store/private-selectors.mjs.map +2 -2
  219. package/build-module/utils/media-upload/index.mjs.map +1 -1
  220. package/build-module/utils/set-nested-value.mjs.map +1 -1
  221. package/build-style/style-rtl.css +270 -206
  222. package/build-style/style.css +270 -206
  223. package/build-types/components/collab-sidebar/note-byline.d.ts +0 -3
  224. package/build-types/components/collab-sidebar/note-byline.d.ts.map +1 -1
  225. package/build-types/components/collab-sidebar/note.d.ts.map +1 -1
  226. package/build-types/components/collaborators-presence/avatar/component.d.ts.map +1 -1
  227. package/build-types/components/document-bar/index.d.ts +2 -2
  228. package/build-types/components/document-bar/index.d.ts.map +1 -1
  229. package/build-types/components/global-keyboard-shortcuts/index.d.ts.map +1 -1
  230. package/build-types/components/local-autosave-monitor/index.d.ts.map +1 -1
  231. package/build-types/components/post-publish-button/index.d.ts.map +1 -1
  232. package/build-types/components/post-revisions-preview/diff-markers.d.ts.map +1 -1
  233. package/build-types/components/post-revisions-timeline/index.d.ts +2 -0
  234. package/build-types/components/post-revisions-timeline/index.d.ts.map +1 -0
  235. package/build-types/components/post-saved-state/index.d.ts.map +1 -1
  236. package/build-types/components/post-taxonomies/flat-term-selector.d.ts.map +1 -1
  237. package/build-types/components/post-text-editor/index.d.ts +1 -1
  238. package/build-types/components/post-text-editor/index.d.ts.map +1 -1
  239. package/build-types/components/provider/index.d.ts.map +1 -1
  240. package/build-types/components/resizable-editor/resize-handle.d.ts.map +1 -1
  241. package/build-types/components/revision-diff-panel/index.d.ts +3 -1
  242. package/build-types/components/revision-diff-panel/index.d.ts.map +1 -1
  243. package/build-types/components/revision-fields-diff/index.d.ts.map +1 -1
  244. package/build-types/components/sidebar/dataform-post-summary.d.ts.map +1 -1
  245. package/build-types/components/sidebar/index.d.ts.map +1 -1
  246. package/build-types/components/sidebar/post-revision-summary.d.ts.map +1 -1
  247. package/build-types/components/template-actions-panel/block-theme-content.d.ts.map +1 -1
  248. package/build-types/components/template-actions-panel/index.d.ts.map +1 -1
  249. package/build-types/dataviews/fields/revisions/index.d.ts +8 -0
  250. package/build-types/dataviews/fields/revisions/index.d.ts.map +1 -0
  251. package/build-types/dataviews/fields/revisions/revisions-view.d.ts +2 -0
  252. package/build-types/dataviews/fields/revisions/revisions-view.d.ts.map +1 -0
  253. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  254. package/build-types/store/private-selectors.d.ts +1 -1
  255. package/build-types/store/private-selectors.d.ts.map +1 -1
  256. package/build-types/store/selectors.d.ts +1 -1
  257. package/build-types/store/selectors.d.ts.map +1 -1
  258. package/package.json +53 -47
  259. package/src/bindings/pattern-overrides.js +1 -1
  260. package/src/bindings/test/pattern-overrides.js +65 -0
  261. package/src/components/collab-sidebar/note-byline.js +0 -1
  262. package/src/components/collab-sidebar/note.js +64 -29
  263. package/src/components/collab-sidebar/style.scss +20 -0
  264. package/src/components/collaborators-presence/avatar/component.tsx +0 -1
  265. package/src/components/collaborators-presence/avatar/test/index.tsx +0 -1
  266. package/src/components/document-bar/index.js +8 -3
  267. package/src/components/document-bar/style.scss +4 -2
  268. package/src/components/global-keyboard-shortcuts/index.js +2 -1
  269. package/src/components/local-autosave-monitor/index.js +23 -21
  270. package/src/components/post-card-panel/index.js +1 -1
  271. package/src/components/post-publish-button/index.js +6 -3
  272. package/src/components/post-publish-button/test/index.js +13 -0
  273. package/src/components/post-revisions-preview/diff-markers.js +0 -1
  274. package/src/components/post-revisions-timeline/index.js +186 -0
  275. package/src/components/post-revisions-timeline/style.scss +43 -0
  276. package/src/components/post-saved-state/index.js +23 -26
  277. package/src/components/post-saved-state/test/index.js +18 -0
  278. package/src/components/post-taxonomies/flat-term-selector.js +4 -7
  279. package/src/components/post-text-editor/index.js +65 -0
  280. package/src/components/post-text-editor/test/utils.js +210 -0
  281. package/src/components/post-text-editor/utils.js +204 -0
  282. package/src/components/post-type-support-check/test/index.js +11 -0
  283. package/src/components/post-url/index.js +1 -1
  284. package/src/components/post-view-link/index.js +1 -1
  285. package/src/components/post-view-link/test/index.js +71 -0
  286. package/src/components/provider/index.js +2 -1
  287. package/src/components/resizable-editor/resize-handle.js +0 -1
  288. package/src/components/revision-diff-panel/index.js +8 -2
  289. package/src/components/revision-fields-diff/index.js +12 -1
  290. package/src/components/sidebar/dataform-post-summary.js +196 -25
  291. package/src/components/sidebar/index.js +2 -12
  292. package/src/components/sidebar/post-revision-summary.js +8 -15
  293. package/src/components/sidebar/post-summary.js +1 -1
  294. package/src/components/style-book/index.js +1 -1
  295. package/src/components/template-actions-panel/block-theme-content.js +0 -1
  296. package/src/components/template-actions-panel/index.js +0 -15
  297. package/src/dataviews/fields/revisions/index.tsx +28 -0
  298. package/src/dataviews/fields/revisions/revisions-view.tsx +59 -0
  299. package/src/dataviews/store/private-actions.ts +27 -6
  300. package/src/store/private-selectors.js +11 -1
  301. package/src/store/test/private-selectors.js +69 -0
  302. package/src/style.scss +1 -1
  303. package/build/components/post-revisions-panel/index.cjs +0 -173
  304. package/build/components/post-revisions-panel/index.cjs.map +0 -7
  305. package/build/components/revision-author-panel/index.cjs.map +0 -7
  306. package/build/components/revision-created-panel/index.cjs +0 -47
  307. package/build/components/revision-created-panel/index.cjs.map +0 -7
  308. package/build-module/components/post-revisions-panel/index.mjs +0 -148
  309. package/build-module/components/post-revisions-panel/index.mjs.map +0 -7
  310. package/build-module/components/revision-author-panel/index.mjs +0 -28
  311. package/build-module/components/revision-author-panel/index.mjs.map +0 -7
  312. package/build-module/components/revision-created-panel/index.mjs +0 -26
  313. package/build-module/components/revision-created-panel/index.mjs.map +0 -7
  314. package/build-types/components/collab-sidebar/add-comment.d.ts +0 -6
  315. package/build-types/components/collab-sidebar/add-comment.d.ts.map +0 -1
  316. package/build-types/components/collab-sidebar/comment-author-info.d.ts +0 -8
  317. package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +0 -1
  318. package/build-types/components/collab-sidebar/comment-form.d.ts +0 -9
  319. package/build-types/components/collab-sidebar/comment-form.d.ts.map +0 -1
  320. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts +0 -6
  321. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +0 -1
  322. package/build-types/components/collab-sidebar/comment-menu-item.d.ts +0 -6
  323. package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +0 -1
  324. package/build-types/components/collab-sidebar/comments.d.ts +0 -10
  325. package/build-types/components/collab-sidebar/comments.d.ts.map +0 -1
  326. package/build-types/components/global-styles-provider/index.d.ts +0 -16
  327. package/build-types/components/global-styles-provider/index.d.ts.map +0 -1
  328. package/build-types/components/media/index.d.ts +0 -3
  329. package/build-types/components/media/index.d.ts.map +0 -1
  330. package/build-types/components/media/metadata-panel.d.ts +0 -12
  331. package/build-types/components/media/metadata-panel.d.ts.map +0 -1
  332. package/build-types/components/media/preview.d.ts +0 -9
  333. package/build-types/components/media/preview.d.ts.map +0 -1
  334. package/build-types/components/post-revisions-panel/index.d.ts +0 -2
  335. package/build-types/components/post-revisions-panel/index.d.ts.map +0 -1
  336. package/build-types/components/revision-author-panel/index.d.ts +0 -2
  337. package/build-types/components/revision-author-panel/index.d.ts.map +0 -1
  338. package/build-types/components/revision-created-panel/index.d.ts +0 -2
  339. package/build-types/components/revision-created-panel/index.d.ts.map +0 -1
  340. package/src/components/editor-help/images/add-dark.png +0 -0
  341. package/src/components/editor-help/images/add-dark@2x.png +0 -0
  342. package/src/components/editor-help/images/add-dark@3x.png +0 -0
  343. package/src/components/editor-help/images/add-light.png +0 -0
  344. package/src/components/editor-help/images/add-light@2x.png +0 -0
  345. package/src/components/editor-help/images/add-light@3x.png +0 -0
  346. package/src/components/editor-help/images/block-layout-collage.png +0 -0
  347. package/src/components/editor-help/images/block-layout-collage@2x.png +0 -0
  348. package/src/components/editor-help/images/block-layout-collage@3x.png +0 -0
  349. package/src/components/editor-help/images/build-layouts-dark.png +0 -0
  350. package/src/components/editor-help/images/build-layouts-dark@2x.png +0 -0
  351. package/src/components/editor-help/images/build-layouts-dark@3x.png +0 -0
  352. package/src/components/editor-help/images/build-layouts-light.png +0 -0
  353. package/src/components/editor-help/images/build-layouts-light@2x.png +0 -0
  354. package/src/components/editor-help/images/build-layouts-light@3x.png +0 -0
  355. package/src/components/editor-help/images/drag-and-drop-dark.png +0 -0
  356. package/src/components/editor-help/images/drag-and-drop-dark@2x.png +0 -0
  357. package/src/components/editor-help/images/drag-and-drop-dark@3x.png +0 -0
  358. package/src/components/editor-help/images/drag-and-drop-light.png +0 -0
  359. package/src/components/editor-help/images/drag-and-drop-light@2x.png +0 -0
  360. package/src/components/editor-help/images/drag-and-drop-light@3x.png +0 -0
  361. package/src/components/editor-help/images/edit-media-dark.png +0 -0
  362. package/src/components/editor-help/images/edit-media-dark@2x.png +0 -0
  363. package/src/components/editor-help/images/edit-media-dark@3x.png +0 -0
  364. package/src/components/editor-help/images/edit-media-light.png +0 -0
  365. package/src/components/editor-help/images/edit-media-light@2x.png +0 -0
  366. package/src/components/editor-help/images/edit-media-light@3x.png +0 -0
  367. package/src/components/editor-help/images/embed-media-dark.png +0 -0
  368. package/src/components/editor-help/images/embed-media-dark@2x.png +0 -0
  369. package/src/components/editor-help/images/embed-media-dark@3x.png +0 -0
  370. package/src/components/editor-help/images/embed-media-light.png +0 -0
  371. package/src/components/editor-help/images/embed-media-light@2x.png +0 -0
  372. package/src/components/editor-help/images/embed-media-light@3x.png +0 -0
  373. package/src/components/editor-help/images/move-dark.png +0 -0
  374. package/src/components/editor-help/images/move-dark@2x.png +0 -0
  375. package/src/components/editor-help/images/move-dark@3x.png +0 -0
  376. package/src/components/editor-help/images/move-light.png +0 -0
  377. package/src/components/editor-help/images/move-light@2x.png +0 -0
  378. package/src/components/editor-help/images/move-light@3x.png +0 -0
  379. package/src/components/editor-help/images/options-dark.png +0 -0
  380. package/src/components/editor-help/images/options-dark@2x.png +0 -0
  381. package/src/components/editor-help/images/options-dark@3x.png +0 -0
  382. package/src/components/editor-help/images/options-light.png +0 -0
  383. package/src/components/editor-help/images/options-light@2x.png +0 -0
  384. package/src/components/editor-help/images/options-light@3x.png +0 -0
  385. package/src/components/editor-help/images/rich-text-dark.png +0 -0
  386. package/src/components/editor-help/images/rich-text-dark@2x.png +0 -0
  387. package/src/components/editor-help/images/rich-text-dark@3x.png +0 -0
  388. package/src/components/editor-help/images/rich-text-light.png +0 -0
  389. package/src/components/editor-help/images/rich-text-light@2x.png +0 -0
  390. package/src/components/editor-help/images/rich-text-light@3x.png +0 -0
  391. package/src/components/editor-help/images/settings-dark.png +0 -0
  392. package/src/components/editor-help/images/settings-dark@2x.png +0 -0
  393. package/src/components/editor-help/images/settings-dark@3x.png +0 -0
  394. package/src/components/editor-help/images/settings-light.png +0 -0
  395. package/src/components/editor-help/images/settings-light@2x.png +0 -0
  396. package/src/components/editor-help/images/settings-light@3x.png +0 -0
  397. package/src/components/editor-help/style.scss +0 -123
  398. package/src/components/post-revisions-panel/index.js +0 -161
  399. package/src/components/post-revisions-panel/style.scss +0 -16
  400. package/src/components/revision-author-panel/index.js +0 -36
  401. package/src/components/revision-created-panel/index.js +0 -36
@@ -75,10 +75,30 @@
75
75
  color: $gray-700;
76
76
  }
77
77
 
78
+ .editor-collab-sidebar-panel__show-more-button {
79
+ width: fit-content;
80
+ color: var(--wpds-color-foreground-interactive-brand);
81
+ cursor: var(--wpds-cursor-control);
82
+
83
+ &:hover,
84
+ &:focus,
85
+ &:active {
86
+ color: var(--wpds-color-foreground-interactive-brand-active);
87
+ }
88
+ }
89
+
78
90
  .editor-collab-sidebar-panel__note-content {
79
91
  p:last-child {
80
92
  margin-bottom: 0;
81
93
  }
94
+
95
+ &.is-collapsed {
96
+ -webkit-line-clamp: 3;
97
+ line-clamp: 3;
98
+ display: -webkit-box;
99
+ -webkit-box-orient: vertical;
100
+ overflow: hidden;
101
+ }
82
102
  }
83
103
 
84
104
  .editor-collab-sidebar-panel__user-avatar {
@@ -12,7 +12,6 @@ extend( [ a11yPlugin ] );
12
12
  */
13
13
  import { Icon as WCIcon } from '@wordpress/components';
14
14
  import { useMemo } from '@wordpress/element';
15
- // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
16
15
  import { Tooltip } from '@wordpress/ui';
17
16
 
18
17
  /**
@@ -7,7 +7,6 @@ import userEvent from '@testing-library/user-event';
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
- // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
11
10
  import { Tooltip } from '@wordpress/ui';
12
11
 
13
12
  /**
@@ -141,6 +141,8 @@ export default function DocumentBar( props ) {
141
141
  const { open: openCommandCenter } = useDispatch( commandsStore );
142
142
  const isReducedMotion = useReducedMotion();
143
143
 
144
+ const hasShortcut = ! window.__experimentalAdminBarInEditor;
145
+
144
146
  const isTemplate = TEMPLATE_POST_TYPES.includes( postType );
145
147
  const hasBackButton =
146
148
  !! onNavigateToPreviousEntityRecord || !! unlockedPatternInfo;
@@ -175,6 +177,7 @@ export default function DocumentBar( props ) {
175
177
  <div
176
178
  className={ clsx( 'editor-document-bar', {
177
179
  'has-back-button': hasBackButton,
180
+ 'has-shortcut': hasShortcut,
178
181
  } ) }
179
182
  >
180
183
  <AnimatePresence>
@@ -267,9 +270,11 @@ export default function DocumentBar( props ) {
267
270
  ) }
268
271
  </WCText>
269
272
  </motion.div>
270
- <span className="editor-document-bar__shortcut">
271
- { displayShortcut.primary( 'k' ) }
272
- </span>
273
+ { hasShortcut && (
274
+ <span className="editor-document-bar__shortcut">
275
+ { displayShortcut.primary( 'k' ) }
276
+ </span>
277
+ ) }
273
278
  </Button>
274
279
  ) }
275
280
  </div>
@@ -55,8 +55,10 @@
55
55
  max-width: 70%;
56
56
 
57
57
  // Offset the layout based on the width of the ⌘K label. This ensures the title is centrally aligned.
58
- @include break-medium() {
59
- padding-left: $grid-unit-30;
58
+ .editor-document-bar.has-shortcut & {
59
+ @include break-medium() {
60
+ padding-left: $grid-unit-30;
61
+ }
60
62
  }
61
63
 
62
64
  h1 {
@@ -41,6 +41,7 @@ export default function EditorKeyboardShortcuts() {
41
41
  isPostSavingLocked,
42
42
  isListViewOpened,
43
43
  getEditorMode,
44
+ isSavingNonPostEntityChanges,
44
45
  } = useSelect( editorStore );
45
46
 
46
47
  useShortcut(
@@ -75,7 +76,7 @@ export default function EditorKeyboardShortcuts() {
75
76
  /**
76
77
  * Do not save the post if post saving is locked.
77
78
  */
78
- if ( isPostSavingLocked() ) {
79
+ if ( isPostSavingLocked() || isSavingNonPostEntityChanges() ) {
79
80
  return;
80
81
  }
81
82
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { useCallback, useEffect, useRef } from '@wordpress/element';
5
5
  import { ifCondition, usePrevious } from '@wordpress/compose';
6
- import { useSelect, useDispatch } from '@wordpress/data';
6
+ import { useSelect, useDispatch, useRegistry } from '@wordpress/data';
7
7
  import { __ } from '@wordpress/i18n';
8
8
  import { parse } from '@wordpress/blocks';
9
9
  import { store as noticesStore } from '@wordpress/notices';
@@ -53,19 +53,14 @@ const hasSessionStorageSupport = () => {
53
53
  * restore a local autosave, if one exists.
54
54
  */
55
55
  function useAutosaveNotice() {
56
- const { postId, isEditedPostNew, hasRemoteAutosave } = useSelect(
56
+ const registry = useRegistry();
57
+ const { postId, isEditedPostNew } = useSelect(
57
58
  ( select ) => ( {
58
59
  postId: select( editorStore ).getCurrentPostId(),
59
60
  isEditedPostNew: select( editorStore ).isEditedPostNew(),
60
- hasRemoteAutosave:
61
- !! select( editorStore ).getEditorSettings().autosave,
62
61
  } ),
63
62
  []
64
63
  );
65
- const { getEditedPostAttribute } = useSelect( editorStore );
66
-
67
- const { createWarningNotice, removeNotice } = useDispatch( noticesStore );
68
- const { editPost, resetEditorBlocks } = useDispatch( editorStore );
69
64
 
70
65
  useEffect( () => {
71
66
  let localAutosave = localAutosaveGet( postId, isEditedPostNew );
@@ -83,24 +78,31 @@ function useAutosaveNotice() {
83
78
  const { post_title: title, content, excerpt } = localAutosave;
84
79
  const edits = { title, content, excerpt };
85
80
 
86
- {
87
- // Only display a notice if there is a difference between what has been
88
- // saved and that which is stored in sessionStorage.
89
- const hasDifference = Object.keys( edits ).some( ( key ) => {
90
- return edits[ key ] !== getEditedPostAttribute( key );
91
- } );
92
-
93
- if ( ! hasDifference ) {
94
- // If there is no difference, it can be safely ejected from storage.
95
- localAutosaveClear( postId, isEditedPostNew );
96
- return;
97
- }
81
+ const { getEditedPostAttribute, getEditorSettings } =
82
+ registry.select( editorStore );
83
+
84
+ // Only display a notice if there is a difference between what has been
85
+ // saved and that which is stored in sessionStorage.
86
+ const hasDifference = Object.keys( edits ).some( ( key ) => {
87
+ return edits[ key ] !== getEditedPostAttribute( key );
88
+ } );
89
+
90
+ if ( ! hasDifference ) {
91
+ // If there is no difference, it can be safely ejected from storage.
92
+ localAutosaveClear( postId, isEditedPostNew );
93
+ return;
98
94
  }
99
95
 
96
+ const hasRemoteAutosave = !! getEditorSettings().autosave;
100
97
  if ( hasRemoteAutosave ) {
101
98
  return;
102
99
  }
103
100
 
101
+ const { createWarningNotice, removeNotice } =
102
+ registry.dispatch( noticesStore );
103
+ const { editPost, resetEditorBlocks } =
104
+ registry.dispatch( editorStore );
105
+
104
106
  const id = 'wpEditorAutosaveRestore';
105
107
 
106
108
  createWarningNotice(
@@ -125,7 +127,7 @@ function useAutosaveNotice() {
125
127
  ],
126
128
  }
127
129
  );
128
- }, [ isEditedPostNew, postId ] );
130
+ }, [ registry, postId, isEditedPostNew ] );
129
131
  }
130
132
 
131
133
  /**
@@ -168,7 +168,7 @@ export default function PostCardPanel( {
168
168
  { sprintf(
169
169
  // translators: %s: Name of the plural post type e.g: "Posts".
170
170
  __( 'Changes will be applied to all selected %s.' ),
171
- labels?.name.toLowerCase()
171
+ labels?.name?.toLowerCase()
172
172
  ) }
173
173
  </WCText>
174
174
  ) }
@@ -48,7 +48,7 @@ export function PostPublishButton( {
48
48
  isPublishable: store.isEditedPostPublishable(),
49
49
  isPublished: store.isCurrentPostPublished(),
50
50
  hasPublishAction:
51
- store.getCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,
51
+ !! store.getCurrentPost()?._links?.[ 'wp:action-publish' ],
52
52
  postType: store.getCurrentPostType(),
53
53
  postId: store.getCurrentPostId(),
54
54
  postStatus: store.getEditedPostAttribute( 'status' ),
@@ -103,18 +103,21 @@ export function PostPublishButton( {
103
103
 
104
104
  const isButtonDisabled =
105
105
  isPostSavingLocked ||
106
+ // Disable while a non-post entity (e.g. a newly created term) is mid-save.
107
+ isSavingNonPostEntityChanges ||
106
108
  ( ( isSaving ||
107
109
  ! isSaveable ||
108
110
  ( ! isPublishable && ! forceIsDirty ) ) &&
109
- ( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ) );
111
+ ! hasNonPostEntityChanges );
110
112
 
111
113
  const isToggleDisabled =
112
114
  isPostSavingLocked ||
115
+ isSavingNonPostEntityChanges ||
113
116
  ( ( isPublished ||
114
117
  isSaving ||
115
118
  ! isSaveable ||
116
119
  ( ! isPublishable && ! forceIsDirty ) ) &&
117
- ( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges ) );
120
+ ! hasNonPostEntityChanges );
118
121
 
119
122
  // If the new status has not changed explicitly, we derive it from
120
123
  // other factors, like having a publish action, etc.. We need to preserve
@@ -89,6 +89,19 @@ describe( 'PostPublishButton', () => {
89
89
  );
90
90
  } );
91
91
 
92
+ it( 'should be true if a non-post entity is being saved', () => {
93
+ mockSelector( 'isEditedPostPublishable', true );
94
+ mockSelector( 'isEditedPostSaveable', true );
95
+ mockSelector( 'isSavingNonPostEntityChanges', true );
96
+
97
+ render( <PostPublishButton /> );
98
+
99
+ expect( screen.getByRole( 'button' ) ).toHaveAttribute(
100
+ 'aria-disabled',
101
+ 'true'
102
+ );
103
+ } );
104
+
92
105
  it( 'should be false if post is saveable but not publishable and forceIsDirty is true', () => {
93
106
  mockSelector( 'isEditedPostSaveable', true );
94
107
  mockSelector( 'isEditedPostPublishable', false );
@@ -15,7 +15,6 @@ import {
15
15
  store as blockEditorStore,
16
16
  } from '@wordpress/block-editor';
17
17
  import { __ } from '@wordpress/i18n';
18
- // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
19
18
  import { Tooltip } from '@wordpress/ui';
20
19
 
21
20
  /**
@@ -0,0 +1,186 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useSelect, useDispatch } from '@wordpress/data';
5
+ import { store as coreStore } from '@wordpress/core-data';
6
+ import { DataViewsPicker, filterSortAndPaginate } from '@wordpress/dataviews';
7
+ import { dateI18n, getDate, humanTimeDiff, getSettings } from '@wordpress/date';
8
+ import { useCallback, useEffect, useMemo, useState } from '@wordpress/element';
9
+ import { __ } from '@wordpress/i18n';
10
+ import { authorField } from '@wordpress/fields';
11
+ import { Text } from '@wordpress/ui';
12
+
13
+ /**
14
+ * Internal dependencies
15
+ */
16
+ import { store as editorStore } from '../../store';
17
+ import { unlock } from '../../lock-unlock';
18
+ import { PostContentInformationUI } from '../post-content-information';
19
+
20
+ const PAGE_SIZE = 10;
21
+ const EMPTY_ARRAY = [];
22
+ const defaultLayouts = { pickerActivity: true };
23
+ const baseView = {
24
+ type: 'pickerActivity',
25
+ titleField: 'date',
26
+ descriptionField: 'details',
27
+ fields: [ 'author' ],
28
+ layout: { density: 'compact' },
29
+ page: 1,
30
+ perPage: PAGE_SIZE,
31
+ };
32
+
33
+ const DAY_IN_MILLISECONDS = 86400000;
34
+
35
+ function getDisplayDate( value ) {
36
+ const dateNowInMs = getDate( null ).getTime();
37
+ const date = getDate( value ?? null );
38
+ return dateNowInMs - date.getTime() > DAY_IN_MILLISECONDS
39
+ ? dateI18n( getSettings().formats.datetimeAbbreviated, date )
40
+ : humanTimeDiff( date );
41
+ }
42
+
43
+ export default function PostRevisionsTimeline() {
44
+ const { setCurrentRevisionId } = unlock( useDispatch( editorStore ) );
45
+ const [ view, setView ] = useState( baseView );
46
+
47
+ const { revisions, revisionKey, currentRevisionId, currentRevision } =
48
+ useSelect( ( select ) => {
49
+ const { getCurrentPostType } = select( editorStore );
50
+ const {
51
+ getCurrentRevisionId: _getCurrentRevisionId,
52
+ getCurrentRevision,
53
+ getRevisionPage,
54
+ getPageRevisions,
55
+ } = unlock( select( editorStore ) );
56
+ const { getEntityConfig } = select( coreStore );
57
+
58
+ const _postType = getCurrentPostType();
59
+ const entityConfig = getEntityConfig( 'postType', _postType );
60
+ const _revisionKey = entityConfig?.revisionKey || 'id';
61
+ const _currentRevisionId = _getCurrentRevisionId();
62
+
63
+ return {
64
+ // Same desc-ordered window the header slider renders (warm cache).
65
+ revisions: getPageRevisions( getRevisionPage() ),
66
+ revisionKey: _revisionKey,
67
+ currentRevisionId: _currentRevisionId,
68
+ currentRevision: _currentRevisionId
69
+ ? getCurrentRevision()
70
+ : undefined,
71
+ };
72
+ }, [] );
73
+
74
+ const postContent = currentRevision?.content?.raw;
75
+
76
+ const isLoading = ! revisions;
77
+
78
+ const fields = useMemo(
79
+ () => [
80
+ {
81
+ id: 'date',
82
+ label: __( 'Date' ),
83
+ // Return the humanized label the row renders so the picker
84
+ // option's accessible name announces e.g. "5 minutes ago"
85
+ // instead of the raw ISO timestamp.
86
+ getValue: ( { item } ) => getDisplayDate( item.date ),
87
+ render: ( { item } ) => (
88
+ <Text
89
+ variant="heading-sm"
90
+ render={ <time dateTime={ item.date } /> }
91
+ >
92
+ { getDisplayDate( item.date ) }
93
+ </Text>
94
+ ),
95
+ enableSorting: false,
96
+ enableHiding: false,
97
+ },
98
+ authorField,
99
+ {
100
+ id: 'details',
101
+ label: __( 'Details' ),
102
+ render: ( { item } ) => {
103
+ if (
104
+ String( item[ revisionKey ] ) !==
105
+ String( currentRevisionId )
106
+ ) {
107
+ return null;
108
+ }
109
+ return (
110
+ <PostContentInformationUI postContent={ postContent } />
111
+ );
112
+ },
113
+ enableSorting: false,
114
+ enableHiding: false,
115
+ },
116
+ ],
117
+ [ revisionKey, currentRevisionId, postContent ]
118
+ );
119
+
120
+ const { data: shownRevisions, paginationInfo } = useMemo(
121
+ () => filterSortAndPaginate( revisions || EMPTY_ARRAY, view, fields ),
122
+ [ revisions, view, fields ]
123
+ );
124
+
125
+ // Keep the selected revision visible: when it changes (e.g. the slider
126
+ // scrubs), jump to the client-side page that contains it. Keyed on the
127
+ // selection/data, not view.page, so manual paging stays free browsing.
128
+ useEffect( () => {
129
+ if ( ! currentRevisionId || ! revisions ) {
130
+ return;
131
+ }
132
+ const index = revisions.findIndex(
133
+ ( r ) => String( r[ revisionKey ] ) === String( currentRevisionId )
134
+ );
135
+ if ( index < 0 ) {
136
+ return;
137
+ }
138
+ const page = Math.floor( index / view.perPage ) + 1;
139
+ setView( ( v ) => ( v.page === page ? v : { ...v, page } ) );
140
+ }, [ currentRevisionId, revisions, revisionKey, view.perPage ] );
141
+
142
+ const selection = useMemo(
143
+ () =>
144
+ currentRevisionId ? [ String( currentRevisionId ) ] : EMPTY_ARRAY,
145
+ [ currentRevisionId ]
146
+ );
147
+
148
+ const onChangeSelection = useCallback(
149
+ ( newSelection ) => {
150
+ // Revisions mode always keeps one revision selected. Clicking the
151
+ // active revision yields an empty selection, which we ignore so the
152
+ // timeline never ends up with nothing selected.
153
+ if ( newSelection.length === 0 ) {
154
+ return;
155
+ }
156
+ const selectedId = newSelection[ newSelection.length - 1 ];
157
+ setCurrentRevisionId( Number( selectedId ) );
158
+ },
159
+ [ setCurrentRevisionId ]
160
+ );
161
+
162
+ const getItemId = useCallback(
163
+ ( item ) => String( item[ revisionKey ] ),
164
+ [ revisionKey ]
165
+ );
166
+
167
+ return (
168
+ <div className="editor-post-revisions-timeline">
169
+ <DataViewsPicker
170
+ view={ view }
171
+ onChangeView={ setView }
172
+ fields={ fields }
173
+ data={ shownRevisions }
174
+ isLoading={ isLoading }
175
+ paginationInfo={ paginationInfo }
176
+ defaultLayouts={ defaultLayouts }
177
+ getItemId={ getItemId }
178
+ selection={ selection }
179
+ onChangeSelection={ onChangeSelection }
180
+ >
181
+ <DataViewsPicker.Layout />
182
+ <DataViewsPicker.Footer />
183
+ </DataViewsPicker>
184
+ </div>
185
+ );
186
+ }
@@ -0,0 +1,43 @@
1
+ // Give the revisions inspector a bounded height so the timeline scrolls
2
+ // internally and the picker's pagination stays pinned to the bottom.
3
+ //
4
+ // The timeline only renders in revisions mode, so its ancestors are scoped
5
+ // with `:has()` — keeping this layout out of the generic editor sidebar.
6
+ .interface-complementary-area:has(.editor-post-revisions-timeline) {
7
+ display: flex;
8
+ flex-direction: column;
9
+ overflow: hidden;
10
+
11
+ // The tabs header keeps its natural height.
12
+ .editor-sidebar__panel-tabs {
13
+ flex-shrink: 0;
14
+ }
15
+ }
16
+
17
+ .editor-sidebar__panel:has(.editor-post-revisions-timeline) {
18
+ display: flex;
19
+ flex-direction: column;
20
+ flex: 1;
21
+ min-height: 0;
22
+
23
+ // The document tab panel hands its bounded height down to the timeline.
24
+ [role="tabpanel"]:has(.editor-post-revisions-timeline) {
25
+ display: flex;
26
+ flex-direction: column;
27
+ flex: 1;
28
+ min-height: 0;
29
+ }
30
+
31
+ // Cap only the post-meta diff content so a large
32
+ // diff (e.g. footnotes) can't dominate the column.
33
+ .editor-revision-meta-diff__content {
34
+ max-height: 80px;
35
+ overflow-y: auto;
36
+ }
37
+
38
+ // timeline grows to fill the leftover space and scrolls internally.
39
+ .editor-post-revisions-timeline {
40
+ flex: 1;
41
+ min-height: 0;
42
+ }
43
+ }
@@ -46,6 +46,7 @@ export default function PostSavedState( { forceIsDirty } ) {
46
46
  isSaveable,
47
47
  isSaving,
48
48
  isSavingLocked,
49
+ isSavingNonPostEntityChanges,
49
50
  isScheduled,
50
51
  hasPublishAction,
51
52
  showIconLabels,
@@ -54,35 +55,25 @@ export default function PostSavedState( { forceIsDirty } ) {
54
55
  postType,
55
56
  } = useSelect(
56
57
  ( select ) => {
57
- const {
58
- isEditedPostNew,
59
- isCurrentPostPublished,
60
- isCurrentPostScheduled,
61
- isEditedPostDirty,
62
- isSavingPost,
63
- isEditedPostSaveable,
64
- isPostSavingLocked,
65
- getCurrentPost,
66
- isAutosavingPost,
67
- getEditedPostAttribute,
68
- getPostEdits,
69
- } = select( editorStore );
58
+ const store = select( editorStore );
70
59
  const { get } = select( preferencesStore );
71
60
  return {
72
- isAutosaving: isAutosavingPost(),
73
- isDirty: forceIsDirty || isEditedPostDirty(),
74
- isNew: isEditedPostNew(),
75
- isPublished: isCurrentPostPublished(),
76
- isSaving: isSavingPost(),
77
- isSaveable: isEditedPostSaveable(),
78
- isSavingLocked: isPostSavingLocked(),
79
- isScheduled: isCurrentPostScheduled(),
61
+ isAutosaving: store.isAutosavingPost(),
62
+ isDirty: forceIsDirty || store.isEditedPostDirty(),
63
+ isNew: store.isEditedPostNew(),
64
+ isPublished: store.isCurrentPostPublished(),
65
+ isSaving: store.isSavingPost(),
66
+ isSaveable: store.isEditedPostSaveable(),
67
+ isSavingLocked: store.isPostSavingLocked(),
68
+ isSavingNonPostEntityChanges:
69
+ store.isSavingNonPostEntityChanges(),
70
+ isScheduled: store.isCurrentPostScheduled(),
80
71
  hasPublishAction:
81
- getCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,
72
+ !! store.getCurrentPost()?._links?.[ 'wp:action-publish' ],
82
73
  showIconLabels: get( 'core', 'showIconLabels' ),
83
- postStatus: getEditedPostAttribute( 'status' ),
84
- postStatusHasChanged: !! getPostEdits()?.status,
85
- postType: select( editorStore ).getCurrentPostType(),
74
+ postStatus: store.getEditedPostAttribute( 'status' ),
75
+ postStatusHasChanged: !! store.getPostEdits()?.status,
76
+ postType: store.getCurrentPostType(),
86
77
  };
87
78
  },
88
79
  [ forceIsDirty ]
@@ -143,7 +134,13 @@ export default function PostSavedState( { forceIsDirty } ) {
143
134
 
144
135
  const isSaved = forceSavedMessage || ( ! isNew && ! isDirty );
145
136
  const isSavedState = isSaving || isSaved;
146
- const isDisabled = isSaving || isSaved || ! isSaveable || isSavingLocked;
137
+ const isDisabled =
138
+ isSaving ||
139
+ isSaved ||
140
+ ! isSaveable ||
141
+ isSavingLocked ||
142
+ // Disable while a non-post entity (e.g. a newly created term) is mid-save.
143
+ isSavingNonPostEntityChanges;
147
144
  let text;
148
145
 
149
146
  if ( isSaving ) {
@@ -71,6 +71,24 @@ describe( 'PostSavedState', () => {
71
71
  expect( screen.getByRole( 'button' ) ).toMatchSnapshot();
72
72
  } );
73
73
 
74
+ it( 'returns a disabled button while a non-post entity is being saved', () => {
75
+ useSelect.mockImplementation( () => ( {
76
+ isDirty: true,
77
+ isNew: false,
78
+ isSaveable: true,
79
+ isSaving: false,
80
+ isSavingNonPostEntityChanges: true,
81
+ postStatus: 'draft',
82
+ } ) );
83
+
84
+ render( <PostSavedState /> );
85
+
86
+ expect( screen.getByRole( 'button' ) ).toHaveAttribute(
87
+ 'aria-disabled',
88
+ 'true'
89
+ );
90
+ } );
91
+
74
92
  it( 'should return Saved text if not new and not dirty', () => {
75
93
  useSelect.mockImplementation( () => ( {
76
94
  isDirty: false,
@@ -3,11 +3,8 @@
3
3
  */
4
4
  import { __, _x, sprintf } from '@wordpress/i18n';
5
5
  import { useEffect, useMemo, useState } from '@wordpress/element';
6
- import {
7
- FormTokenField,
8
- withFilters,
9
- __experimentalVStack as VStack,
10
- } from '@wordpress/components';
6
+ import { FormTokenField, withFilters } from '@wordpress/components';
7
+ import { Stack } from '@wordpress/ui';
11
8
  import { useSelect, useDispatch } from '@wordpress/data';
12
9
  import { store as coreStore } from '@wordpress/core-data';
13
10
  import { useDebounce } from '@wordpress/compose';
@@ -280,7 +277,7 @@ export function FlatTermSelector( { slug } ) {
280
277
  );
281
278
 
282
279
  return (
283
- <VStack spacing={ 4 }>
280
+ <Stack direction="column" gap="lg">
284
281
  <FormTokenField
285
282
  __next40pxDefaultSize
286
283
  value={ values }
@@ -296,7 +293,7 @@ export function FlatTermSelector( { slug } ) {
296
293
  } }
297
294
  />
298
295
  <MostUsedTerms taxonomy={ taxonomy } onSelect={ appendTerm } />
299
- </VStack>
296
+ </Stack>
300
297
  );
301
298
  }
302
299