@wordpress/editor 14.33.5 → 14.33.6

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 (86) hide show
  1. package/build/components/collab-sidebar/add-comment.js +9 -11
  2. package/build/components/collab-sidebar/add-comment.js.map +2 -2
  3. package/build/components/collab-sidebar/comments.js +36 -29
  4. package/build/components/collab-sidebar/comments.js.map +2 -2
  5. package/build/components/collab-sidebar/index.js +15 -15
  6. package/build/components/collab-sidebar/index.js.map +2 -2
  7. package/build/components/collab-sidebar/utils.js +2 -5
  8. package/build/components/collab-sidebar/utils.js.map +2 -2
  9. package/build/components/post-excerpt/panel.js +1 -6
  10. package/build/components/post-excerpt/panel.js.map +2 -2
  11. package/build/components/post-template/block-theme.js +4 -32
  12. package/build/components/post-template/block-theme.js.map +3 -3
  13. package/build/components/post-template/create-new-template-modal.js +1 -2
  14. package/build/components/post-template/create-new-template-modal.js.map +2 -2
  15. package/build/components/post-template/hooks.js +1 -3
  16. package/build/components/post-template/hooks.js.map +2 -2
  17. package/build/components/preferences-modal/index.js +1 -1
  18. package/build/components/preferences-modal/index.js.map +1 -1
  19. package/build/components/provider/index.js +2 -3
  20. package/build/components/provider/index.js.map +2 -2
  21. package/build/components/start-page-options/index.js +4 -5
  22. package/build/components/start-page-options/index.js.map +2 -2
  23. package/build/dataviews/store/private-actions.js +3 -9
  24. package/build/dataviews/store/private-actions.js.map +2 -2
  25. package/build/store/actions.js +2 -67
  26. package/build/store/actions.js.map +2 -2
  27. package/build-module/components/collab-sidebar/add-comment.js +9 -11
  28. package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
  29. package/build-module/components/collab-sidebar/comments.js +36 -29
  30. package/build-module/components/collab-sidebar/comments.js.map +2 -2
  31. package/build-module/components/collab-sidebar/index.js +15 -15
  32. package/build-module/components/collab-sidebar/index.js.map +2 -2
  33. package/build-module/components/collab-sidebar/utils.js +2 -5
  34. package/build-module/components/collab-sidebar/utils.js.map +2 -2
  35. package/build-module/components/post-excerpt/panel.js +1 -6
  36. package/build-module/components/post-excerpt/panel.js.map +2 -2
  37. package/build-module/components/post-template/block-theme.js +4 -32
  38. package/build-module/components/post-template/block-theme.js.map +2 -2
  39. package/build-module/components/post-template/create-new-template-modal.js +1 -2
  40. package/build-module/components/post-template/create-new-template-modal.js.map +2 -2
  41. package/build-module/components/post-template/hooks.js +1 -3
  42. package/build-module/components/post-template/hooks.js.map +2 -2
  43. package/build-module/components/preferences-modal/index.js +1 -1
  44. package/build-module/components/preferences-modal/index.js.map +1 -1
  45. package/build-module/components/provider/index.js +2 -3
  46. package/build-module/components/provider/index.js.map +2 -2
  47. package/build-module/components/start-page-options/index.js +5 -6
  48. package/build-module/components/start-page-options/index.js.map +2 -2
  49. package/build-module/dataviews/store/private-actions.js +3 -9
  50. package/build-module/dataviews/store/private-actions.js.map +2 -2
  51. package/build-module/store/actions.js +3 -68
  52. package/build-module/store/actions.js.map +2 -2
  53. package/build-style/style-rtl.css +14 -2
  54. package/build-style/style.css +14 -2
  55. package/build-types/components/collab-sidebar/add-comment.d.ts +3 -3
  56. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  57. package/build-types/components/collab-sidebar/comments.d.ts +3 -3
  58. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  59. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  60. package/build-types/components/collab-sidebar/utils.d.ts +2 -2
  61. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  62. package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
  63. package/build-types/components/post-template/block-theme.d.ts.map +1 -1
  64. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
  65. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  66. package/build-types/components/provider/index.d.ts.map +1 -1
  67. package/build-types/components/start-page-options/index.d.ts.map +1 -1
  68. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  69. package/build-types/store/actions.d.ts.map +1 -1
  70. package/package.json +14 -14
  71. package/src/components/collab-sidebar/add-comment.js +9 -11
  72. package/src/components/collab-sidebar/comments.js +45 -37
  73. package/src/components/collab-sidebar/index.js +17 -15
  74. package/src/components/collab-sidebar/style.scss +16 -0
  75. package/src/components/collab-sidebar/utils.js +3 -12
  76. package/src/components/post-excerpt/panel.js +1 -11
  77. package/src/components/post-template/block-theme.js +3 -45
  78. package/src/components/post-template/create-new-template-modal.js +0 -1
  79. package/src/components/post-template/hooks.js +1 -3
  80. package/src/components/preferences-modal/index.js +1 -1
  81. package/src/components/provider/index.js +2 -5
  82. package/src/components/start-page-options/index.js +5 -6
  83. package/src/components/start-page-options/style.scss +1 -1
  84. package/src/dataviews/store/private-actions.ts +7 -16
  85. package/src/store/actions.js +3 -100
  86. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"AAmOA,oFAyBC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/index.js"],"names":[],"mappings":"AAqOA,oFAyBC"}
@@ -31,10 +31,10 @@ export function getCommentExcerpt(text: string, excerptLength?: number): string;
31
31
  * @typedef {import('@wordpress/element').RefObject} RefObject
32
32
  *
33
33
  * @param {string} commentId The ID of the comment thread to focus.
34
- * @param {?HTMLElement} threadContainer The container element to search within.
34
+ * @param {?HTMLElement} container The container element to search within.
35
35
  * @param {string} additionalSelector The additional selector to focus on.
36
36
  */
37
- export function focusCommentThread(commentId: string, threadContainer: HTMLElement | null, additionalSelector: string): Promise<any> | undefined;
37
+ export function focusCommentThread(commentId: string, container: HTMLElement | null, additionalSelector: string): Promise<any> | undefined;
38
38
  /**
39
39
  * Shift focus to the comment thread associated with a particular comment ID.
40
40
  * If an additional selector is provided, the focus will be shifted to the element matching the selector.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/utils.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,2CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;GAEG;AACH,6BAAyB;AAiBzB;;;;;GAKG;AACH,6CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;;GAMG;AACH,wCAJW,MAAM,kBACN,MAAM,GACL,MAAM,CA0CjB;AAED;;;;;;;;;GASG;AACH,8CAJW,MAAM,mBACL,WAAW,OAAA,sBACZ,MAAM,4BAkDhB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/collab-sidebar/utils.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,2CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;GAEG;AACH,6BAAyB;AAiBzB;;;;;GAKG;AACH,6CAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;;;GAMG;AACH,wCAJW,MAAM,kBACN,MAAM,GACL,MAAM,CA0CjB;AAED;;;;;;;;;GASG;AACH,8CAJW,MAAM,aACL,WAAW,OAAA,sBACZ,MAAM,4BAyChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-excerpt/panel.js"],"names":[],"mappings":"AAmFA;;;;GAIG;AACH,4CAFY,KAAK,CAAC,SAAS,CAQ1B;AAED,uEAMC"}
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../src/components/post-excerpt/panel.js"],"names":[],"mappings":"AAkFA;;;;GAIG;AACH,4CAFY,KAAK,CAAC,SAAS,CAQ1B;AAED,uEAMC"}
@@ -1 +1 @@
1
- {"version":3,"file":"block-theme.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/block-theme.js"],"names":[],"mappings":"AA2BA;;uCAqLC"}
1
+ {"version":3,"file":"block-theme.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/block-theme.js"],"names":[],"mappings":"AA2BA;;uCA2IC"}
@@ -1 +1 @@
1
- {"version":3,"file":"create-new-template-modal.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/create-new-template-modal.js"],"names":[],"mappings":"AA4BA;;gCAqIC"}
1
+ {"version":3,"file":"create-new-template-modal.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/create-new-template-modal.js"],"names":[],"mappings":"AA4BA;;gCAoIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAYA;;;EAQC;AACD,sDA8BC;AAeD,yuEAeC;AAED,8CAuBC"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/components/post-template/hooks.js"],"names":[],"mappings":"AAYA;;;EAQC;AACD,sDA8BC;AAaD,yuEAeC;AAED,8CAuBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"AA4YA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,sCArBG;IAAgC,IAAI;IACJ,kBAAkB;IAElB,QAAQ;IAER,QAAQ,GAAhC,KAAK,CAAC,SAAS;CAGvB,GAWS,KAAK,CAAC,SAAS,CAW1B;AAlTD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4GA+OE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/provider/index.js"],"names":[],"mappings":"AAyYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,sCArBG;IAAgC,IAAI;IACJ,kBAAkB;IAElB,QAAQ;IAER,QAAQ,GAAhC,KAAK,CAAC,SAAS;CAGvB,GAWS,KAAK,CAAC,SAAS,CAW1B;AA/SD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,4GA4OE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/start-page-options/index.js"],"names":[],"mappings":"AAsBA,wCA0CC;AA8ED,+EA2CC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/start-page-options/index.js"],"names":[],"mappings":"AAsBA,wCA0CC;AA6ED,+EA2CC"}
@@ -1 +1 @@
1
- {"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/store/private-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAyC1D,wBAAgB,oBAAoB,CAAE,IAAI,EACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE;;;;;EAQtB;AAED,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM;;;;;EAQhB;AAED,wBAAgB,mBAAmB,CAAE,IAAI,EACxC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,KAAK,CAAE,IAAI,CAAE;;;;;EAQrB;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM;;;;;EAQf;AAED,wBAAgB,UAAU,CAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;;;;EAMrD;AAED,eAAO,MAAM,sBAAsB,aACtB,MAAM,oBACI;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,kBA0HtC,CAAC"}
1
+ {"version":3,"file":"private-actions.d.ts","sourceRoot":"","sources":["../../../src/dataviews/store/private-actions.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAyC1D,wBAAgB,oBAAoB,CAAE,IAAI,EACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAE,IAAI,CAAE;;;;;EAQtB;AAED,wBAAgB,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4BD;;;;;;GAMG;AACH,0CAJW,MAAM,GAEL,MAAM,CAOjB;AAiED;;;;;;GAMG;AACH,6CAJW,MAAM,GAEL,MAAM,CAOjB;AAsCD;;;;;GAKG;AACH,4CAHW,OAAO,GACN,MAAM,CAOjB;AAiLD;;;;;GAKG;AACH,sCAFY,MAAM,CAMjB;AAED;;;;;GAKG;AACH,uCAFY,MAAM,CAMjB;AAED;;;;GAIG;AACH,wCAFY,MAAM,CAMjB;AAniCM,kCAJI,MAAM,SACN,MAAM;;WAkCf;AAkGK,gCAXI,MAAM,YACN,MAAM,GAQL,MAAM,CAShB;AAOK,mCAFI,MAAM;;;;oBAuIf;AAwGK;;;;oBA0BL;AAWK,iDAFJ;IAA0B,KAAK;CACjC;;;oBAoBC;AAEK;;;mBAkBL;AAKK;;WAIL;AAKK;;WAIL;AAgCK;;WAML;AAKK;;WAML;AAsHK,2DAFI,MAAM;;;;WA8Bf;AAwBK,uCAFI,MAAM;;;;WAkBf;AAuBK,oDAJI,MAAM,GAEL,MAAM,CA0BhB;AAOK,mDAFI,MAAM;;WAyBf;AAgCK,2CAbI,OAAO,GAAC,MAAM,GAWb,MAAM,CAoBhB;AAuBK,yDAFJ;IAA0B,YAAY;CACxC;;;WAiEC;AAKK;;WA8BL;AAKK;;WA+BL;AAOK,uCAFI,MAAM;;;WAyBf;AA2CD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/store/actions.js"],"names":[],"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,MAAM;;;;WAef;AAuBK,oDAJI,MAAM,GAEL,MAAM,CA0BhB;AAOK,mDAFI,MAAM;;WAyBf;AAgCK,2CAbI,OAAO,GAAC,MAAM,GAWb,MAAM,CAoBhB;AAuBK,yDAFJ;IAA0B,YAAY;CACxC;;;WAiEC;AAKK;;WA8BL;AAKK;;WA+BL;AAOK,uCAFI,MAAM;;;WAyBf;AA2CD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC;AATD;;WASC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/editor",
3
- "version": "14.33.5",
3
+ "version": "14.33.6",
4
4
  "description": "Enhanced block editor for WordPress posts.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -57,35 +57,35 @@
57
57
  "@wordpress/api-fetch": "^7.33.1",
58
58
  "@wordpress/base-styles": "^6.9.1",
59
59
  "@wordpress/blob": "^4.33.1",
60
- "@wordpress/block-editor": "^15.6.3",
60
+ "@wordpress/block-editor": "^15.6.4",
61
61
  "@wordpress/blocks": "^15.6.1",
62
- "@wordpress/commands": "^1.33.1",
63
- "@wordpress/components": "^30.6.1",
62
+ "@wordpress/commands": "^1.33.2",
63
+ "@wordpress/components": "^30.6.2",
64
64
  "@wordpress/compose": "^7.33.1",
65
- "@wordpress/core-data": "^7.33.3",
65
+ "@wordpress/core-data": "^7.33.4",
66
66
  "@wordpress/data": "^10.33.1",
67
- "@wordpress/dataviews": "^10.1.2",
67
+ "@wordpress/dataviews": "^10.1.3",
68
68
  "@wordpress/date": "^5.33.1",
69
69
  "@wordpress/deprecated": "^4.33.1",
70
70
  "@wordpress/dom": "^4.33.1",
71
71
  "@wordpress/element": "^6.33.1",
72
- "@wordpress/fields": "^0.25.5",
72
+ "@wordpress/fields": "^0.25.6",
73
73
  "@wordpress/hooks": "^4.33.1",
74
74
  "@wordpress/html-entities": "^4.33.1",
75
75
  "@wordpress/i18n": "^6.6.1",
76
76
  "@wordpress/icons": "^11.0.1",
77
- "@wordpress/interface": "^9.18.1",
77
+ "@wordpress/interface": "^9.18.2",
78
78
  "@wordpress/keyboard-shortcuts": "^5.33.1",
79
79
  "@wordpress/keycodes": "^4.33.1",
80
80
  "@wordpress/media-utils": "^5.33.1",
81
81
  "@wordpress/notices": "^5.33.1",
82
- "@wordpress/patterns": "^2.33.3",
83
- "@wordpress/plugins": "^7.33.1",
84
- "@wordpress/preferences": "^4.33.1",
82
+ "@wordpress/patterns": "^2.33.4",
83
+ "@wordpress/plugins": "^7.33.2",
84
+ "@wordpress/preferences": "^4.33.2",
85
85
  "@wordpress/private-apis": "^1.33.1",
86
- "@wordpress/reusable-blocks": "^5.33.3",
86
+ "@wordpress/reusable-blocks": "^5.33.4",
87
87
  "@wordpress/rich-text": "^7.33.1",
88
- "@wordpress/server-side-render": "^6.9.1",
88
+ "@wordpress/server-side-render": "^6.9.2",
89
89
  "@wordpress/url": "^4.33.1",
90
90
  "@wordpress/warning": "^3.33.1",
91
91
  "@wordpress/wordcount": "^4.33.1",
@@ -108,5 +108,5 @@
108
108
  "publishConfig": {
109
109
  "access": "public"
110
110
  },
111
- "gitHead": "b54bd3285e50e409580bdfa2c47bc81f0000a0c9"
111
+ "gitHead": "2e2a11a11f0c5c9cb2bba2dd40b8046d2a10dc9d"
112
112
  }
@@ -28,32 +28,30 @@ const { useBlockElement } = unlock( blockEditorPrivateApis );
28
28
 
29
29
  export function AddComment( {
30
30
  onSubmit,
31
- showCommentBoard,
32
- setShowCommentBoard,
31
+ newNoteFormState,
32
+ setNewNoteFormState,
33
33
  commentSidebarRef,
34
34
  reflowComments = noop,
35
35
  isFloating = false,
36
36
  y,
37
37
  refs,
38
38
  } ) {
39
- const { clientId, blockCommentId } = useSelect( ( select ) => {
40
- const { getSelectedBlock } = select( blockEditorStore );
41
- const selectedBlock = getSelectedBlock();
39
+ const { clientId } = useSelect( ( select ) => {
40
+ const { getSelectedBlockClientId } = select( blockEditorStore );
42
41
  return {
43
- clientId: selectedBlock?.clientId,
44
- blockCommentId: selectedBlock?.attributes?.metadata?.noteId,
42
+ clientId: getSelectedBlockClientId(),
45
43
  };
46
44
  }, [] );
47
45
  const blockElement = useBlockElement( clientId );
48
46
  const { toggleBlockSpotlight } = unlock( useDispatch( blockEditorStore ) );
49
47
 
50
48
  const unselectThread = () => {
51
- setShowCommentBoard( false );
49
+ setNewNoteFormState( 'closed' );
52
50
  blockElement?.focus();
53
51
  toggleBlockSpotlight( clientId, false );
54
52
  };
55
53
 
56
- if ( ! showCommentBoard || ! clientId || undefined !== blockCommentId ) {
54
+ if ( newNoteFormState !== 'open' || ! clientId ) {
57
55
  return null;
58
56
  }
59
57
 
@@ -81,7 +79,7 @@ export function AddComment( {
81
79
  return;
82
80
  }
83
81
  toggleBlockSpotlight( clientId, false );
84
- setShowCommentBoard( false );
82
+ setNewNoteFormState( 'closed' );
85
83
  } }
86
84
  >
87
85
  <HStack alignment="left" spacing="3">
@@ -91,7 +89,7 @@ export function AddComment( {
91
89
  onSubmit={ async ( inputComment ) => {
92
90
  const { id } = await onSubmit( { content: inputComment } );
93
91
  focusCommentThread( id, commentSidebarRef.current );
94
- setShowCommentBoard( false );
92
+ setNewNoteFormState( 'creating' );
95
93
  } }
96
94
  onCancel={ unselectThread }
97
95
  reflowComments={ reflowComments }
@@ -53,8 +53,8 @@ export function Comments( {
53
53
  onEditComment,
54
54
  onAddReply,
55
55
  onCommentDelete,
56
- showCommentBoard,
57
- setShowCommentBoard,
56
+ newNoteFormState,
57
+ setNewNoteFormState,
58
58
  commentSidebarRef,
59
59
  reflowComments,
60
60
  isFloating = false,
@@ -68,15 +68,18 @@ export function Comments( {
68
68
  const { setCanvasMinHeight } = unlock( useDispatch( editorStore ) );
69
69
  const { blockCommentId, selectedBlockClientId, orderedBlockIds } =
70
70
  useSelect( ( select ) => {
71
- const { getBlockAttributes, getSelectedBlockClientId } =
72
- select( blockEditorStore );
71
+ const {
72
+ getBlockAttributes,
73
+ getSelectedBlockClientId,
74
+ getClientIdsWithDescendants,
75
+ } = select( blockEditorStore );
73
76
  const clientId = getSelectedBlockClientId();
74
77
  return {
75
78
  blockCommentId: clientId
76
79
  ? getBlockAttributes( clientId )?.metadata?.noteId
77
80
  : null,
78
81
  selectedBlockClientId: clientId,
79
- orderedBlockIds: select( blockEditorStore ).getBlockOrder(),
82
+ orderedBlockIds: getClientIdsWithDescendants(),
80
83
  };
81
84
  }, [] );
82
85
 
@@ -90,7 +93,7 @@ export function Comments( {
90
93
  // add a "new note" entry to the threads. This special thread type
91
94
  // gets sorted and floated like regular threads, but shows an AddComment
92
95
  // component instead of a regular comment thread.
93
- if ( isFloating && showCommentBoard && undefined === blockCommentId ) {
96
+ if ( isFloating && newNoteFormState === 'open' ) {
94
97
  // Insert the new note entry at the correct location for its blockId.
95
98
  const newNoteThread = {
96
99
  id: 'new-note-thread',
@@ -116,8 +119,7 @@ export function Comments( {
116
119
  }, [
117
120
  noteThreads,
118
121
  isFloating,
119
- showCommentBoard,
120
- blockCommentId,
122
+ newNoteFormState,
121
123
  selectedBlockClientId,
122
124
  orderedBlockIds,
123
125
  ] );
@@ -144,7 +146,7 @@ export function Comments( {
144
146
  focusCommentThread( prevThread.id, commentSidebarRef.current );
145
147
  } else {
146
148
  setSelectedThread( null );
147
- setShowCommentBoard( false );
149
+ setNewNoteFormState( 'closed' );
148
150
  // Move focus to the related block.
149
151
  relatedBlockElement?.focus();
150
152
  }
@@ -153,9 +155,10 @@ export function Comments( {
153
155
  // Auto-select the related comment thread when a block is selected.
154
156
  useEffect( () => {
155
157
  // Fallback to 'new-note-thread' when showing the comment board for a new note.
156
- const fallback = showCommentBoard ? 'new-note-thread' : null;
157
- setSelectedThread( blockCommentId ?? fallback );
158
- }, [ blockCommentId, showCommentBoard ] );
158
+ setSelectedThread(
159
+ newNoteFormState === 'open' ? 'new-note-thread' : blockCommentId
160
+ );
161
+ }, [ blockCommentId, newNoteFormState ] );
159
162
 
160
163
  const setBlockRef = useCallback( ( id, blockRef ) => {
161
164
  setBlockRefs( ( prev ) => ( { ...prev, [ id ]: blockRef } ) );
@@ -315,16 +318,14 @@ export function Comments( {
315
318
 
316
319
  return (
317
320
  <>
318
- { ! isFloating &&
319
- showCommentBoard &&
320
- undefined === blockCommentId && (
321
- <AddComment
322
- onSubmit={ onAddReply }
323
- showCommentBoard={ showCommentBoard }
324
- setShowCommentBoard={ setShowCommentBoard }
325
- commentSidebarRef={ commentSidebarRef }
326
- />
327
- ) }
321
+ { ! isFloating && newNoteFormState === 'open' && (
322
+ <AddComment
323
+ onSubmit={ onAddReply }
324
+ newNoteFormState={ newNoteFormState }
325
+ setNewNoteFormState={ setNewNoteFormState }
326
+ commentSidebarRef={ commentSidebarRef }
327
+ />
328
+ ) }
328
329
  { threads.map( ( thread ) => (
329
330
  <Thread
330
331
  key={ thread.id }
@@ -334,7 +335,7 @@ export function Comments( {
334
335
  onEditComment={ onEditComment }
335
336
  isSelected={ selectedThread === thread.id }
336
337
  setSelectedThread={ setSelectedThread }
337
- setShowCommentBoard={ setShowCommentBoard }
338
+ setNewNoteFormState={ setNewNoteFormState }
338
339
  commentSidebarRef={ commentSidebarRef }
339
340
  reflowComments={ reflowComments }
340
341
  isFloating={ isFloating }
@@ -343,7 +344,7 @@ export function Comments( {
343
344
  setBlockRef={ setBlockRef }
344
345
  selectedThread={ selectedThread }
345
346
  commentLastUpdated={ commentLastUpdated }
346
- showCommentBoard={ showCommentBoard }
347
+ newNoteFormState={ newNoteFormState }
347
348
  />
348
349
  ) ) }
349
350
  </>
@@ -356,7 +357,7 @@ function Thread( {
356
357
  onAddReply,
357
358
  onCommentDelete,
358
359
  isSelected,
359
- setShowCommentBoard,
360
+ setNewNoteFormState,
360
361
  commentSidebarRef,
361
362
  reflowComments,
362
363
  isFloating,
@@ -366,7 +367,7 @@ function Thread( {
366
367
  setSelectedThread,
367
368
  selectedThread,
368
369
  commentLastUpdated,
369
- showCommentBoard,
370
+ newNoteFormState,
370
371
  } ) {
371
372
  const { toggleBlockHighlight, selectBlock, toggleBlockSpotlight } = unlock(
372
373
  useDispatch( blockEditorStore )
@@ -394,7 +395,7 @@ function Thread( {
394
395
  };
395
396
 
396
397
  const handleCommentSelect = () => {
397
- setShowCommentBoard( false );
398
+ setNewNoteFormState( 'closed' );
398
399
  setSelectedThread( thread.id );
399
400
  if ( !! thread.blockClientId ) {
400
401
  // Pass `null` as the second parameter to prevent focusing the block.
@@ -405,7 +406,7 @@ function Thread( {
405
406
 
406
407
  const unselectThread = () => {
407
408
  setSelectedThread( null );
408
- setShowCommentBoard( false );
409
+ setNewNoteFormState( 'closed' );
409
410
  toggleBlockSpotlight( thread.blockClientId, false );
410
411
  };
411
412
 
@@ -431,12 +432,16 @@ function Thread( {
431
432
  commentExcerpt
432
433
  );
433
434
 
434
- if ( 'new-note-thread' === thread.id && showCommentBoard && isFloating ) {
435
+ if (
436
+ thread.id === 'new-note-thread' &&
437
+ newNoteFormState === 'open' &&
438
+ isFloating
439
+ ) {
435
440
  return (
436
441
  <AddComment
437
442
  onSubmit={ onAddReply }
438
- showCommentBoard={ showCommentBoard }
439
- setShowCommentBoard={ setShowCommentBoard }
443
+ newNoteFormState={ newNoteFormState }
444
+ setNewNoteFormState={ setNewNoteFormState }
440
445
  commentSidebarRef={ commentSidebarRef }
441
446
  reflowComments={ reflowComments }
442
447
  isFloating={ isFloating }
@@ -510,14 +515,17 @@ function Thread( {
510
515
  thread={ thread }
511
516
  isExpanded={ isSelected }
512
517
  onEdit={ ( params = {} ) => {
513
- const { status } = params;
514
518
  onEditComment( params );
515
- if ( status === 'approved' ) {
519
+ if ( params.status === 'approved' ) {
516
520
  unselectThread();
517
- focusCommentThread(
518
- thread.id,
519
- commentSidebarRef.current
520
- );
521
+ if ( isFloating ) {
522
+ relatedBlockElement?.focus();
523
+ } else {
524
+ focusCommentThread(
525
+ thread.id,
526
+ commentSidebarRef.current
527
+ );
528
+ }
521
529
  }
522
530
  } }
523
531
  onDelete={ onCommentDelete }
@@ -34,8 +34,8 @@ import PostTypeSupportCheck from '../post-type-support-check';
34
34
  import { unlock } from '../../lock-unlock';
35
35
 
36
36
  function NotesSidebarContent( {
37
- showCommentBoard,
38
- setShowCommentBoard,
37
+ newNoteFormState,
38
+ setNewNoteFormState,
39
39
  styles,
40
40
  comments,
41
41
  commentSidebarRef,
@@ -69,8 +69,8 @@ function NotesSidebarContent( {
69
69
  onEditComment={ onEdit }
70
70
  onAddReply={ onCreate }
71
71
  onCommentDelete={ onDelete }
72
- showCommentBoard={ showCommentBoard }
73
- setShowCommentBoard={ setShowCommentBoard }
72
+ newNoteFormState={ newNoteFormState }
73
+ setNewNoteFormState={ setNewNoteFormState }
74
74
  commentSidebarRef={ commentSidebarRef }
75
75
  reflowComments={ reflowComments }
76
76
  commentLastUpdated={ commentLastUpdated }
@@ -81,7 +81,8 @@ function NotesSidebarContent( {
81
81
  }
82
82
 
83
83
  function NotesSidebar( { postId, mode } ) {
84
- const [ showCommentBoard, setShowCommentBoard ] = useState( false );
84
+ // Enum: 'closed' | 'creating' | 'open'
85
+ const [ newNoteFormState, setNewNoteFormState ] = useState( 'closed' );
85
86
  const { getActiveComplementaryArea } = useSelect( interfaceStore );
86
87
  const { enableComplementaryArea } = useDispatch( interfaceStore );
87
88
  const { toggleBlockSpotlight } = unlock( useDispatch( blockEditorStore ) );
@@ -117,7 +118,8 @@ function NotesSidebar( { postId, mode } ) {
117
118
  } = useBlockComments( postId );
118
119
  useEnableFloatingSidebar(
119
120
  showFloatingSidebar &&
120
- ( unresolvedSortedThreads.length > 0 || showCommentBoard )
121
+ ( unresolvedSortedThreads.length > 0 ||
122
+ newNoteFormState !== 'closed' )
121
123
  );
122
124
 
123
125
  // Get the global styles to set the background color of the sidebar.
@@ -137,7 +139,7 @@ function NotesSidebar( { postId, mode } ) {
137
139
 
138
140
  if ( currentThread?.status === 'approved' ) {
139
141
  enableComplementaryArea( 'core', collabHistorySidebarName );
140
- } else if ( ! activeNotesArea ) {
142
+ } else if ( ! activeNotesArea || ! showAllNotesSidebar ) {
141
143
  enableComplementaryArea(
142
144
  'core',
143
145
  showFloatingSidebar
@@ -152,12 +154,12 @@ function NotesSidebar( { postId, mode } ) {
152
154
  return;
153
155
  }
154
156
 
155
- setShowCommentBoard( ! blockCommentId );
157
+ setNewNoteFormState( ! currentThread ? 'open' : 'closed' );
156
158
  focusCommentThread(
157
- blockCommentId,
159
+ currentThread?.id,
158
160
  commentSidebarRef.current,
159
161
  // Focus a comment thread when there's a selected block with a comment.
160
- ! blockCommentId ? 'textarea' : undefined
162
+ ! currentThread ? 'textarea' : undefined
161
163
  );
162
164
  toggleBlockSpotlight( clientId, true );
163
165
  }
@@ -168,7 +170,7 @@ function NotesSidebar( { postId, mode } ) {
168
170
 
169
171
  return (
170
172
  <>
171
- { blockCommentId && (
173
+ { !! currentThread && (
172
174
  <CommentAvatarIndicator
173
175
  thread={ currentThread }
174
176
  onClick={ openTheSidebar }
@@ -190,8 +192,8 @@ function NotesSidebar( { postId, mode } ) {
190
192
  >
191
193
  <NotesSidebarContent
192
194
  comments={ resultComments }
193
- showCommentBoard={ showCommentBoard }
194
- setShowCommentBoard={ setShowCommentBoard }
195
+ newNoteFormState={ newNoteFormState }
196
+ setNewNoteFormState={ setNewNoteFormState }
195
197
  commentSidebarRef={ commentSidebarRef }
196
198
  reflowComments={ reflowComments }
197
199
  commentLastUpdated={ commentLastUpdated }
@@ -209,8 +211,8 @@ function NotesSidebar( { postId, mode } ) {
209
211
  >
210
212
  <NotesSidebarContent
211
213
  comments={ unresolvedSortedThreads }
212
- showCommentBoard={ showCommentBoard }
213
- setShowCommentBoard={ setShowCommentBoard }
214
+ newNoteFormState={ newNoteFormState }
215
+ setNewNoteFormState={ setNewNoteFormState }
214
216
  commentSidebarRef={ commentSidebarRef }
215
217
  reflowComments={ reflowComments }
216
218
  commentLastUpdated={ commentLastUpdated }
@@ -163,8 +163,24 @@
163
163
  border-style: solid;
164
164
  padding: var(--wp-admin-border-width-focus);
165
165
  background: $white;
166
+ box-sizing: border-box;
166
167
 
167
168
  &:first-child {
168
169
  margin-left: 0;
169
170
  }
170
171
  }
172
+
173
+ .show-icon-labels {
174
+ .comment-avatar-indicator {
175
+ width: auto;
176
+ // Hide the user avatars container when labels are set to display...
177
+ div {
178
+ display: none;
179
+ }
180
+ // ... and display labels.
181
+ &::after {
182
+ content: attr(aria-label);
183
+ font-size: $helptext-font-size;
184
+ }
185
+ }
186
+ }
@@ -99,15 +99,11 @@ export function getCommentExcerpt( text, excerptLength = 10 ) {
99
99
  * @typedef {import('@wordpress/element').RefObject} RefObject
100
100
  *
101
101
  * @param {string} commentId The ID of the comment thread to focus.
102
- * @param {?HTMLElement} threadContainer The container element to search within.
102
+ * @param {?HTMLElement} container The container element to search within.
103
103
  * @param {string} additionalSelector The additional selector to focus on.
104
104
  */
105
- export function focusCommentThread(
106
- commentId,
107
- threadContainer,
108
- additionalSelector
109
- ) {
110
- if ( ! threadContainer ) {
105
+ export function focusCommentThread( commentId, container, additionalSelector ) {
106
+ if ( ! container ) {
111
107
  return;
112
108
  }
113
109
 
@@ -120,11 +116,6 @@ export function focusCommentThread(
120
116
  : threadSelector;
121
117
 
122
118
  return new Promise( ( resolve ) => {
123
- // Watch the sidebar skeleton in case the sidebar disappears and re-appears.
124
- const container = threadContainer.closest(
125
- '.interface-interface-skeleton__sidebar'
126
- );
127
-
128
119
  if ( container.querySelector( selector ) ) {
129
120
  return resolve( container.querySelector( selector ) );
130
121
  }
@@ -23,7 +23,6 @@ import PostExcerptCheck from './check';
23
23
  import PluginPostExcerpt from './plugin';
24
24
  import { TEMPLATE_ORIGINS } from '../../store/constants';
25
25
  import { store as editorStore } from '../../store';
26
- import { getTemplateInfo } from '../../utils/get-template-info';
27
26
 
28
27
  /**
29
28
  * Module Constants
@@ -133,22 +132,13 @@ function PrivateExcerpt() {
133
132
  postType,
134
133
  getCurrentPostId()
135
134
  );
136
- const fallback =
137
- ! _excerpt && isTemplateOrTemplatePart
138
- ? getTemplateInfo( {
139
- template,
140
- templateTypes:
141
- select( coreStore ).getCurrentTheme()
142
- ?.default_template_types,
143
- } )?.description
144
- : undefined;
145
135
  // For post types that use excerpt as description, we do not abide
146
136
  // by the `isEnabled` panel flag in order to render them as text.
147
137
  const _shouldRender =
148
138
  isEditorPanelEnabled( PANEL_NAME ) ||
149
139
  _shouldBeUsedAsDescription;
150
140
  return {
151
- excerpt: _excerpt ?? fallback,
141
+ excerpt: _excerpt,
152
142
  shouldRender: _shouldRender,
153
143
  shouldBeUsedAsDescription: _shouldBeUsedAsDescription,
154
144
  // If we should render, allow editing for all post types that are not used as description.
@@ -31,15 +31,10 @@ export default function BlockThemeControl( { id } ) {
31
31
  onNavigateToEntityRecord,
32
32
  getEditorSettings,
33
33
  hasGoBack,
34
- hasSpecificTemplate,
35
34
  } = useSelect( ( select ) => {
36
- const {
37
- getRenderingMode,
38
- getEditorSettings: _getEditorSettings,
39
- getCurrentPost,
40
- } = unlock( select( editorStore ) );
35
+ const { getRenderingMode, getEditorSettings: _getEditorSettings } =
36
+ unlock( select( editorStore ) );
41
37
  const editorSettings = _getEditorSettings();
42
- const currentPost = getCurrentPost();
43
38
  return {
44
39
  isTemplateHidden: getRenderingMode() === 'post-only',
45
40
  onNavigateToEntityRecord: editorSettings.onNavigateToEntityRecord,
@@ -47,7 +42,6 @@ export default function BlockThemeControl( { id } ) {
47
42
  hasGoBack: editorSettings.hasOwnProperty(
48
43
  'onNavigateToPreviousEntityRecord'
49
44
  ),
50
- hasSpecificTemplate: !! currentPost.template,
51
45
  };
52
46
  }, [] );
53
47
 
@@ -58,8 +52,6 @@ export default function BlockThemeControl( { id } ) {
58
52
  'wp_template',
59
53
  id
60
54
  );
61
- const { getEntityRecord } = useSelect( coreStore );
62
- const { editEntityRecord } = useDispatch( coreStore );
63
55
  const { createSuccessNotice } = useDispatch( noticesStore );
64
56
  const { setRenderingMode, setDefaultRenderingMode } = unlock(
65
57
  useDispatch( editorStore )
@@ -134,45 +126,11 @@ export default function BlockThemeControl( { id } ) {
134
126
  <MenuGroup>
135
127
  { canCreateTemplate && (
136
128
  <MenuItem
137
- onClick={ async () => {
129
+ onClick={ () => {
138
130
  onNavigateToEntityRecord( {
139
131
  postId: template.id,
140
132
  postType: 'wp_template',
141
133
  } );
142
- // When editing a global template,
143
- // activate the auto-draft. This is not
144
- // immediately live (we're not saving
145
- // site options), and when nothing is
146
- // saved, the setting will be ignored.
147
- // In the future, we should make the
148
- // duplication explicit, so there
149
- // wouldn't be an "edit" button for
150
- // static theme templates.
151
- if ( ! hasSpecificTemplate ) {
152
- const activeTemplates =
153
- await getEntityRecord(
154
- 'root',
155
- 'site'
156
- ).active_templates;
157
- if (
158
- activeTemplates[
159
- template.slug
160
- ] !== template.id
161
- ) {
162
- editEntityRecord(
163
- 'root',
164
- 'site',
165
- undefined,
166
- {
167
- active_templates: {
168
- ...activeTemplates,
169
- [ template.slug ]:
170
- template.id,
171
- },
172
- }
173
- );
174
- }
175
- }
176
134
  onClose();
177
135
  mayShowTemplateEditNotice();
178
136
  } }