Skip to content

Commit

Permalink
Revert "Distinguish first comment from others."
Browse files Browse the repository at this point in the history
This reverts commit 2189aef.
  • Loading branch information
ockham committed Dec 10, 2024
1 parent 6e7427b commit 1567b9e
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions packages/block-library/src/comment-content/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import { __ } from '@wordpress/i18n';
import { RawHTML } from '@wordpress/element';
import { Disabled } from '@wordpress/components';
import { useEntityProp } from '@wordpress/core-data';
import { useSelect } from '@wordpress/data';
import {
AlignmentControl,
BlockControls,
store as blockEditorStore,
useBlockProps,
} from '@wordpress/block-editor';

Expand All @@ -27,15 +25,13 @@ import {
* @param {string} props.attributes.textAlign The `textAlign` attribute.
* @param {Object} props.context Inherited context.
* @param {string} props.context.commentId The comment ID.
* @param {string} props.clientId The block client ID.
*
* @return {JSX.Element} React element.
*/
export default function Edit( {
setAttributes,
attributes: { textAlign },
context: { commentId },
clientId,
} ) {
const blockProps = useBlockProps( {
className: clsx( {
Expand All @@ -48,13 +44,6 @@ export default function Edit( {
'content',
commentId
);
const isFirstCommentContentBlockinTemplate = useSelect(
( select ) =>
select( blockEditorStore ).getBlockParentsByBlockName(
clientId,
'core/comment-template'
).length > 0
);

const blockControls = (
<BlockControls group="block">
Expand All @@ -73,11 +62,9 @@ export default function Edit( {
{ blockControls }
<div { ...blockProps }>
<p>
{ isFirstCommentContentBlockinTemplate
? __(
'This is the Comment Content block. It displays the text of user comments submitted on your site, ranging from short remarks to longer, multi-paragraph responses.'
)
: __( 'This is another Comment Content block.' ) }
{ __(
'This is the Comment Content block. It displays the text of user comments submitted on your site, ranging from short remarks to longer, multi-paragraph responses.'
) }
</p>
</div>
</>
Expand Down

0 comments on commit 1567b9e

Please sign in to comment.