From 1ca9bd1ed42ffc44a83ebcc5b3a1cc23505e4052 Mon Sep 17 00:00:00 2001 From: Carlos Bravo Date: Thu, 3 Feb 2022 11:34:58 +0100 Subject: [PATCH] Allow background color again to avoid compatibility errors --- docs/reference-guides/core-blocks.md | 2 +- .../block-library/src/comment-author-avatar/block.json | 4 ++++ packages/block-library/src/comment-template/edit.js | 9 ++------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 796171b9d480fc..0244c561109081 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -104,7 +104,7 @@ Add the avatar of this comment's author. ([Source](https://github.com/WordPress/ - **Name:** core/comment-author-avatar - **Category:** theme -- **Supports:** spacing (margin, padding), ~~html~~ +- **Supports:** color (background, ~~text~~), spacing (margin, padding), ~~html~~ - **Attributes:** height, width ## Comment Author Name diff --git a/packages/block-library/src/comment-author-avatar/block.json b/packages/block-library/src/comment-author-avatar/block.json index 37b9e3d541cd35..8d1680546374a1 100644 --- a/packages/block-library/src/comment-author-avatar/block.json +++ b/packages/block-library/src/comment-author-avatar/block.json @@ -26,6 +26,10 @@ "color": true, "style": true }, + "color": { + "background": true, + "text": false + }, "spacing": { "__experimentalSkipSerialization": true, "margin": true, diff --git a/packages/block-library/src/comment-template/edit.js b/packages/block-library/src/comment-template/edit.js index f876051684c04b..28cad0388e2893 100644 --- a/packages/block-library/src/comment-template/edit.js +++ b/packages/block-library/src/comment-template/edit.js @@ -28,11 +28,6 @@ const TEMPLATE = [ [ 'core/comment-edit-link' ], ]; -/** - * External dependencies - */ -import { uniqueId } from 'lodash'; - /** * Component which renders the inner blocks of the Comment Template. * @@ -100,9 +95,9 @@ const CommentsList = ( { } ) => (
    { comments && - comments.map( ( comment ) => ( + comments.map( ( comment, index ) => (