@wordpress/block-library 7.3.11 → 7.3.14

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 (91) hide show
  1. package/build/avatar/hooks.js +2 -2
  2. package/build/avatar/hooks.js.map +1 -1
  3. package/build/comment-author-name/edit.js +3 -3
  4. package/build/comment-author-name/edit.js.map +1 -1
  5. package/build/comment-author-name/index.js +0 -4
  6. package/build/comment-author-name/index.js.map +1 -1
  7. package/build/comment-date/edit.js +4 -4
  8. package/build/comment-date/edit.js.map +1 -1
  9. package/build/comment-date/index.js +0 -4
  10. package/build/comment-date/index.js.map +1 -1
  11. package/build/comment-edit-link/index.js +0 -4
  12. package/build/comment-edit-link/index.js.map +1 -1
  13. package/build/comment-reply-link/index.js +0 -4
  14. package/build/comment-reply-link/index.js.map +1 -1
  15. package/build/comments-query-loop/edit.js +10 -2
  16. package/build/comments-query-loop/edit.js.map +1 -1
  17. package/build/latest-posts/edit.js +30 -4
  18. package/build/latest-posts/edit.js.map +1 -1
  19. package/build/media-text/edit.js +0 -1
  20. package/build/media-text/edit.js.map +1 -1
  21. package/build/post-comments/edit.js +12 -33
  22. package/build/post-comments/edit.js.map +1 -1
  23. package/build/post-comments-form/edit.js +46 -25
  24. package/build/post-comments-form/edit.js.map +1 -1
  25. package/build/post-comments-form/form.js +48 -0
  26. package/build/post-comments-form/form.js.map +1 -0
  27. package/build/query/edit/inspector-controls/index.js +4 -16
  28. package/build/query/edit/inspector-controls/index.js.map +1 -1
  29. package/build/query/edit/inspector-controls/sticky-control.js +41 -0
  30. package/build/query/edit/inspector-controls/sticky-control.js.map +1 -0
  31. package/build-module/avatar/hooks.js +2 -2
  32. package/build-module/avatar/hooks.js.map +1 -1
  33. package/build-module/comment-author-name/edit.js +3 -3
  34. package/build-module/comment-author-name/edit.js.map +1 -1
  35. package/build-module/comment-author-name/index.js +0 -4
  36. package/build-module/comment-author-name/index.js.map +1 -1
  37. package/build-module/comment-date/edit.js +4 -4
  38. package/build-module/comment-date/edit.js.map +1 -1
  39. package/build-module/comment-date/index.js +0 -4
  40. package/build-module/comment-date/index.js.map +1 -1
  41. package/build-module/comment-edit-link/index.js +0 -4
  42. package/build-module/comment-edit-link/index.js.map +1 -1
  43. package/build-module/comment-reply-link/index.js +0 -4
  44. package/build-module/comment-reply-link/index.js.map +1 -1
  45. package/build-module/comments-query-loop/edit.js +10 -2
  46. package/build-module/comments-query-loop/edit.js.map +1 -1
  47. package/build-module/latest-posts/edit.js +29 -5
  48. package/build-module/latest-posts/edit.js.map +1 -1
  49. package/build-module/media-text/edit.js +0 -1
  50. package/build-module/media-text/edit.js.map +1 -1
  51. package/build-module/post-comments/edit.js +12 -34
  52. package/build-module/post-comments/edit.js.map +1 -1
  53. package/build-module/post-comments-form/edit.js +47 -28
  54. package/build-module/post-comments-form/edit.js.map +1 -1
  55. package/build-module/post-comments-form/form.js +39 -0
  56. package/build-module/post-comments-form/form.js.map +1 -0
  57. package/build-module/query/edit/inspector-controls/index.js +3 -15
  58. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  59. package/build-module/query/edit/inspector-controls/sticky-control.js +31 -0
  60. package/build-module/query/edit/inspector-controls/sticky-control.js.map +1 -0
  61. package/build-style/editor-rtl.css +3 -0
  62. package/build-style/editor.css +3 -0
  63. package/build-style/navigation/style-rtl.css +3 -0
  64. package/build-style/navigation/style.css +3 -0
  65. package/build-style/post-comments-form/editor-rtl.css +3 -0
  66. package/build-style/post-comments-form/editor.css +3 -0
  67. package/build-style/style-rtl.css +3 -0
  68. package/build-style/style.css +3 -0
  69. package/package.json +7 -7
  70. package/src/avatar/hooks.js +9 -6
  71. package/src/comment-author-name/block.json +0 -4
  72. package/src/comment-author-name/edit.js +3 -12
  73. package/src/comment-date/block.json +0 -4
  74. package/src/comment-date/edit.js +10 -14
  75. package/src/comment-date/index.php +0 -3
  76. package/src/comment-edit-link/block.json +0 -4
  77. package/src/comment-reply-link/block.json +0 -4
  78. package/src/comments-query-loop/edit.js +24 -4
  79. package/src/cover/index.php +9 -6
  80. package/src/gallery/index.php +2 -1
  81. package/src/latest-posts/edit.js +27 -2
  82. package/src/media-text/edit.js +0 -1
  83. package/src/navigation/style.scss +3 -0
  84. package/src/post-comments/edit.js +13 -42
  85. package/src/post-comments-form/edit.js +65 -59
  86. package/src/post-comments-form/editor.scss +4 -0
  87. package/src/post-comments-form/form.js +43 -0
  88. package/src/post-template/index.php +25 -16
  89. package/src/query/edit/inspector-controls/index.js +3 -13
  90. package/src/query/edit/inspector-controls/sticky-control.js +25 -0
  91. package/src/query-no-results/index.php +10 -8
@@ -2712,6 +2712,9 @@ div[data-type="core/post-featured-image"] img {
2712
2712
  .wp-block-post-comments-form * {
2713
2713
  pointer-events: none;
2714
2714
  }
2715
+ .wp-block-post-comments-form *.block-editor-warning * {
2716
+ pointer-events: auto;
2717
+ }
2715
2718
 
2716
2719
  :root .editor-styles-wrapper {
2717
2720
  /*
@@ -271,6 +271,9 @@ button.wp-block-navigation-item__content {
271
271
  font-size: inherit;
272
272
  font-family: inherit;
273
273
  line-height: inherit;
274
+ font-style: inherit;
275
+ font-weight: inherit;
276
+ text-transform: inherit;
274
277
  text-align: right;
275
278
  }
276
279
 
@@ -271,6 +271,9 @@ button.wp-block-navigation-item__content {
271
271
  font-size: inherit;
272
272
  font-family: inherit;
273
273
  line-height: inherit;
274
+ font-style: inherit;
275
+ font-weight: inherit;
276
+ text-transform: inherit;
274
277
  text-align: left;
275
278
  }
276
279
 
@@ -76,4 +76,7 @@
76
76
  */
77
77
  .wp-block-post-comments-form * {
78
78
  pointer-events: none;
79
+ }
80
+ .wp-block-post-comments-form *.block-editor-warning * {
81
+ pointer-events: auto;
79
82
  }
@@ -76,4 +76,7 @@
76
76
  */
77
77
  .wp-block-post-comments-form * {
78
78
  pointer-events: none;
79
+ }
80
+ .wp-block-post-comments-form *.block-editor-warning * {
81
+ pointer-events: auto;
79
82
  }
@@ -1753,6 +1753,9 @@ button.wp-block-navigation-item__content {
1753
1753
  font-size: inherit;
1754
1754
  font-family: inherit;
1755
1755
  line-height: inherit;
1756
+ font-style: inherit;
1757
+ font-weight: inherit;
1758
+ text-transform: inherit;
1756
1759
  text-align: right;
1757
1760
  }
1758
1761
 
@@ -1779,6 +1779,9 @@ button.wp-block-navigation-item__content {
1779
1779
  font-size: inherit;
1780
1780
  font-family: inherit;
1781
1781
  line-height: inherit;
1782
+ font-style: inherit;
1783
+ font-weight: inherit;
1784
+ text-transform: inherit;
1782
1785
  text-align: left;
1783
1786
  }
1784
1787
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-library",
3
- "version": "7.3.11",
3
+ "version": "7.3.14",
4
4
  "description": "Block library for the WordPress editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -37,9 +37,9 @@
37
37
  "@wordpress/api-fetch": "^6.3.1",
38
38
  "@wordpress/autop": "^3.6.1",
39
39
  "@wordpress/blob": "^3.6.1",
40
- "@wordpress/block-editor": "^8.5.8",
40
+ "@wordpress/block-editor": "^8.5.10",
41
41
  "@wordpress/blocks": "^11.5.3",
42
- "@wordpress/components": "^19.8.4",
42
+ "@wordpress/components": "^19.8.5",
43
43
  "@wordpress/compose": "^5.4.1",
44
44
  "@wordpress/core-data": "^4.4.5",
45
45
  "@wordpress/data": "^6.6.1",
@@ -50,13 +50,13 @@
50
50
  "@wordpress/hooks": "^3.6.1",
51
51
  "@wordpress/html-entities": "^3.6.1",
52
52
  "@wordpress/i18n": "^4.6.1",
53
- "@wordpress/icons": "^8.2.2",
53
+ "@wordpress/icons": "^8.2.3",
54
54
  "@wordpress/keycodes": "^3.6.1",
55
55
  "@wordpress/notices": "^3.6.1",
56
56
  "@wordpress/primitives": "^3.4.1",
57
- "@wordpress/reusable-blocks": "^3.4.8",
57
+ "@wordpress/reusable-blocks": "^3.4.10",
58
58
  "@wordpress/rich-text": "^5.4.2",
59
- "@wordpress/server-side-render": "^3.4.5",
59
+ "@wordpress/server-side-render": "^3.4.6",
60
60
  "@wordpress/url": "^3.7.1",
61
61
  "@wordpress/viewport": "^4.4.1",
62
62
  "classnames": "^2.3.1",
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "988fb5256118af4ed0546345c26a690ac9b7316b"
77
+ "gitHead": "00f3fb76974fe21d2b5f8bea8c81df5dc1afcb4a"
78
78
  }
@@ -76,12 +76,15 @@ export function useUserAvatar( { userId, postId, postType } ) {
76
76
  },
77
77
  [ postType, postId, userId ]
78
78
  );
79
- const avatarUrls = authorDetails
80
- ? Object.values( authorDetails.avatar_urls )
81
- : null;
82
- const sizes = authorDetails
83
- ? Object.keys( authorDetails.avatar_urls )
84
- : null;
79
+
80
+ const avatarUrls =
81
+ authorDetails && authorDetails?.avatar_urls
82
+ ? Object.values( authorDetails.avatar_urls )
83
+ : null;
84
+ const sizes =
85
+ authorDetails && authorDetails?.avatar_urls
86
+ ? Object.keys( authorDetails.avatar_urls )
87
+ : null;
85
88
  const { minSize, maxSize } = getAvatarSizes( sizes );
86
89
  const defaultAvatar = useDefaultAvatar();
87
90
  return {
@@ -18,10 +18,6 @@
18
18
  },
19
19
  "textAlign": {
20
20
  "type": "string"
21
- },
22
- "fontSize": {
23
- "type": "string",
24
- "default": "small"
25
21
  }
26
22
  },
27
23
  "usesContext": [ "commentId" ],
@@ -41,7 +41,7 @@ export default function Edit( {
41
41
  [ `has-text-align-${ textAlign }` ]: textAlign,
42
42
  } ),
43
43
  } );
44
- const displayName = useSelect(
44
+ let displayName = useSelect(
45
45
  ( select ) => {
46
46
  const { getEntityRecord } = select( coreStore );
47
47
 
@@ -92,15 +92,7 @@ export default function Edit( {
92
92
  );
93
93
 
94
94
  if ( ! commentId || ! displayName ) {
95
- return (
96
- <>
97
- { inspectorControls }
98
- { blockControls }
99
- <div { ...blockProps }>
100
- <p>{ _x( 'Comment Author', 'block title' ) }</p>
101
- </div>
102
- </>
103
- );
95
+ displayName = _x( 'Comment Author', 'block title' );
104
96
  }
105
97
 
106
98
  const displayAuthor = isLink ? (
@@ -111,9 +103,8 @@ export default function Edit( {
111
103
  { displayName }
112
104
  </a>
113
105
  ) : (
114
- <p>{ displayName }</p>
106
+ displayName
115
107
  );
116
-
117
108
  return (
118
109
  <>
119
110
  { inspectorControls }
@@ -14,10 +14,6 @@
14
14
  "isLink": {
15
15
  "type": "boolean",
16
16
  "default": true
17
- },
18
- "fontSize": {
19
- "type": "string",
20
- "default": "small"
21
17
  }
22
18
  },
23
19
  "usesContext": [ "commentId" ],
@@ -33,7 +33,7 @@ export default function Edit( {
33
33
  setAttributes,
34
34
  } ) {
35
35
  const blockProps = useBlockProps();
36
- const [ date ] = useEntityProp( 'root', 'comment', 'date', commentId );
36
+ let [ date ] = useEntityProp( 'root', 'comment', 'date', commentId );
37
37
  const [ siteFormat = getDateSettings().formats.date ] = useEntityProp(
38
38
  'root',
39
39
  'site',
@@ -60,21 +60,17 @@ export default function Edit( {
60
60
  );
61
61
 
62
62
  if ( ! commentId || ! date ) {
63
- return (
64
- <>
65
- { inspectorControls }
66
- <div { ...blockProps }>
67
- <p>{ _x( 'Comment Date', 'block title' ) }</p>
68
- </div>
69
- </>
70
- );
63
+ date = _x( 'Comment Date', 'block title' );
71
64
  }
72
65
 
73
- let commentDate = (
74
- <time dateTime={ dateI18n( 'c', date ) }>
75
- { dateI18n( format || siteFormat, date ) }
76
- </time>
77
- );
66
+ let commentDate =
67
+ date instanceof Date ? (
68
+ <time dateTime={ dateI18n( 'c', date ) }>
69
+ { dateI18n( format || siteFormat, date ) }
70
+ </time>
71
+ ) : (
72
+ <time>{ date }</time>
73
+ );
78
74
 
79
75
  if ( isLink ) {
80
76
  commentDate = (
@@ -24,9 +24,6 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
24
24
  }
25
25
 
26
26
  $classes = '';
27
- if ( isset( $attributes['fontSize'] ) ) {
28
- $classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
29
- }
30
27
 
31
28
  $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
32
29
  $formatted_date = get_comment_date(
@@ -15,10 +15,6 @@
15
15
  },
16
16
  "textAlign": {
17
17
  "type": "string"
18
- },
19
- "fontSize": {
20
- "type": "string",
21
- "default": "small"
22
18
  }
23
19
  },
24
20
  "supports": {
@@ -11,10 +11,6 @@
11
11
  "attributes": {
12
12
  "textAlign": {
13
13
  "type": "string"
14
- },
15
- "fontSize": {
16
- "type": "string",
17
- "default": "small"
18
14
  }
19
15
  },
20
16
  "supports": {
@@ -37,7 +37,12 @@ const TEMPLATE = [
37
37
  'core/column',
38
38
  {},
39
39
  [
40
- [ 'core/comment-author-name' ],
40
+ [
41
+ 'core/comment-author-name',
42
+ {
43
+ fontSize: 'small',
44
+ },
45
+ ],
41
46
  [
42
47
  'core/group',
43
48
  {
@@ -52,12 +57,27 @@ const TEMPLATE = [
52
57
  },
53
58
  },
54
59
  [
55
- [ 'core/comment-date' ],
56
- [ 'core/comment-edit-link' ],
60
+ [
61
+ 'core/comment-date',
62
+ {
63
+ fontSize: 'small',
64
+ },
65
+ ],
66
+ [
67
+ 'core/comment-edit-link',
68
+ {
69
+ fontSize: 'small',
70
+ },
71
+ ],
57
72
  ],
58
73
  ],
59
74
  [ 'core/comment-content' ],
60
- [ 'core/comment-reply-link' ],
75
+ [
76
+ 'core/comment-reply-link',
77
+ {
78
+ fontSize: 'small',
79
+ },
80
+ ],
61
81
  ],
62
82
  ],
63
83
  ],
@@ -32,12 +32,15 @@ function render_block_core_cover( $attributes, $content ) {
32
32
 
33
33
  $image = get_the_post_thumbnail( null, 'post-thumbnail', $attr );
34
34
 
35
- $content = str_replace(
36
- '</span><div',
37
- '</span>' . $image . '<div',
38
- $content
39
- );
40
-
35
+ /*
36
+ * Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
37
+ * and removes eventual withespace characters between the two (typically introduced at template level)
38
+ */
39
+ $inner_container_start = '/<div\b[^>]+wp-block-cover__inner-container[\s|"][^>]*>/U';
40
+ if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
41
+ $offset = $matches[0][1];
42
+ $content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
43
+ }
41
44
  } else {
42
45
  if ( in_the_loop() ) {
43
46
  update_post_thumbnail_cache();
@@ -86,7 +86,8 @@ function block_core_gallery_render( $attributes, $content ) {
86
86
  'wp_footer',
87
87
  function () use ( $style ) {
88
88
  echo '<style> ' . $style . '</style>';
89
- }
89
+ },
90
+ 11
90
91
  );
91
92
  return $content;
92
93
  }
@@ -28,9 +28,11 @@ import {
28
28
  useBlockProps,
29
29
  store as blockEditorStore,
30
30
  } from '@wordpress/block-editor';
31
- import { useSelect } from '@wordpress/data';
31
+ import { useSelect, useDispatch } from '@wordpress/data';
32
32
  import { pin, list, grid } from '@wordpress/icons';
33
33
  import { store as coreStore } from '@wordpress/core-data';
34
+ import { store as noticeStore } from '@wordpress/notices';
35
+ import { useInstanceId } from '@wordpress/compose';
34
36
 
35
37
  /**
36
38
  * Internal dependencies
@@ -66,6 +68,7 @@ function getFeaturedImageDetails( post, size ) {
66
68
  }
67
69
 
68
70
  export default function LatestPostsEdit( { attributes, setAttributes } ) {
71
+ const instanceId = useInstanceId( LatestPostsEdit );
69
72
  const {
70
73
  postsToShow,
71
74
  order,
@@ -148,6 +151,20 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
148
151
  ]
149
152
  );
150
153
 
154
+ // If a user clicks to a link prevent redirection and show a warning.
155
+ const { createWarningNotice, removeNotice } = useDispatch( noticeStore );
156
+ let noticeId;
157
+ const showRedirectionPreventedNotice = ( event ) => {
158
+ event.preventDefault();
159
+ // Remove previous warning if any, to show one at a time per block.
160
+ removeNotice( noticeId );
161
+ noticeId = `block-library/core/latest-posts/redirection-prevented/${ instanceId }`;
162
+ createWarningNotice( __( 'Links are disabled in the editor.' ), {
163
+ id: noticeId,
164
+ type: 'snackbar',
165
+ } );
166
+ };
167
+
151
168
  const imageSizeOptions = imageSizes
152
169
  .filter( ( { slug } ) => slug !== 'full' )
153
170
  .map( ( { name, slug } ) => ( {
@@ -466,7 +483,11 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
466
483
  .join( ' ' ) }
467
484
  { /* translators: excerpt truncation character, default … */ }
468
485
  { __( ' … ' ) }
469
- <a href={ post.link } rel="noopener noreferrer">
486
+ <a
487
+ href={ post.link }
488
+ rel="noopener noreferrer"
489
+ onClick={ showRedirectionPreventedNotice }
490
+ >
470
491
  { __( 'Read more' ) }
471
492
  </a>
472
493
  </>
@@ -483,6 +504,9 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
483
504
  className="wp-block-latest-posts__post-title"
484
505
  href={ post.link }
485
506
  rel="noreferrer noopener"
507
+ onClick={
508
+ showRedirectionPreventedNotice
509
+ }
486
510
  >
487
511
  { featuredImage }
488
512
  </a>
@@ -501,6 +525,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
501
525
  }
502
526
  : undefined
503
527
  }
528
+ onClick={ showRedirectionPreventedNotice }
504
529
  >
505
530
  { ! titleTrimmed ? __( '(no title)' ) : null }
506
531
  </a>
@@ -46,7 +46,6 @@ const TEMPLATE = [
46
46
  [
47
47
  'core/paragraph',
48
48
  {
49
- fontSize: 'large',
50
49
  placeholder: _x( 'Content…', 'content placeholder' ),
51
50
  },
52
51
  ],
@@ -299,6 +299,9 @@ button.wp-block-navigation-item__content {
299
299
  font-size: inherit;
300
300
  font-family: inherit;
301
301
  line-height: inherit;
302
+ font-style: inherit;
303
+ font-weight: inherit;
304
+ text-transform: inherit;
302
305
 
303
306
  // Buttons default to center alignment. This becomes visible
304
307
  // when a menu item label is long enough to wrap.
@@ -16,11 +16,14 @@ import {
16
16
  import { __, sprintf } from '@wordpress/i18n';
17
17
  import { useSelect } from '@wordpress/data';
18
18
  import { useEntityProp, store as coreStore } from '@wordpress/core-data';
19
- import {
20
- __experimentalUseDisabled as useDisabled,
21
- useInstanceId,
22
- } from '@wordpress/compose';
19
+
23
20
  import { createInterpolateElement } from '@wordpress/element';
21
+ import { __experimentalUseDisabled as useDisabled } from '@wordpress/compose';
22
+
23
+ /**
24
+ * Internal dependencies
25
+ */
26
+ import CommentsForm from '../post-comments-form/form';
24
27
 
25
28
  export default function PostCommentsEdit( {
26
29
  attributes: { textAlign },
@@ -54,7 +57,7 @@ export default function PostCommentsEdit( {
54
57
  let warning = __(
55
58
  'Post Comments block: This is just a placeholder, not a real comment. The final styling may differ because it also depends on the current theme. For better compatibility with the Block Editor, please consider replacing this block with the "Comments Query Loop" block.'
56
59
  );
57
- let showPlacholder = true;
60
+ let showPlaceholder = true;
58
61
 
59
62
  if ( ! isSiteEditor && 'open' !== commentStatus ) {
60
63
  if ( 'closed' === commentStatus ) {
@@ -65,7 +68,7 @@ export default function PostCommentsEdit( {
65
68
  ),
66
69
  postType
67
70
  );
68
- showPlacholder = false;
71
+ showPlaceholder = false;
69
72
  } else if ( ! postTypeSupportsComments ) {
70
73
  warning = sprintf(
71
74
  /* translators: 1: Post type (i.e. "post", "page") */
@@ -74,10 +77,10 @@ export default function PostCommentsEdit( {
74
77
  ),
75
78
  postType
76
79
  );
77
- showPlacholder = false;
80
+ showPlaceholder = false;
78
81
  } else if ( 'open' !== defaultCommentStatus ) {
79
82
  warning = __( 'Post Comments block: Comments are not enabled.' );
80
- showPlacholder = false;
83
+ showPlaceholder = false;
81
84
  }
82
85
  }
83
86
 
@@ -89,8 +92,6 @@ export default function PostCommentsEdit( {
89
92
 
90
93
  const disabledRef = useDisabled();
91
94
 
92
- const textareaId = useInstanceId( PostCommentsEdit );
93
-
94
95
  return (
95
96
  <>
96
97
  <BlockControls group="block">
@@ -105,7 +106,7 @@ export default function PostCommentsEdit( {
105
106
  <div { ...blockProps }>
106
107
  <Warning>{ warning }</Warning>
107
108
 
108
- { showPlacholder && (
109
+ { showPlaceholder && (
109
110
  <div
110
111
  className="wp-block-post-comments__placeholder"
111
112
  ref={ disabledRef }
@@ -238,37 +239,7 @@ export default function PostCommentsEdit( {
238
239
  </div>
239
240
  </div>
240
241
 
241
- <div className="comment-respond">
242
- <h3 className="comment-reply-title">
243
- { __( 'Leave a Reply' ) }
244
- </h3>
245
-
246
- <form className="comment-form" noValidate>
247
- <p className="comment-form-comment">
248
- <label
249
- htmlFor={ `comment-${ textareaId }` }
250
- >
251
- { __( 'Comment' ) }{ ' ' }
252
- <span className="required">*</span>
253
- </label>
254
- <textarea
255
- id={ `comment-${ textareaId }` }
256
- name="comment"
257
- cols="45"
258
- rows="8"
259
- required
260
- />
261
- </p>
262
- <p className="form-submit wp-block-button">
263
- <input
264
- name="submit"
265
- type="submit"
266
- className="submit wp-block-button__link"
267
- value={ __( 'Post Comment' ) }
268
- />
269
- </p>
270
- </form>
271
- </div>
242
+ <CommentsForm />
272
243
  </div>
273
244
  ) }
274
245
  </div>