@wordpress/editor 14.48.0 → 14.48.1

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 (205) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/build/components/block-removal-warnings/index.cjs +0 -3
  3. package/build/components/block-removal-warnings/index.cjs.map +2 -2
  4. package/build/components/collab-sidebar/note-indicator-toolbar.cjs +49 -43
  5. package/build/components/collab-sidebar/note-indicator-toolbar.cjs.map +3 -3
  6. package/build/components/collaborators-overlay/use-block-highlighting.cjs +1 -8
  7. package/build/components/collaborators-overlay/use-block-highlighting.cjs.map +3 -3
  8. package/build/components/collaborators-overlay/use-render-cursors.cjs +1 -7
  9. package/build/components/collaborators-overlay/use-render-cursors.cjs.map +3 -3
  10. package/build/components/more-menu/view-more-menu-group.cjs +1 -2
  11. package/build/components/more-menu/view-more-menu-group.cjs.map +2 -2
  12. package/build/components/page-attributes/parent.cjs +1 -0
  13. package/build/components/page-attributes/parent.cjs.map +2 -2
  14. package/build/components/post-publish-button/index.cjs +114 -157
  15. package/build/components/post-publish-button/index.cjs.map +3 -3
  16. package/build/components/post-revisions-preview/block-diff.cjs +21 -9
  17. package/build/components/post-revisions-preview/block-diff.cjs.map +2 -2
  18. package/build/components/post-revisions-preview/preserve-client-ids.cjs +2 -2
  19. package/build/components/post-revisions-preview/preserve-client-ids.cjs.map +2 -2
  20. package/build/components/provider/index.cjs +2 -0
  21. package/build/components/provider/index.cjs.map +3 -3
  22. package/build/components/provider/use-network-reconnect.cjs +51 -0
  23. package/build/components/provider/use-network-reconnect.cjs.map +7 -0
  24. package/build/components/revision-fields-diff/index.cjs +2 -2
  25. package/build/components/revision-fields-diff/index.cjs.map +2 -2
  26. package/build/components/sidebar/index.cjs +1 -4
  27. package/build/components/sidebar/index.cjs.map +2 -2
  28. package/build/components/template-actions-panel/block-theme-content.cjs +7 -1
  29. package/build/components/template-actions-panel/block-theme-content.cjs.map +2 -2
  30. package/build/components/upload-progress-snackbar/index.cjs +161 -0
  31. package/build/components/upload-progress-snackbar/index.cjs.map +7 -0
  32. package/build/components/upload-progress-snackbar/tracker.cjs +90 -0
  33. package/build/components/upload-progress-snackbar/tracker.cjs.map +7 -0
  34. package/build/private-apis.cjs +2 -0
  35. package/build/private-apis.cjs.map +3 -3
  36. package/build/store/selectors.cjs +1 -2
  37. package/build/store/selectors.cjs.map +2 -2
  38. package/build/utils/media-upload/index.cjs +16 -0
  39. package/build/utils/media-upload/index.cjs.map +3 -3
  40. package/build-module/components/block-removal-warnings/index.mjs +0 -3
  41. package/build-module/components/block-removal-warnings/index.mjs.map +2 -2
  42. package/build-module/components/collab-sidebar/note-indicator-toolbar.mjs +53 -44
  43. package/build-module/components/collab-sidebar/note-indicator-toolbar.mjs.map +2 -2
  44. package/build-module/components/collaborators-overlay/use-block-highlighting.mjs +1 -8
  45. package/build-module/components/collaborators-overlay/use-block-highlighting.mjs.map +2 -2
  46. package/build-module/components/collaborators-overlay/use-render-cursors.mjs +1 -7
  47. package/build-module/components/collaborators-overlay/use-render-cursors.mjs.map +2 -2
  48. package/build-module/components/more-menu/view-more-menu-group.mjs +1 -2
  49. package/build-module/components/more-menu/view-more-menu-group.mjs.map +2 -2
  50. package/build-module/components/page-attributes/parent.mjs +1 -0
  51. package/build-module/components/page-attributes/parent.mjs.map +2 -2
  52. package/build-module/components/post-publish-button/index.mjs +116 -159
  53. package/build-module/components/post-publish-button/index.mjs.map +2 -2
  54. package/build-module/components/post-revisions-preview/block-diff.mjs +20 -8
  55. package/build-module/components/post-revisions-preview/block-diff.mjs.map +2 -2
  56. package/build-module/components/post-revisions-preview/preserve-client-ids.mjs +1 -1
  57. package/build-module/components/post-revisions-preview/preserve-client-ids.mjs.map +1 -1
  58. package/build-module/components/provider/index.mjs +2 -0
  59. package/build-module/components/provider/index.mjs.map +2 -2
  60. package/build-module/components/provider/use-network-reconnect.mjs +30 -0
  61. package/build-module/components/provider/use-network-reconnect.mjs.map +7 -0
  62. package/build-module/components/revision-fields-diff/index.mjs +2 -2
  63. package/build-module/components/revision-fields-diff/index.mjs.map +2 -2
  64. package/build-module/components/sidebar/index.mjs +2 -11
  65. package/build-module/components/sidebar/index.mjs.map +2 -2
  66. package/build-module/components/template-actions-panel/block-theme-content.mjs +7 -1
  67. package/build-module/components/template-actions-panel/block-theme-content.mjs.map +2 -2
  68. package/build-module/components/upload-progress-snackbar/index.mjs +135 -0
  69. package/build-module/components/upload-progress-snackbar/index.mjs.map +7 -0
  70. package/build-module/components/upload-progress-snackbar/tracker.mjs +61 -0
  71. package/build-module/components/upload-progress-snackbar/tracker.mjs.map +7 -0
  72. package/build-module/private-apis.mjs +2 -0
  73. package/build-module/private-apis.mjs.map +2 -2
  74. package/build-module/store/selectors.mjs +1 -2
  75. package/build-module/store/selectors.mjs.map +2 -2
  76. package/build-module/utils/media-upload/index.mjs +19 -0
  77. package/build-module/utils/media-upload/index.mjs.map +2 -2
  78. package/build-style/style-rtl.css +454 -81
  79. package/build-style/style.css +454 -81
  80. package/build-types/components/block-removal-warnings/index.d.ts.map +1 -1
  81. package/build-types/components/collab-sidebar/add-comment.d.ts +6 -0
  82. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -0
  83. package/build-types/components/collab-sidebar/comment-author-info.d.ts +8 -0
  84. package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +1 -0
  85. package/build-types/components/collab-sidebar/comment-form.d.ts +9 -0
  86. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -0
  87. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts +6 -0
  88. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +1 -0
  89. package/build-types/components/collab-sidebar/comment-menu-item.d.ts +6 -0
  90. package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -0
  91. package/build-types/components/collab-sidebar/comments.d.ts +10 -0
  92. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -0
  93. package/build-types/components/collab-sidebar/note-indicator-toolbar.d.ts.map +1 -1
  94. package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts +0 -3
  95. package/build-types/components/collaborators-overlay/use-block-highlighting.d.ts.map +1 -1
  96. package/build-types/components/collaborators-overlay/use-render-cursors.d.ts.map +1 -1
  97. package/build-types/components/document-bar/index.d.ts +2 -2
  98. package/build-types/components/document-bar/index.d.ts.map +1 -1
  99. package/build-types/components/global-styles-provider/index.d.ts +16 -0
  100. package/build-types/components/global-styles-provider/index.d.ts.map +1 -0
  101. package/build-types/components/media/index.d.ts +3 -0
  102. package/build-types/components/media/index.d.ts.map +1 -0
  103. package/build-types/components/media/metadata-panel.d.ts +12 -0
  104. package/build-types/components/media/metadata-panel.d.ts.map +1 -0
  105. package/build-types/components/media/preview.d.ts +9 -0
  106. package/build-types/components/media/preview.d.ts.map +1 -0
  107. package/build-types/components/more-menu/view-more-menu-group.d.ts.map +1 -1
  108. package/build-types/components/page-attributes/parent.d.ts.map +1 -1
  109. package/build-types/components/post-publish-button/index.d.ts +9 -9
  110. package/build-types/components/post-publish-button/index.d.ts.map +1 -1
  111. package/build-types/components/post-revisions-preview/block-diff.d.ts +3 -0
  112. package/build-types/components/post-revisions-preview/block-diff.d.ts.map +1 -1
  113. package/build-types/components/post-text-editor/index.d.ts +1 -1
  114. package/build-types/components/post-text-editor/index.d.ts.map +1 -1
  115. package/build-types/components/post-text-editor/utils.d.ts +29 -0
  116. package/build-types/components/post-text-editor/utils.d.ts.map +1 -0
  117. package/build-types/components/provider/index.d.ts.map +1 -1
  118. package/build-types/components/provider/use-network-reconnect.d.ts +8 -0
  119. package/build-types/components/provider/use-network-reconnect.d.ts.map +1 -0
  120. package/build-types/components/revision-fields-diff/index.d.ts +3 -0
  121. package/build-types/components/revision-fields-diff/index.d.ts.map +1 -1
  122. package/build-types/components/sidebar/index.d.ts.map +1 -1
  123. package/build-types/components/template-actions-panel/block-theme-content.d.ts.map +1 -1
  124. package/build-types/components/upload-progress-snackbar/index.d.ts +19 -0
  125. package/build-types/components/upload-progress-snackbar/index.d.ts.map +1 -0
  126. package/build-types/components/upload-progress-snackbar/stories/index.story.d.ts +28 -0
  127. package/build-types/components/upload-progress-snackbar/stories/index.story.d.ts.map +1 -0
  128. package/build-types/components/upload-progress-snackbar/tracker.d.ts +41 -0
  129. package/build-types/components/upload-progress-snackbar/tracker.d.ts.map +1 -0
  130. package/build-types/private-apis.d.ts.map +1 -1
  131. package/build-types/store/selectors.d.ts.map +1 -1
  132. package/build-types/utils/get-template-part-icon.d.ts.map +1 -1
  133. package/build-types/utils/media-upload/index.d.ts.map +1 -1
  134. package/package.json +53 -50
  135. package/src/components/README.md +1 -1
  136. package/src/components/block-removal-warnings/index.js +0 -7
  137. package/src/components/collab-sidebar/note-indicator-toolbar.js +73 -60
  138. package/src/components/collaborators-overlay/use-block-highlighting.ts +0 -9
  139. package/src/components/collaborators-overlay/use-render-cursors.ts +0 -8
  140. package/src/components/collaborators-presence/avatar/test/index.tsx +8 -3
  141. package/src/components/more-menu/view-more-menu-group.js +1 -2
  142. package/src/components/page-attributes/parent.js +1 -0
  143. package/src/components/post-publish-button/index.js +143 -192
  144. package/src/components/post-publish-button/test/index.js +137 -114
  145. package/src/components/post-revisions-preview/block-diff.js +63 -19
  146. package/src/components/post-revisions-preview/preserve-client-ids.js +1 -1
  147. package/src/components/post-revisions-preview/test/block-diff.js +109 -6
  148. package/src/components/provider/index.js +4 -0
  149. package/src/components/provider/test/use-network-reconnect.js +137 -0
  150. package/src/components/provider/use-network-reconnect.js +44 -0
  151. package/src/components/revision-fields-diff/index.js +7 -2
  152. package/src/components/sidebar/index.js +2 -11
  153. package/src/components/template-actions-panel/block-theme-content.js +10 -1
  154. package/src/components/upload-progress-snackbar/README.md +26 -0
  155. package/src/components/upload-progress-snackbar/index.js +216 -0
  156. package/src/components/upload-progress-snackbar/stories/index.story.tsx +85 -0
  157. package/src/components/upload-progress-snackbar/style.scss +30 -0
  158. package/src/components/upload-progress-snackbar/test/index.js +199 -0
  159. package/src/components/upload-progress-snackbar/tracker.js +105 -0
  160. package/src/private-apis.js +2 -0
  161. package/src/store/selectors.js +1 -3
  162. package/src/style.scss +1 -0
  163. package/src/utils/media-upload/index.js +27 -0
  164. package/src/components/commands/index.native.js +0 -2
  165. package/src/components/deprecated.native.js +0 -47
  166. package/src/components/editor-help/add-blocks.native.js +0 -40
  167. package/src/components/editor-help/customize-blocks.native.js +0 -40
  168. package/src/components/editor-help/help-detail-navigation-screen.native.js +0 -67
  169. package/src/components/editor-help/help-get-support-button.native.js +0 -38
  170. package/src/components/editor-help/help-section-title.native.js +0 -29
  171. package/src/components/editor-help/help-topic-row.native.js +0 -33
  172. package/src/components/editor-help/icon-move-blocks.native.js +0 -10
  173. package/src/components/editor-help/index.native.js +0 -208
  174. package/src/components/editor-help/intro-to-blocks.native.js +0 -91
  175. package/src/components/editor-help/move-blocks.native.js +0 -55
  176. package/src/components/editor-help/remove-blocks.native.js +0 -35
  177. package/src/components/editor-help/style.android.scss +0 -6
  178. package/src/components/editor-help/style.ios.scss +0 -6
  179. package/src/components/editor-help/test/index.native.js +0 -81
  180. package/src/components/editor-help/view-sections.native.js +0 -79
  181. package/src/components/error-boundary/index.native.js +0 -192
  182. package/src/components/error-boundary/style.native.scss +0 -116
  183. package/src/components/index.native.js +0 -15
  184. package/src/components/offline-status/index.native.js +0 -99
  185. package/src/components/offline-status/style.native.scss +0 -28
  186. package/src/components/offline-status/test/index.native.js +0 -108
  187. package/src/components/post-title/index.native.js +0 -282
  188. package/src/components/post-title/style.native.scss +0 -13
  189. package/src/components/post-title/test/__snapshots__/index.native.js.snap +0 -25
  190. package/src/components/post-title/test/index.native.js +0 -78
  191. package/src/components/provider/index.native.js +0 -497
  192. package/src/components/provider/use-block-editor-settings.native.js +0 -48
  193. package/src/components/template-part-menu-items/index.native.js +0 -3
  194. package/src/hooks/index.native.js +0 -0
  195. package/src/index.native.js +0 -16
  196. package/src/private-apis.native.js +0 -33
  197. package/src/store/actions.native.js +0 -27
  198. package/src/store/reducer.native.js +0 -94
  199. package/src/store/selectors.native.js +0 -57
  200. package/src/store/test/actions.native.js +0 -16
  201. package/src/store/test/reducer.native.js +0 -36
  202. package/src/store/test/selectors.native.js +0 -28
  203. package/src/utils/index.native.js +0 -6
  204. package/src/utils/media-sideload/index.native.js +0 -1
  205. package/src/utils/media-upload/index.native.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "14.48.0",
3
+ "version": "14.48.1",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -40,7 +40,6 @@
40
40
  },
41
41
  "./package.json": "./package.json"
42
42
  },
43
- "react-native": "src/index",
44
43
  "wpScript": true,
45
44
  "types": "build-types",
46
45
  "sideEffects": [
@@ -60,56 +59,57 @@
60
59
  "build-module/bindings/**"
61
60
  ],
62
61
  "dependencies": {
63
- "@wordpress/a11y": "^4.48.0",
64
- "@wordpress/api-fetch": "^7.48.0",
65
- "@wordpress/base-styles": "^9.1.0",
66
- "@wordpress/blob": "^4.48.0",
67
- "@wordpress/block-editor": "^15.21.0",
68
- "@wordpress/block-serialization-default-parser": "^5.48.0",
69
- "@wordpress/blocks": "^15.21.0",
70
- "@wordpress/commands": "^1.48.0",
71
- "@wordpress/components": "^35.0.0",
72
- "@wordpress/compose": "^8.1.0",
73
- "@wordpress/core-data": "^7.48.0",
74
- "@wordpress/data": "^10.48.0",
75
- "@wordpress/dataviews": "^16.0.0",
76
- "@wordpress/date": "^5.48.0",
77
- "@wordpress/deprecated": "^4.48.0",
78
- "@wordpress/dom": "^4.48.0",
79
- "@wordpress/element": "^8.0.0",
80
- "@wordpress/fields": "^0.40.0",
81
- "@wordpress/global-styles-engine": "^1.15.0",
82
- "@wordpress/global-styles-ui": "^1.15.0",
83
- "@wordpress/hooks": "^4.48.0",
84
- "@wordpress/html-entities": "^4.48.0",
85
- "@wordpress/i18n": "^6.21.0",
86
- "@wordpress/icons": "^13.3.0",
87
- "@wordpress/interface": "^9.33.0",
88
- "@wordpress/keyboard-shortcuts": "^5.48.0",
89
- "@wordpress/keycodes": "^4.48.0",
90
- "@wordpress/media-editor": "^0.11.0",
91
- "@wordpress/media-fields": "^0.13.0",
92
- "@wordpress/media-utils": "^5.48.0",
93
- "@wordpress/notices": "^5.48.0",
94
- "@wordpress/patterns": "^2.48.0",
95
- "@wordpress/plugins": "^7.48.0",
96
- "@wordpress/preferences": "^4.48.0",
97
- "@wordpress/private-apis": "^1.48.0",
98
- "@wordpress/reusable-blocks": "^5.48.0",
99
- "@wordpress/rich-text": "^7.48.0",
100
- "@wordpress/server-side-render": "^6.24.0",
101
- "@wordpress/ui": "^0.15.0",
102
- "@wordpress/upload-media": "^0.33.0",
103
- "@wordpress/url": "^4.48.0",
104
- "@wordpress/views": "^1.15.0",
105
- "@wordpress/warning": "^3.48.0",
106
- "@wordpress/wordcount": "^4.48.0",
62
+ "@types/react": "^18.3.27",
63
+ "@wordpress/a11y": "^4.48.1",
64
+ "@wordpress/api-fetch": "^7.48.1",
65
+ "@wordpress/base-styles": "^10.0.1",
66
+ "@wordpress/blob": "^4.48.1",
67
+ "@wordpress/block-editor": "^15.21.1",
68
+ "@wordpress/block-serialization-default-parser": "^5.48.1",
69
+ "@wordpress/blocks": "^15.21.1",
70
+ "@wordpress/commands": "^1.48.1",
71
+ "@wordpress/components": "^35.0.1",
72
+ "@wordpress/compose": "^8.1.1",
73
+ "@wordpress/core-data": "^7.48.1",
74
+ "@wordpress/data": "^10.48.1",
75
+ "@wordpress/dataviews": "^16.0.1",
76
+ "@wordpress/date": "^5.48.1",
77
+ "@wordpress/deprecated": "^4.48.1",
78
+ "@wordpress/dom": "^4.48.1",
79
+ "@wordpress/element": "^8.0.1",
80
+ "@wordpress/fields": "^0.40.1",
81
+ "@wordpress/global-styles-engine": "^1.15.1",
82
+ "@wordpress/global-styles-ui": "^1.15.1",
83
+ "@wordpress/hooks": "^4.48.1",
84
+ "@wordpress/html-entities": "^4.48.1",
85
+ "@wordpress/i18n": "^6.21.1",
86
+ "@wordpress/icons": "^14.0.1",
87
+ "@wordpress/interface": "^9.33.1",
88
+ "@wordpress/keyboard-shortcuts": "^5.48.1",
89
+ "@wordpress/keycodes": "^4.48.1",
90
+ "@wordpress/media-editor": "^0.11.1",
91
+ "@wordpress/media-fields": "^0.13.1",
92
+ "@wordpress/media-utils": "^5.48.1",
93
+ "@wordpress/notices": "^5.48.1",
94
+ "@wordpress/patterns": "^2.48.1",
95
+ "@wordpress/plugins": "^7.48.1",
96
+ "@wordpress/preferences": "^4.48.1",
97
+ "@wordpress/private-apis": "^1.48.1",
98
+ "@wordpress/reusable-blocks": "^5.48.1",
99
+ "@wordpress/rich-text": "^7.48.1",
100
+ "@wordpress/server-side-render": "^6.24.1",
101
+ "@wordpress/ui": "^0.15.1",
102
+ "@wordpress/upload-media": "^0.33.1",
103
+ "@wordpress/url": "^4.48.1",
104
+ "@wordpress/views": "^1.15.1",
105
+ "@wordpress/warning": "^3.48.1",
106
+ "@wordpress/wordcount": "^4.48.1",
107
107
  "change-case": "^4.1.2",
108
108
  "client-zip": "^2.4.5",
109
109
  "clsx": "^2.1.1",
110
- "colord": "^2.7.0",
110
+ "colord": "^2.9.3",
111
111
  "date-fns": "^4.1.0",
112
- "diff": "^4.0.2",
112
+ "diff": "^8.0.3",
113
113
  "fast-deep-equal": "^3.1.3",
114
114
  "memize": "^2.1.0",
115
115
  "react-autosize-textarea": "^7.1.0",
@@ -117,7 +117,10 @@
117
117
  "uuid": "^14.0.0"
118
118
  },
119
119
  "devDependencies": {
120
- "deep-freeze": "0.0.1"
120
+ "@testing-library/dom": "^10.4.1",
121
+ "@testing-library/react": "^16.3.2",
122
+ "@testing-library/user-event": "^14.6.1",
123
+ "deep-freeze": "^0.0.1"
121
124
  },
122
125
  "peerDependencies": {
123
126
  "react": "^18.0.0",
@@ -126,5 +129,5 @@
126
129
  "publishConfig": {
127
130
  "access": "public"
128
131
  },
129
- "gitHead": "e7856693aeb4e2522d13608cd32c994e4a97cb9c"
132
+ "gitHead": "99df7432c5c7cb83ba41146fd1f57f3c19004305"
130
133
  }
@@ -1,7 +1,7 @@
1
1
  # Editor Components
2
2
 
3
3
  This folder holds reusable editor components exported by the `editor` module.
4
- These components combined as children of the `EditorProvider` component can be use to build alternative Editor Layouts.
4
+ These components, combined as children of the `EditorProvider` component, can be used to build alternative Editor Layouts.
5
5
 
6
6
  ## Which components should live in this folder?
7
7
 
@@ -95,13 +95,6 @@ export default function BlockRemovalWarnings() {
95
95
  [ currentPostType ]
96
96
  );
97
97
 
98
- // `BlockRemovalWarnings` is rendered in the editor provider, a shared component
99
- // across react native and web. However, `BlockRemovalWarningModal` is web only.
100
- // Check it exists before trying to render it.
101
- if ( ! BlockRemovalWarningModal ) {
102
- return null;
103
- }
104
-
105
98
  if ( ! removalRulesForPostType ) {
106
99
  return null;
107
100
  }
@@ -5,7 +5,11 @@ import { ToolbarButton } from '@wordpress/components';
5
5
  import { Stack } from '@wordpress/ui';
6
6
  import { __, sprintf } from '@wordpress/i18n';
7
7
  import { useMemo } from '@wordpress/element';
8
- import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
8
+ import {
9
+ privateApis as blockEditorPrivateApis,
10
+ store as blockEditorStore,
11
+ } from '@wordpress/block-editor';
12
+ import { useSelect } from '@wordpress/data';
9
13
 
10
14
  /**
11
15
  * Internal dependencies
@@ -15,52 +19,24 @@ import { getAvatarBorderColor } from './utils';
15
19
 
16
20
  const { NoteIconToolbarSlotFill } = unlock( blockEditorPrivateApis );
17
21
 
18
- export function NoteAvatarIndicator( { onClick, note } ) {
19
- const threadParticipants = useMemo( () => {
20
- if ( ! note ) {
21
- return [];
22
- }
23
-
24
- const participantsMap = new Map();
25
- const allNotes = [ note, ...note.reply ];
26
-
27
- // Sort by date to show participants in chronological order.
28
- allNotes.sort( ( a, b ) => new Date( a.date ) - new Date( b.date ) );
29
-
30
- allNotes.forEach( ( entry ) => {
31
- // Track thread participants (original author + repliers).
32
- if ( entry.author_name && entry.author_avatar_urls ) {
33
- if ( ! participantsMap.has( entry.author ) ) {
34
- participantsMap.set( entry.author, {
35
- name: entry.author_name,
36
- avatar:
37
- entry.author_avatar_urls?.[ '48' ] ||
38
- entry.author_avatar_urls?.[ '96' ],
39
- id: entry.author,
40
- date: entry.date,
41
- } );
42
- }
43
- }
44
- } );
45
-
46
- return Array.from( participantsMap.values() );
47
- }, [ note ] );
48
-
49
- if ( ! threadParticipants.length ) {
50
- return null;
51
- }
22
+ function ThreadParticipants( { participants } ) {
23
+ const defaultAvatar = useSelect( ( select ) => {
24
+ const { getSettings } = select( blockEditorStore );
25
+ const { __experimentalDiscussionSettings } = getSettings();
26
+ return __experimentalDiscussionSettings?.avatarURL;
27
+ }, [] );
52
28
 
53
29
  // If there are more than 3 participants, show 2 avatars and a "+n" number.
54
30
  const maxAvatars = 3;
55
- const isOverflow = threadParticipants.length > maxAvatars;
31
+ const isOverflow = participants.length > maxAvatars;
56
32
  const visibleParticipants = isOverflow
57
- ? threadParticipants.slice( 0, maxAvatars - 1 )
58
- : threadParticipants;
33
+ ? participants.slice( 0, maxAvatars - 1 )
34
+ : participants;
59
35
  const overflowCount = Math.max(
60
36
  0,
61
- threadParticipants.length - visibleParticipants.length
37
+ participants.length - visibleParticipants.length
62
38
  );
63
- const threadHasMoreParticipants = threadParticipants.length > 100;
39
+ const threadHasMoreParticipants = participants.length > 100;
64
40
 
65
41
  // If we hit the note limit, show "100+" instead of exact overflow count.
66
42
  const overflowText =
@@ -72,6 +48,62 @@ export function NoteAvatarIndicator( { onClick, note } ) {
72
48
  overflowCount
73
49
  );
74
50
 
51
+ return (
52
+ <Stack direction="row" align="center" gap="xs">
53
+ { visibleParticipants.map( ( participant ) => (
54
+ <img
55
+ key={ participant.id }
56
+ src={ participant.avatar || defaultAvatar }
57
+ alt={ participant.name }
58
+ className="editor-note-indicator__avatar"
59
+ style={ {
60
+ borderColor: getAvatarBorderColor( participant.id ),
61
+ } }
62
+ />
63
+ ) ) }
64
+ { overflowCount > 0 && (
65
+ <span className="editor-note-indicator__overflow">
66
+ { overflowText }
67
+ </span>
68
+ ) }
69
+ </Stack>
70
+ );
71
+ }
72
+
73
+ export function NoteAvatarIndicator( { onClick, note } ) {
74
+ const threadParticipants = useMemo( () => {
75
+ if ( ! note ) {
76
+ return [];
77
+ }
78
+
79
+ // Track thread participants (original author + repliers), sorted by
80
+ // date so they appear in chronological order.
81
+ const participantsMap = new Map();
82
+ const allNotes = [ note, ...note.reply ].sort(
83
+ ( a, b ) => new Date( a.date ) - new Date( b.date )
84
+ );
85
+
86
+ for ( const entry of allNotes ) {
87
+ if ( ! entry.author_name || participantsMap.has( entry.author ) ) {
88
+ continue;
89
+ }
90
+
91
+ participantsMap.set( entry.author, {
92
+ id: entry.author,
93
+ name: entry.author_name,
94
+ avatar:
95
+ entry.author_avatar_urls?.[ '48' ] ||
96
+ entry.author_avatar_urls?.[ '96' ],
97
+ } );
98
+ }
99
+
100
+ return Array.from( participantsMap.values() );
101
+ }, [ note ] );
102
+
103
+ if ( ! threadParticipants.length ) {
104
+ return null;
105
+ }
106
+
75
107
  return (
76
108
  <NoteIconToolbarSlotFill.Fill>
77
109
  <ToolbarButton
@@ -80,26 +112,7 @@ export function NoteAvatarIndicator( { onClick, note } ) {
80
112
  onClick={ () => onClick() }
81
113
  showTooltip
82
114
  >
83
- <Stack direction="row" align="center" gap="xs">
84
- { visibleParticipants.map( ( participant ) => (
85
- <img
86
- key={ participant.id }
87
- src={ participant.avatar }
88
- alt={ participant.name }
89
- className="editor-note-indicator__avatar"
90
- style={ {
91
- borderColor: getAvatarBorderColor(
92
- participant.id
93
- ),
94
- } }
95
- />
96
- ) ) }
97
- { overflowCount > 0 && (
98
- <span className="editor-note-indicator__overflow">
99
- { overflowText }
100
- </span>
101
- ) }
102
- </Stack>
115
+ <ThreadParticipants participants={ threadParticipants } />
103
116
  </ToolbarButton>
104
117
  </NoteIconToolbarSlotFill.Fill>
105
118
  );
@@ -1,14 +1,11 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- // @ts-expect-error No exported types
5
- import { store as blockEditorStore } from '@wordpress/block-editor';
6
4
  import {
7
5
  privateApis as coreDataPrivateApis,
8
6
  type CoreDataPrivateApis,
9
7
  type PostEditorAwarenessState as ActiveCollaborator,
10
8
  } from '@wordpress/core-data';
11
- import { useSelect } from '@wordpress/data';
12
9
  import { useEffect, useRef, useState } from '@wordpress/element';
13
10
 
14
11
  /**
@@ -74,11 +71,6 @@ export function useBlockHighlighting(
74
71
  const [ recomputeToken, rerenderHighlightsAfterDelay ] =
75
72
  useDebouncedRecompute( delayMs );
76
73
 
77
- const blockClientIds = useSelect(
78
- ( select ) => select( blockEditorStore ).getClientIdsWithDescendants(),
79
- []
80
- );
81
-
82
74
  // All DOM mutations and position computations live inside useEffect.
83
75
  useEffect( () => {
84
76
  if ( ! blockEditorDocument ) {
@@ -215,7 +207,6 @@ export function useBlockHighlighting(
215
207
  overlayElement,
216
208
  recomputeToken,
217
209
  resolveSelection,
218
- blockClientIds,
219
210
  ] );
220
211
 
221
212
  return { highlights, rerenderHighlightsAfterDelay };
@@ -1,5 +1,3 @@
1
- // @ts-expect-error No exported types
2
- import { store as blockEditorStore } from '@wordpress/block-editor';
3
1
  import { privateApis as coreDataPrivateApis } from '@wordpress/core-data';
4
2
  import type {
5
3
  CoreDataPrivateApis,
@@ -70,11 +68,6 @@ export function useRenderCursors(
70
68
  []
71
69
  );
72
70
 
73
- const blockClientIds = useSelect(
74
- ( select ) => select( blockEditorStore ).getClientIdsWithDescendants(),
75
- []
76
- );
77
-
78
71
  const [ cursorPositions, setCursorPositions ] = useState< CursorData[] >(
79
72
  []
80
73
  );
@@ -186,7 +179,6 @@ export function useRenderCursors(
186
179
  sortedUsers,
187
180
  showOwnCursor,
188
181
  recomputeToken,
189
- blockClientIds,
190
182
  ] );
191
183
 
192
184
  return { cursors: cursorPositions, rerenderCursorsAfterDelay };
@@ -16,13 +16,18 @@ import { Tooltip } from '@wordpress/ui';
16
16
  import Avatar from '..';
17
17
 
18
18
  /**
19
- * Wraps the avatar in a `Tooltip.Provider` with `delay={ 0 }` so hover-based
20
- * tooltip-presence assertions don't have to wait for the real-world delay.
19
+ * Wraps the avatar in a `Tooltip.Provider` with `delay={ 0 }` and
20
+ * `closeDelay={ 0 }` so hover-based tooltip-presence assertions don't have to
21
+ * wait for the real-world open/close delay.
21
22
  *
22
23
  * @param ui The avatar element (or anything else) to render.
23
24
  */
24
25
  function renderAvatar( ui: React.ReactElement ): ReturnType< typeof render > {
25
- return render( <Tooltip.Provider delay={ 0 }>{ ui }</Tooltip.Provider> );
26
+ return render(
27
+ <Tooltip.Provider delay={ 0 } closeDelay={ 0 }>
28
+ { ui }
29
+ </Tooltip.Provider>
30
+ );
26
31
  }
27
32
 
28
33
  /**
@@ -2,10 +2,9 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { createSlotFill } from '@wordpress/components';
5
- import { Platform } from '@wordpress/element';
6
5
 
7
6
  const { Fill: ViewMoreMenuGroup, Slot } = createSlotFill(
8
- Platform.OS === 'web' ? Symbol( 'ViewMoreMenuGroup' ) : 'ViewMoreMenuGroup'
7
+ Symbol( 'ViewMoreMenuGroup' )
9
8
  );
10
9
 
11
10
  ViewMoreMenuGroup.Slot = ( { fillProps } ) => <Slot fillProps={ fillProps } />;
@@ -95,6 +95,7 @@ export function PageAttributesParent() {
95
95
  if ( !! fieldValue ) {
96
96
  query.search = fieldValue;
97
97
  query.orderby = 'relevance';
98
+ query.search_columns = [ 'post_title' ];
98
99
  }
99
100
 
100
101
  const parentPost = pageId