Skip to content

Commit

Permalink
Allow background color again to avoid compatibility errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Bravo committed Feb 7, 2022
1 parent c20e700 commit 1ca9bd1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/comment-author-avatar/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"color": true,
"style": true
},
"color": {
"background": true,
"text": false
},
"spacing": {
"__experimentalSkipSerialization": true,
"margin": true,
Expand Down
9 changes: 2 additions & 7 deletions packages/block-library/src/comment-template/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -100,9 +95,9 @@ const CommentsList = ( {
} ) => (
<ol { ...blockProps }>
{ comments &&
comments.map( ( comment ) => (
comments.map( ( comment, index ) => (
<BlockContextProvider
key={ comment.commentId || uniqueId( 'comment-default' ) }
key={ comment.commentId || index }
value={ comment }
>
<CommentTemplateInnerBlocks
Expand Down

0 comments on commit 1ca9bd1

Please sign in to comment.