From 79ea9f91f607d07d151b52b3d2fa9bab0484d59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=B3=C5=82kowski?= Date: Thu, 4 Nov 2021 08:26:22 +0100 Subject: [PATCH] Block Library: Remove `post-` prefix from Comment Template inner blocks (#36171) * Block Library: Remove `post-` prefix from Comment Template inner blocks * Add CHANGELOG entry for `@wordpress/icons` * Update the tinner template for Comment Template --- lib/blocks.php | 104 +++++++++--------- .../block.json | 2 +- .../edit.js | 0 .../index.js | 4 +- .../index.php | 14 +-- .../block.json | 6 +- .../deprecated.js | 0 .../edit.js | 2 +- .../index.js | 10 +- .../index.php | 16 +-- .../block.json | 2 +- .../edit.js | 2 +- .../index.js | 2 +- .../index.php | 16 +-- .../block.json | 2 +- .../deprecated.js | 0 .../edit.js | 2 +- .../index.js | 0 .../index.php | 16 +-- .../block.json | 2 +- .../edit.js | 0 .../index.js | 0 .../index.php | 16 +-- .../block.json | 2 +- .../edit.js | 2 +- .../index.js | 12 +- .../index.php | 16 +-- .../src/comment-template/edit.js | 9 +- packages/block-library/src/index.js | 24 ++-- .../block-library/src/post-comment/edit.js | 19 ++-- .../src/api/parser/convert-legacy-block.js | 12 ++ packages/icons/CHANGELOG.md | 4 + packages/icons/src/index.js | 8 +- ...hor-avatar.js => comment-author-avatar.js} | 4 +- ...mment-author.js => comment-author-name.js} | 4 +- ...-comment-content.js => comment-content.js} | 4 +- ...nt-reply-link.js => comment-reply-link.js} | 4 +- schemas/json/theme.json | 72 ++++++++---- .../blocks/core__comment-author-avatar.html | 1 + ....json => core__comment-author-avatar.json} | 2 +- ...> core__comment-author-avatar.parsed.json} | 2 +- ...ore__comment-author-avatar.serialized.html | 1 + .../blocks/core__comment-author-name.html | 1 + ...or.json => core__comment-author-name.json} | 2 +- ... => core__comment-author-name.parsed.json} | 2 +- .../core__comment-author-name.serialized.html | 1 + ...e__comment-author-name__deprecated-v1.html | 1 + ...__comment-author-name__deprecated-v1.json} | 2 +- ...nt-author-name__deprecated-v1.parsed.json} | 2 +- ...author-name__deprecated-v1.serialized.html | 1 + .../blocks/core__comment-content.html | 1 + ...ontent.json => core__comment-content.json} | 2 +- ...json => core__comment-content.parsed.json} | 2 +- .../core__comment-content.serialized.html | 1 + .../fixtures/blocks/core__comment-date.html | 1 + ...ment-date.json => core__comment-date.json} | 2 +- ...ed.json => core__comment-date.parsed.json} | 2 +- .../blocks/core__comment-date.serialized.html | 1 + .../core__comment-date__deprecated-v1.html | 1 + ...=> core__comment-date__deprecated-v1.json} | 2 +- ...__comment-date__deprecated-v1.parsed.json} | 2 +- ...omment-date__deprecated-v1.serialized.html | 1 + ...edit.html => core__comment-edit-link.html} | 2 +- ...edit.json => core__comment-edit-link.json} | 2 +- ...on => core__comment-edit-link.parsed.json} | 2 +- ...> core__comment-edit-link.serialized.html} | 2 +- .../blocks/core__comment-reply-link.html | 1 + ...ink.json => core__comment-reply-link.json} | 2 +- ...n => core__comment-reply-link.parsed.json} | 2 +- .../core__comment-reply-link.serialized.html | 1 + .../core__post-comment-author-avatar.html | 1 - ...post-comment-author-avatar.serialized.html | 1 - .../blocks/core__post-comment-author.html | 1 - .../core__post-comment-author.serialized.html | 1 - ...e__post-comment-author__deprecated-v1.html | 1 - ...ment-author__deprecated-v1.serialized.html | 1 - .../blocks/core__post-comment-content.html | 1 - ...core__post-comment-content.serialized.html | 1 - .../blocks/core__post-comment-date.html | 1 - .../core__post-comment-date.serialized.html | 1 - ...ore__post-comment-date__deprecated-v1.html | 1 - ...omment-date__deprecated-v1.serialized.html | 1 - .../blocks/core__post-comment-reply-link.html | 1 - ...e__post-comment-reply-link.serialized.html | 1 - 84 files changed, 263 insertions(+), 215 deletions(-) rename packages/block-library/src/{post-comment-author-avatar => comment-author-avatar}/block.json (93%) rename packages/block-library/src/{post-comment-author-avatar => comment-author-avatar}/edit.js (100%) rename packages/block-library/src/{post-comment-reply-link => comment-author-avatar}/index.js (78%) rename packages/block-library/src/{post-comment-author-avatar => comment-author-avatar}/index.php (74%) rename packages/block-library/src/{post-comment-author => comment-author-name}/block.json (84%) rename packages/block-library/src/{post-comment-author => comment-author-name}/deprecated.js (100%) rename packages/block-library/src/{post-comment-author => comment-author-name}/edit.js (97%) rename packages/block-library/src/{post-comment-author => comment-author-name}/index.js (82%) rename packages/block-library/src/{post-comment-author => comment-author-name}/index.php (71%) rename packages/block-library/src/{post-comment-content => comment-content}/block.json (95%) rename packages/block-library/src/{post-comment-content => comment-content}/edit.js (96%) rename packages/block-library/src/{post-comment-content => comment-content}/index.js (78%) rename packages/block-library/src/{post-comment-content => comment-content}/index.php (63%) rename packages/block-library/src/{post-comment-date => comment-date}/block.json (95%) rename packages/block-library/src/{post-comment-date => comment-date}/deprecated.js (100%) rename packages/block-library/src/{post-comment-date => comment-date}/edit.js (97%) rename packages/block-library/src/{post-comment-date => comment-date}/index.js (100%) rename packages/block-library/src/{post-comment-date => comment-date}/index.php (67%) rename packages/block-library/src/{post-comment-edit => comment-edit-link}/block.json (95%) rename packages/block-library/src/{post-comment-edit => comment-edit-link}/edit.js (100%) rename packages/block-library/src/{post-comment-edit => comment-edit-link}/index.js (100%) rename packages/block-library/src/{post-comment-edit => comment-edit-link}/index.php (70%) rename packages/block-library/src/{post-comment-reply-link => comment-reply-link}/block.json (94%) rename packages/block-library/src/{post-comment-reply-link => comment-reply-link}/edit.js (94%) rename packages/block-library/src/{post-comment-author-avatar => comment-reply-link}/index.js (77%) rename packages/block-library/src/{post-comment-reply-link => comment-reply-link}/index.php (72%) rename packages/icons/src/library/{post-comment-author-avatar.js => comment-author-avatar.js} (92%) rename packages/icons/src/library/{comment-author.js => comment-author-name.js} (91%) rename packages/icons/src/library/{post-comment-content.js => comment-content.js} (89%) rename packages/icons/src/library/{post-comment-reply-link.js => comment-reply-link.js} (93%) create mode 100644 test/integration/fixtures/blocks/core__comment-author-avatar.html rename test/integration/fixtures/blocks/{core__post-comment-author-avatar.json => core__comment-author-avatar.json} (88%) rename test/integration/fixtures/blocks/{core__post-comment-author-avatar.parsed.json => core__comment-author-avatar.parsed.json} (86%) create mode 100644 test/integration/fixtures/blocks/core__comment-author-avatar.serialized.html create mode 100644 test/integration/fixtures/blocks/core__comment-author-name.html rename test/integration/fixtures/blocks/{core__post-comment-author.json => core__comment-author-name.json} (81%) rename test/integration/fixtures/blocks/{core__post-comment-author.parsed.json => core__comment-author-name.parsed.json} (66%) create mode 100644 test/integration/fixtures/blocks/core__comment-author-name.serialized.html create mode 100644 test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.html rename test/integration/fixtures/blocks/{core__post-comment-author__deprecated-v1.json => core__comment-author-name__deprecated-v1.json} (84%) rename test/integration/fixtures/blocks/{core__post-comment-author__deprecated-v1.parsed.json => core__comment-author-name__deprecated-v1.parsed.json} (81%) create mode 100644 test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.serialized.html create mode 100644 test/integration/fixtures/blocks/core__comment-content.html rename test/integration/fixtures/blocks/{core__post-comment-content.json => core__comment-content.json} (75%) rename test/integration/fixtures/blocks/{core__post-comment-date.parsed.json => core__comment-content.parsed.json} (67%) create mode 100644 test/integration/fixtures/blocks/core__comment-content.serialized.html create mode 100644 test/integration/fixtures/blocks/core__comment-date.html rename test/integration/fixtures/blocks/{core__post-comment-date.json => core__comment-date.json} (80%) rename test/integration/fixtures/blocks/{core__post-comment-content.parsed.json => core__comment-date.parsed.json} (66%) create mode 100644 test/integration/fixtures/blocks/core__comment-date.serialized.html create mode 100644 test/integration/fixtures/blocks/core__comment-date__deprecated-v1.html rename test/integration/fixtures/blocks/{core__post-comment-date__deprecated-v1.json => core__comment-date__deprecated-v1.json} (83%) rename test/integration/fixtures/blocks/{core__post-comment-date__deprecated-v1.parsed.json => core__comment-date__deprecated-v1.parsed.json} (82%) create mode 100644 test/integration/fixtures/blocks/core__comment-date__deprecated-v1.serialized.html rename test/integration/fixtures/blocks/{core__post-comment-edit.html => core__comment-edit-link.html} (80%) rename test/integration/fixtures/blocks/{core__post-comment-edit.json => core__comment-edit-link.json} (93%) rename test/integration/fixtures/blocks/{core__post-comment-edit.parsed.json => core__comment-edit-link.parsed.json} (92%) rename test/integration/fixtures/blocks/{core__post-comment-edit.serialized.html => core__comment-edit-link.serialized.html} (80%) create mode 100644 test/integration/fixtures/blocks/core__comment-reply-link.html rename test/integration/fixtures/blocks/{core__post-comment-reply-link.json => core__comment-reply-link.json} (92%) rename test/integration/fixtures/blocks/{core__post-comment-reply-link.parsed.json => core__comment-reply-link.parsed.json} (91%) create mode 100644 test/integration/fixtures/blocks/core__comment-reply-link.serialized.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-author-avatar.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-author-avatar.serialized.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-author.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-author.serialized.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.serialized.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-content.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-content.serialized.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-date.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-date.serialized.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.serialized.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-reply-link.html delete mode 100644 test/integration/fixtures/blocks/core__post-comment-reply-link.serialized.html diff --git a/lib/blocks.php b/lib/blocks.php index d0f6dede5a3134..2aa34edf476128 100644 --- a/lib/blocks.php +++ b/lib/blocks.php @@ -52,58 +52,58 @@ function gutenberg_reregister_core_block_types() { 'embed', ), 'block_names' => array( - 'archives.php' => 'core/archives', - 'block.php' => 'core/block', - 'calendar.php' => 'core/calendar', - 'categories.php' => 'core/categories', - 'file.php' => 'core/file', - 'latest-comments.php' => 'core/latest-comments', - 'latest-posts.php' => 'core/latest-posts', - 'loginout.php' => 'core/loginout', - 'navigation.php' => 'core/navigation', - 'navigation-link.php' => 'core/navigation-link', - 'navigation-submenu.php' => 'core/navigation-submenu', - 'home-link.php' => 'core/home-link', - 'rss.php' => 'core/rss', - 'search.php' => 'core/search', - 'shortcode.php' => 'core/shortcode', - 'social-link.php' => 'core/social-link', - 'tag-cloud.php' => 'core/tag-cloud', - 'page-list.php' => 'core/page-list', - 'pattern.php' => 'core/pattern', - 'post-author.php' => 'core/post-author', - 'post-comment.php' => 'core/post-comment', - 'post-comment-author.php' => 'core/post-comment-author', - 'post-comment-author-avatar.php' => 'core/post-comment-author-avatar', - 'post-comment-content.php' => 'core/post-comment-content', - 'post-comment-date.php' => 'core/post-comment-date', - 'post-comment-edit.php' => 'core/post-comment-edit', - 'post-comment-reply-link.php' => 'core/post-comment-reply-link', - 'post-comments.php' => 'core/post-comments', - 'post-comments-count.php' => 'core/post-comments-count', - 'post-comments-form.php' => 'core/post-comments-form', - 'post-comments-link.php' => 'core/post-comments-link', - 'comment-template.php' => 'core/comment-template', - 'post-content.php' => 'core/post-content', - 'post-date.php' => 'core/post-date', - 'post-excerpt.php' => 'core/post-excerpt', - 'post-featured-image.php' => 'core/post-featured-image', - 'post-terms.php' => 'core/post-terms', - 'post-navigation-link.php' => 'core/post-navigation-link', - 'post-title.php' => 'core/post-title', - 'query.php' => 'core/query', - 'post-template.php' => 'core/post-template', - 'query-title.php' => 'core/query-title', - 'query-pagination.php' => 'core/query-pagination', - 'query-pagination-next.php' => 'core/query-pagination-next', - 'query-pagination-numbers.php' => 'core/query-pagination-numbers', - 'query-pagination-previous.php' => 'core/query-pagination-previous', - 'site-logo.php' => 'core/site-logo', - 'site-tagline.php' => 'core/site-tagline', - 'site-title.php' => 'core/site-title', - // 'table-of-contents.php' => 'core/table-of-contents', - 'template-part.php' => 'core/template-part', - 'term-description.php' => 'core/term-description', + 'archives.php' => 'core/archives', + 'block.php' => 'core/block', + 'calendar.php' => 'core/calendar', + 'categories.php' => 'core/categories', + 'comment-author-avatar.php' => 'core/comment-author-avatar', + 'comment-author-name.php' => 'core/comment-author-name', + 'comment-content.php' => 'core/comment-content', + 'comment-date.php' => 'core/comment-date', + 'comment-edit-link.php' => 'core/comment-edit-link', + 'comment-reply-link.php' => 'core/comment-reply-link', + 'comment-template.php' => 'core/comment-template', + 'file.php' => 'core/file', + 'home-link.php' => 'core/home-link', + 'latest-comments.php' => 'core/latest-comments', + 'latest-posts.php' => 'core/latest-posts', + 'loginout.php' => 'core/loginout', + 'navigation.php' => 'core/navigation', + 'navigation-link.php' => 'core/navigation-link', + 'navigation-submenu.php' => 'core/navigation-submenu', + 'page-list.php' => 'core/page-list', + 'pattern.php' => 'core/pattern', + 'post-author.php' => 'core/post-author', + 'post-comment.php' => 'core/post-comment', + 'post-comments.php' => 'core/post-comments', + 'post-comments-count.php' => 'core/post-comments-count', + 'post-comments-form.php' => 'core/post-comments-form', + 'post-comments-link.php' => 'core/post-comments-link', + 'post-content.php' => 'core/post-content', + 'post-date.php' => 'core/post-date', + 'post-excerpt.php' => 'core/post-excerpt', + 'post-featured-image.php' => 'core/post-featured-image', + 'post-navigation-link.php' => 'core/post-navigation-link', + 'post-terms.php' => 'core/post-terms', + 'post-title.php' => 'core/post-title', + 'query.php' => 'core/query', + 'post-template.php' => 'core/post-template', + 'query-pagination.php' => 'core/query-pagination', + 'query-pagination-next.php' => 'core/query-pagination-next', + 'query-pagination-numbers.php' => 'core/query-pagination-numbers', + 'query-pagination-previous.php' => 'core/query-pagination-previous', + 'query-title.php' => 'core/query-title', + 'rss.php' => 'core/rss', + 'search.php' => 'core/search', + 'shortcode.php' => 'core/shortcode', + 'social-link.php' => 'core/social-link', + 'site-logo.php' => 'core/site-logo', + 'site-tagline.php' => 'core/site-tagline', + 'site-title.php' => 'core/site-title', + // 'table-of-contents.php' => 'core/table-of-contents', + 'tag-cloud.php' => 'core/tag-cloud', + 'template-part.php' => 'core/template-part', + 'term-description.php' => 'core/term-description', ), ), __DIR__ . '/../build/edit-widgets/blocks/' => array( diff --git a/packages/block-library/src/post-comment-author-avatar/block.json b/packages/block-library/src/comment-author-avatar/block.json similarity index 93% rename from packages/block-library/src/post-comment-author-avatar/block.json rename to packages/block-library/src/comment-author-avatar/block.json index ef532165b66a5b..74fb553fe44fa9 100644 --- a/packages/block-library/src/post-comment-author-avatar/block.json +++ b/packages/block-library/src/comment-author-avatar/block.json @@ -1,6 +1,6 @@ { "apiVersion": 2, - "name": "core/post-comment-author-avatar", + "name": "core/comment-author-avatar", "title": "Comment Author Avatar", "category": "theme", "parent": [ "core/comment-template" ], diff --git a/packages/block-library/src/post-comment-author-avatar/edit.js b/packages/block-library/src/comment-author-avatar/edit.js similarity index 100% rename from packages/block-library/src/post-comment-author-avatar/edit.js rename to packages/block-library/src/comment-author-avatar/edit.js diff --git a/packages/block-library/src/post-comment-reply-link/index.js b/packages/block-library/src/comment-author-avatar/index.js similarity index 78% rename from packages/block-library/src/post-comment-reply-link/index.js rename to packages/block-library/src/comment-author-avatar/index.js index 7d52091a43abb5..ef71f2751459a0 100644 --- a/packages/block-library/src/post-comment-reply-link/index.js +++ b/packages/block-library/src/comment-author-avatar/index.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { postCommentReplyLink as icon } from '@wordpress/icons'; +import { commentAuthorAvatar as icon } from '@wordpress/icons'; /** * Internal dependencies @@ -13,6 +13,6 @@ const { name } = metadata; export { metadata, name }; export const settings = { - edit, icon, + edit, }; diff --git a/packages/block-library/src/post-comment-author-avatar/index.php b/packages/block-library/src/comment-author-avatar/index.php similarity index 74% rename from packages/block-library/src/post-comment-author-avatar/index.php rename to packages/block-library/src/comment-author-avatar/index.php index cc6df8454466bc..0aa7f9aeb8e12b 100644 --- a/packages/block-library/src/post-comment-author-avatar/index.php +++ b/packages/block-library/src/comment-author-avatar/index.php @@ -1,19 +1,19 @@ context['commentId'] ) ) { return ''; } @@ -51,12 +51,12 @@ function render_block_core_post_comment_author_avatar( $attributes, $content, $b /** * Registers the `core/comment-author-avatar` block on the server. */ -function register_block_core_post_comment_author_avatar() { +function register_block_core_comment_author_avatar() { register_block_type_from_metadata( - __DIR__ . '/post-comment-author-avatar', + __DIR__ . '/comment-author-avatar', array( - 'render_callback' => 'render_block_core_post_comment_author_avatar', + 'render_callback' => 'render_block_core_comment_author_avatar', ) ); } -add_action( 'init', 'register_block_core_post_comment_author_avatar' ); +add_action( 'init', 'register_block_core_comment_author_avatar' ); diff --git a/packages/block-library/src/post-comment-author/block.json b/packages/block-library/src/comment-author-name/block.json similarity index 84% rename from packages/block-library/src/post-comment-author/block.json rename to packages/block-library/src/comment-author-name/block.json index e9083116bd8819..eabec383368ebb 100644 --- a/packages/block-library/src/post-comment-author/block.json +++ b/packages/block-library/src/comment-author-name/block.json @@ -1,10 +1,10 @@ { "apiVersion": 2, - "name": "core/post-comment-author", - "title": "Comment Author", + "name": "core/comment-author-name", + "title": "Comment Author Name", "category": "theme", "parent": [ "core/comment-template" ], - "description": "Add the author of this comment.", + "description": "Add the author name of this comment.", "textdomain": "default", "attributes": { "isLink": { diff --git a/packages/block-library/src/post-comment-author/deprecated.js b/packages/block-library/src/comment-author-name/deprecated.js similarity index 100% rename from packages/block-library/src/post-comment-author/deprecated.js rename to packages/block-library/src/comment-author-name/deprecated.js diff --git a/packages/block-library/src/post-comment-author/edit.js b/packages/block-library/src/comment-author-name/edit.js similarity index 97% rename from packages/block-library/src/post-comment-author/edit.js rename to packages/block-library/src/comment-author-name/edit.js index f9dc9eaf3248ba..58aad789a365c0 100644 --- a/packages/block-library/src/post-comment-author/edit.js +++ b/packages/block-library/src/comment-author-name/edit.js @@ -18,7 +18,7 @@ import { store as coreStore } from '@wordpress/core-data'; import { PanelBody, ToggleControl } from '@wordpress/components'; /** - * Renders the `core/post-comment-author` block on the editor. + * Renders the `core/comment-author-name` block on the editor. * * @param {Object} props React props. * @param {Object} props.setAttributes Callback for updating block attributes. diff --git a/packages/block-library/src/post-comment-author/index.js b/packages/block-library/src/comment-author-name/index.js similarity index 82% rename from packages/block-library/src/post-comment-author/index.js rename to packages/block-library/src/comment-author-name/index.js index 6285ad906f66aa..d1481d359b0a08 100644 --- a/packages/block-library/src/post-comment-author/index.js +++ b/packages/block-library/src/comment-author-name/index.js @@ -1,3 +1,8 @@ +/** + * WordPress dependencies + */ +import { commentAuthorName as icon } from '@wordpress/icons'; + /** * Internal dependencies */ @@ -5,11 +10,6 @@ import metadata from './block.json'; import edit from './edit'; import deprecated from './deprecated'; -/** - * WordPress dependencies - */ -import { commentAuthor as icon } from '@wordpress/icons'; - const { name } = metadata; export { metadata, name }; diff --git a/packages/block-library/src/post-comment-author/index.php b/packages/block-library/src/comment-author-name/index.php similarity index 71% rename from packages/block-library/src/post-comment-author/index.php rename to packages/block-library/src/comment-author-name/index.php index 81d7e85155db6b..7e60da831a9ef1 100644 --- a/packages/block-library/src/post-comment-author/index.php +++ b/packages/block-library/src/comment-author-name/index.php @@ -1,19 +1,19 @@ context['commentId'] ) ) { return ''; } @@ -44,14 +44,14 @@ function render_block_core_post_comment_author( $attributes, $content, $block ) } /** - * Registers the `core/post-comment-author` block on the server. + * Registers the `core/comment-author-name` block on the server. */ -function register_block_core_post_comment_author() { +function register_block_core_comment_author_name() { register_block_type_from_metadata( - __DIR__ . '/post-comment-author', + __DIR__ . '/comment-author-name', array( - 'render_callback' => 'render_block_core_post_comment_author', + 'render_callback' => 'render_block_core_comment_author_name', ) ); } -add_action( 'init', 'register_block_core_post_comment_author' ); +add_action( 'init', 'register_block_core_comment_author_name' ); diff --git a/packages/block-library/src/post-comment-content/block.json b/packages/block-library/src/comment-content/block.json similarity index 95% rename from packages/block-library/src/post-comment-content/block.json rename to packages/block-library/src/comment-content/block.json index 4a9a24615ab9a2..526670e183d0e7 100644 --- a/packages/block-library/src/post-comment-content/block.json +++ b/packages/block-library/src/comment-content/block.json @@ -1,6 +1,6 @@ { "apiVersion": 2, - "name": "core/post-comment-content", + "name": "core/comment-content", "title": "Comment Content", "category": "theme", "parent": [ "core/comment-template" ], diff --git a/packages/block-library/src/post-comment-content/edit.js b/packages/block-library/src/comment-content/edit.js similarity index 96% rename from packages/block-library/src/post-comment-content/edit.js rename to packages/block-library/src/comment-content/edit.js index e9501e459962ff..a22acd43612b2f 100644 --- a/packages/block-library/src/post-comment-content/edit.js +++ b/packages/block-library/src/comment-content/edit.js @@ -17,7 +17,7 @@ import { } from '@wordpress/block-editor'; /** - * Renders the `core/post-comment-content` block on the editor. + * Renders the `core/comment-content` block on the editor. * * @param {Object} props React props. * @param {Object} props.setAttributes Callback for updating block attributes. diff --git a/packages/block-library/src/post-comment-content/index.js b/packages/block-library/src/comment-content/index.js similarity index 78% rename from packages/block-library/src/post-comment-content/index.js rename to packages/block-library/src/comment-content/index.js index cd57ce74b9702d..6020aab70e0f88 100644 --- a/packages/block-library/src/post-comment-content/index.js +++ b/packages/block-library/src/comment-content/index.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { postCommentContent as icon } from '@wordpress/icons'; +import { commentContent as icon } from '@wordpress/icons'; /** * Internal dependencies diff --git a/packages/block-library/src/post-comment-content/index.php b/packages/block-library/src/comment-content/index.php similarity index 63% rename from packages/block-library/src/post-comment-content/index.php rename to packages/block-library/src/comment-content/index.php index 6dd14ec0983f90..c0b524be8ce0a5 100644 --- a/packages/block-library/src/post-comment-content/index.php +++ b/packages/block-library/src/comment-content/index.php @@ -1,19 +1,19 @@ context['commentId'] ) ) { return ''; } @@ -43,14 +43,14 @@ function render_block_core_post_comment_content( $attributes, $content, $block ) } /** - * Registers the `core/post-comment-content` block on the server. + * Registers the `core/comment-content` block on the server. */ -function register_block_core_post_comment_content() { +function register_block_core_comment_content() { register_block_type_from_metadata( - __DIR__ . '/post-comment-content', + __DIR__ . '/comment-content', array( - 'render_callback' => 'render_block_core_post_comment_content', + 'render_callback' => 'render_block_core_comment_content', ) ); } -add_action( 'init', 'register_block_core_post_comment_content' ); +add_action( 'init', 'register_block_core_comment_content' ); diff --git a/packages/block-library/src/post-comment-date/block.json b/packages/block-library/src/comment-date/block.json similarity index 95% rename from packages/block-library/src/post-comment-date/block.json rename to packages/block-library/src/comment-date/block.json index 25541e88248187..ac59980a20b2c8 100644 --- a/packages/block-library/src/post-comment-date/block.json +++ b/packages/block-library/src/comment-date/block.json @@ -1,6 +1,6 @@ { "apiVersion": 2, - "name": "core/post-comment-date", + "name": "core/comment-date", "title": "Comment Date", "category": "theme", "parent": [ "core/comment-template" ], diff --git a/packages/block-library/src/post-comment-date/deprecated.js b/packages/block-library/src/comment-date/deprecated.js similarity index 100% rename from packages/block-library/src/post-comment-date/deprecated.js rename to packages/block-library/src/comment-date/deprecated.js diff --git a/packages/block-library/src/post-comment-date/edit.js b/packages/block-library/src/comment-date/edit.js similarity index 97% rename from packages/block-library/src/post-comment-date/edit.js rename to packages/block-library/src/comment-date/edit.js index 2059d49e8354d7..aae49e7426f507 100644 --- a/packages/block-library/src/post-comment-date/edit.js +++ b/packages/block-library/src/comment-date/edit.js @@ -12,7 +12,7 @@ import { import { __, _x } from '@wordpress/i18n'; /** - * Renders the `core/post-comment-date` block on the editor. + * Renders the `core/comment-date` block on the editor. * * @param {Object} props React props. * @param {Object} props.setAttributes Callback for updating block attributes. diff --git a/packages/block-library/src/post-comment-date/index.js b/packages/block-library/src/comment-date/index.js similarity index 100% rename from packages/block-library/src/post-comment-date/index.js rename to packages/block-library/src/comment-date/index.js diff --git a/packages/block-library/src/post-comment-date/index.php b/packages/block-library/src/comment-date/index.php similarity index 67% rename from packages/block-library/src/post-comment-date/index.php rename to packages/block-library/src/comment-date/index.php index 1f66dbf120c902..9dcdef59c7f412 100644 --- a/packages/block-library/src/post-comment-date/index.php +++ b/packages/block-library/src/comment-date/index.php @@ -1,19 +1,19 @@ context['commentId'] ) ) { return ''; } @@ -43,14 +43,14 @@ function render_block_core_post_comment_date( $attributes, $content, $block ) { } /** - * Registers the `core/post-comment-date` block on the server. + * Registers the `core/comment-date` block on the server. */ -function register_block_core_post_comment_date() { +function register_block_core_comment_date() { register_block_type_from_metadata( - __DIR__ . '/post-comment-date', + __DIR__ . '/comment-date', array( - 'render_callback' => 'render_block_core_post_comment_date', + 'render_callback' => 'render_block_core_comment_date', ) ); } -add_action( 'init', 'register_block_core_post_comment_date' ); +add_action( 'init', 'register_block_core_comment_date' ); diff --git a/packages/block-library/src/post-comment-edit/block.json b/packages/block-library/src/comment-edit-link/block.json similarity index 95% rename from packages/block-library/src/post-comment-edit/block.json rename to packages/block-library/src/comment-edit-link/block.json index 5c77fc22390134..58da04b7626bbb 100644 --- a/packages/block-library/src/post-comment-edit/block.json +++ b/packages/block-library/src/comment-edit-link/block.json @@ -1,6 +1,6 @@ { "apiVersion": 2, - "name": "core/post-comment-edit", + "name": "core/comment-edit-link", "title": "Comment Edit Link", "category": "theme", "parent": [ "core/comment-template" ], diff --git a/packages/block-library/src/post-comment-edit/edit.js b/packages/block-library/src/comment-edit-link/edit.js similarity index 100% rename from packages/block-library/src/post-comment-edit/edit.js rename to packages/block-library/src/comment-edit-link/edit.js diff --git a/packages/block-library/src/post-comment-edit/index.js b/packages/block-library/src/comment-edit-link/index.js similarity index 100% rename from packages/block-library/src/post-comment-edit/index.js rename to packages/block-library/src/comment-edit-link/index.js diff --git a/packages/block-library/src/post-comment-edit/index.php b/packages/block-library/src/comment-edit-link/index.php similarity index 70% rename from packages/block-library/src/post-comment-edit/index.php rename to packages/block-library/src/comment-edit-link/index.php index 65e3ceb5d0d0e5..0816bbcec98c4e 100644 --- a/packages/block-library/src/post-comment-edit/index.php +++ b/packages/block-library/src/comment-edit-link/index.php @@ -1,12 +1,12 @@ context['commentId'] ) || ! current_user_can( 'edit_comment', $block->context['commentId'] ) ) { return ''; } @@ -44,15 +44,15 @@ function render_block_core_post_comment_edit( $attributes, $content, $block ) { } /** - * Registers the `core/post-comment-edit` block on the server. + * Registers the `core/comment-edit-link` block on the server. */ -function register_block_core_post_comment_edit() { +function register_block_core_comment_edit_link() { register_block_type_from_metadata( - __DIR__ . '/post-comment-edit', + __DIR__ . '/comment-edit-link', array( - 'render_callback' => 'render_block_core_post_comment_edit', + 'render_callback' => 'render_block_core_comment_edit_link', ) ); } -add_action( 'init', 'register_block_core_post_comment_edit' ); +add_action( 'init', 'register_block_core_comment_edit_link' ); diff --git a/packages/block-library/src/post-comment-reply-link/block.json b/packages/block-library/src/comment-reply-link/block.json similarity index 94% rename from packages/block-library/src/post-comment-reply-link/block.json rename to packages/block-library/src/comment-reply-link/block.json index 6b71d371259314..7afbfe227137d7 100644 --- a/packages/block-library/src/post-comment-reply-link/block.json +++ b/packages/block-library/src/comment-reply-link/block.json @@ -1,6 +1,6 @@ { "apiVersion": 2, - "name": "core/post-comment-reply-link", + "name": "core/comment-reply-link", "title": "Comment Reply Link", "category": "theme", "parent": [ "core/comment-template" ], diff --git a/packages/block-library/src/post-comment-reply-link/edit.js b/packages/block-library/src/comment-reply-link/edit.js similarity index 94% rename from packages/block-library/src/post-comment-reply-link/edit.js rename to packages/block-library/src/comment-reply-link/edit.js index 776caa9f3e7529..08a4d21de88c7b 100644 --- a/packages/block-library/src/post-comment-reply-link/edit.js +++ b/packages/block-library/src/comment-reply-link/edit.js @@ -14,7 +14,7 @@ import { } from '@wordpress/block-editor'; /** - * Renders the `core/post-comment-reply-link` block on the editor. + * Renders the `core/comment-reply-link` block on the editor. * * @param {Object} props React props. * @param {Object} props.setAttributes Callback for updating block attributes. diff --git a/packages/block-library/src/post-comment-author-avatar/index.js b/packages/block-library/src/comment-reply-link/index.js similarity index 77% rename from packages/block-library/src/post-comment-author-avatar/index.js rename to packages/block-library/src/comment-reply-link/index.js index 19d26999d29a6b..491c0ca7d95e14 100644 --- a/packages/block-library/src/post-comment-author-avatar/index.js +++ b/packages/block-library/src/comment-reply-link/index.js @@ -1,18 +1,18 @@ /** - * Internal dependencies + * WordPress dependencies */ -import metadata from './block.json'; -import edit from './edit'; +import { commentReplyLink as icon } from '@wordpress/icons'; /** - * WordPress dependencies + * Internal dependencies */ -import { postCommentAuthorAvatar as icon } from '@wordpress/icons'; +import metadata from './block.json'; +import edit from './edit'; const { name } = metadata; export { metadata, name }; export const settings = { - icon, edit, + icon, }; diff --git a/packages/block-library/src/post-comment-reply-link/index.php b/packages/block-library/src/comment-reply-link/index.php similarity index 72% rename from packages/block-library/src/post-comment-reply-link/index.php rename to packages/block-library/src/comment-reply-link/index.php index d3b11b0fbd5394..169b62ac24bdf0 100644 --- a/packages/block-library/src/post-comment-reply-link/index.php +++ b/packages/block-library/src/comment-reply-link/index.php @@ -1,19 +1,19 @@ context['commentId'] ) ) { return ''; } @@ -66,15 +66,15 @@ function render_block_core_post_comment_reply_link( $attributes, $content, $bloc } /** - * Registers the `core/post-comment-reply-link` block on the server. + * Registers the `core/comment-reply-link` block on the server. */ -function register_block_core_post_comment_reply_link() { +function register_block_core_comment_reply_link() { register_block_type_from_metadata( - __DIR__ . '/post-comment-reply-link', + __DIR__ . '/comment-reply-link', array( - 'render_callback' => 'render_block_core_post_comment_reply_link', + 'render_callback' => 'render_block_core_comment_reply_link', ) ); } -add_action( 'init', 'register_block_core_post_comment_reply_link' ); +add_action( 'init', 'register_block_core_comment_reply_link' ); diff --git a/packages/block-library/src/comment-template/edit.js b/packages/block-library/src/comment-template/edit.js index 2be0da7b5f104a..e1922afc89f700 100644 --- a/packages/block-library/src/comment-template/edit.js +++ b/packages/block-library/src/comment-template/edit.js @@ -15,9 +15,12 @@ import { Spinner } from '@wordpress/components'; import { store as coreStore } from '@wordpress/core-data'; const TEMPLATE = [ - [ 'core/post-comment-author' ], - [ 'core/post-comment-date' ], - [ 'core/post-comment-content' ], + [ 'core/comment-author-avatar' ], + [ 'core/comment-author-name' ], + [ 'core/comment-date' ], + [ 'core/comment-content' ], + [ 'core/comment-reply-link' ], + [ 'core/comment-edit-link' ], ]; function CommentTemplateInnerBlocks() { diff --git a/packages/block-library/src/index.js b/packages/block-library/src/index.js index 71ccb7a3dbbbc1..9fa3974ee275cc 100644 --- a/packages/block-library/src/index.js +++ b/packages/block-library/src/index.js @@ -22,6 +22,12 @@ import * as classic from './freeform'; import * as code from './code'; import * as column from './column'; import * as columns from './columns'; +import * as commentAuthorAvatar from './comment-author-avatar'; +import * as commentAuthorName from './comment-author-name'; +import * as commentContent from './comment-content'; +import * as commentDate from './comment-date'; +import * as commentEditLink from './comment-edit-link'; +import * as commentReplyLink from './comment-reply-link'; import * as commentTemplate from './comment-template'; import * as commentsQueryLoop from './comments-query-loop'; import * as cover from './cover'; @@ -49,12 +55,6 @@ import * as pageList from './page-list'; import * as paragraph from './paragraph'; import * as postAuthor from './post-author'; import * as postComment from './post-comment'; -import * as postCommentAuthor from './post-comment-author'; -import * as postCommentAuthorAvatar from './post-comment-author-avatar'; -import * as postCommentContent from './post-comment-content'; -import * as postCommentDate from './post-comment-date'; -import * as postCommentEdit from './post-comment-edit'; -import * as postCommentReplyLink from './post-comment-reply-link'; import * as postComments from './post-comments'; import * as postCommentsCount from './post-comments-count'; import * as postCommentsForm from './post-comments-form'; @@ -243,15 +243,15 @@ export const __experimentalRegisterExperimentalCoreBlocks = // Full Site Editing blocks. ...( enableFSEBlocks ? [ + commentAuthorAvatar, + commentAuthorName, + commentContent, + commentDate, + commentEditLink, + commentReplyLink, commentTemplate, commentsQueryLoop, postComment, - postCommentAuthor, - postCommentAuthorAvatar, - postCommentContent, - postCommentDate, - postCommentEdit, - postCommentReplyLink, postCommentsCount, postCommentsForm, postCommentsLink, diff --git a/packages/block-library/src/post-comment/edit.js b/packages/block-library/src/post-comment/edit.js index 5f747a4ec1d7da..e78ecd47bab160 100644 --- a/packages/block-library/src/post-comment/edit.js +++ b/packages/block-library/src/post-comment/edit.js @@ -8,15 +8,20 @@ import { blockDefault } from '@wordpress/icons'; import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor'; const ALLOWED_BLOCKS = [ - 'core/post-comment-content', - 'core/post-comment-author', - 'core/post-comment-date', - 'core/post-comment-reply-link', + 'core/comment-author-avatar', + 'core/comment-author-name', + 'core/comment-content', + 'core/comment-date', + 'core/comment-edit-link', + 'core/comment-reply-link', ]; const TEMPLATE = [ - [ 'core/post-comment-content' ], - [ 'core/post-comment-author' ], - [ 'core/post-comment-reply-link' ], + [ 'core/comment-author-avatar' ], + [ 'core/comment-author-name' ], + [ 'core/comment-date' ], + [ 'core/comment-content' ], + [ 'core/comment-reply-link' ], + [ 'core/comment-edit-link' ], ]; export default function Edit( { attributes: { commentId }, setAttributes } ) { diff --git a/packages/blocks/src/api/parser/convert-legacy-block.js b/packages/blocks/src/api/parser/convert-legacy-block.js index 36fe93c1db63fe..28cbd9af7268d0 100644 --- a/packages/blocks/src/api/parser/convert-legacy-block.js +++ b/packages/blocks/src/api/parser/convert-legacy-block.js @@ -55,5 +55,17 @@ export function convertLegacyBlockNameAndAttributes( name, attributes ) { name = 'core/post-template'; } + // Convert Post Comment blocks in existing content to Comment blocks. + // TODO: Remove these checks when WordPress 6.0 is released. + if ( name === 'core/post-comment-author' ) { + name = 'core/comment-author-name'; + } + if ( name === 'core/post-comment-content' ) { + name = 'core/comment-content'; + } + if ( name === 'core/post-comment-date' ) { + name = 'core/comment-date'; + } + return [ name, newAttributes ]; } diff --git a/packages/icons/CHANGELOG.md b/packages/icons/CHANGELOG.md index 7d5b88ceffbabb..a3db0d1fd5c1ab 100644 --- a/packages/icons/CHANGELOG.md +++ b/packages/icons/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### New Features + +- Added new block icons: `commentAuthorAvatar`, `commentAuthorName`, `commentContent` and `commentReplyLink` ([#36171](https://github.com/WordPress/gutenberg/pull/36171)). + ## 6.0.0 (2021-10-12) ### Breaking Change diff --git a/packages/icons/src/index.js b/packages/icons/src/index.js index 885edbd8d1fef5..7627038596b68a 100644 --- a/packages/icons/src/index.js +++ b/packages/icons/src/index.js @@ -49,8 +49,10 @@ export { default as color } from './library/color'; export { default as column } from './library/column'; export { default as columns } from './library/columns'; export { default as comment } from './library/comment'; -export { default as commentAuthor } from './library/comment-author'; -export { default as postCommentContent } from './library/post-comment-content'; +export { default as commentAuthorAvatar } from './library/comment-author-avatar'; +export { default as commentAuthorName } from './library/comment-author-name'; +export { default as commentContent } from './library/comment-content'; +export { default as commentReplyLink } from './library/comment-reply-link'; export { default as cover } from './library/cover'; export { default as create } from './library/create'; export { default as crop } from './library/crop'; @@ -152,9 +154,7 @@ export { default as plus } from './library/plus'; export { default as postAuthor } from './library/post-author'; export { default as postCategories } from './library/post-categories'; export { default as postContent } from './library/post-content'; -export { default as postCommentReplyLink } from './library/post-comment-reply-link'; export { default as postComments } from './library/post-comments'; -export { default as postCommentAuthorAvatar } from './library/post-comment-author-avatar'; export { default as postCommentsCount } from './library/post-comments-count'; export { default as postCommentsForm } from './library/post-comments-form'; export { default as postDate } from './library/post-date'; diff --git a/packages/icons/src/library/post-comment-author-avatar.js b/packages/icons/src/library/comment-author-avatar.js similarity index 92% rename from packages/icons/src/library/post-comment-author-avatar.js rename to packages/icons/src/library/comment-author-avatar.js index 87bf6ed8b1bb26..bb4324ce2ac587 100644 --- a/packages/icons/src/library/post-comment-author-avatar.js +++ b/packages/icons/src/library/comment-author-avatar.js @@ -3,7 +3,7 @@ */ import { Path, SVG } from '@wordpress/primitives'; -const postCommentAuthorAvatar = ( +const commentAuthorAvatar = ( ); -export default postCommentAuthorAvatar; +export default commentAuthorAvatar; diff --git a/packages/icons/src/library/comment-author.js b/packages/icons/src/library/comment-author-name.js similarity index 91% rename from packages/icons/src/library/comment-author.js rename to packages/icons/src/library/comment-author-name.js index 1d55d90a491a15..717004b5be44bd 100644 --- a/packages/icons/src/library/comment-author.js +++ b/packages/icons/src/library/comment-author-name.js @@ -3,7 +3,7 @@ */ import { SVG, Path, Circle } from '@wordpress/primitives'; -const commentAuthor = ( +const commentAuthorName = ( ); -export default commentAuthor; +export default commentAuthorName; diff --git a/packages/icons/src/library/post-comment-content.js b/packages/icons/src/library/comment-content.js similarity index 89% rename from packages/icons/src/library/post-comment-content.js rename to packages/icons/src/library/comment-content.js index 8140cc408f6830..39d14d462cc688 100644 --- a/packages/icons/src/library/post-comment-content.js +++ b/packages/icons/src/library/comment-content.js @@ -3,7 +3,7 @@ */ import { Path, SVG } from '@wordpress/primitives'; -const postCommentContent = ( +const commentContent = ( ); -export default postCommentContent; +export default commentContent; diff --git a/packages/icons/src/library/post-comment-reply-link.js b/packages/icons/src/library/comment-reply-link.js similarity index 93% rename from packages/icons/src/library/post-comment-reply-link.js rename to packages/icons/src/library/comment-reply-link.js index 551092c1312702..147478e33818cf 100644 --- a/packages/icons/src/library/post-comment-reply-link.js +++ b/packages/icons/src/library/comment-reply-link.js @@ -3,7 +3,7 @@ */ import { Path, SVG } from '@wordpress/primitives'; -const postCommentsReplyLink = ( +const commentReplyLink = ( ); -export default postCommentsReplyLink; +export default commentReplyLink; diff --git a/schemas/json/theme.json b/schemas/json/theme.json index be23207b901c6a..4bcb1452a56d88 100644 --- a/schemas/json/theme.json +++ b/schemas/json/theme.json @@ -343,6 +343,30 @@ "core/columns": { "$ref": "#/definitions/settingsPropertiesComplete" }, + "core/comment-author-name": { + "$ref": "#/definitions/settingsPropertiesComplete" + }, + "core/comment-author-avatar": { + "$ref": "#/definitions/settingsPropertiesComplete" + }, + "core/comment-content": { + "$ref": "#/definitions/settingsPropertiesComplete" + }, + "core/comment-date": { + "$ref": "#/definitions/settingsPropertiesComplete" + }, + "core/comment-edit-link": { + "$ref": "#/definitions/settingsPropertiesComplete" + }, + "core/comment-reply-link": { + "$ref": "#/definitions/settingsPropertiesComplete" + }, + "core/comment-template": { + "$ref": "#/definitions/settingsPropertiesComplete" + }, + "core/comments-query-loop": { + "$ref": "#/definitions/settingsPropertiesComplete" + }, "core/cover": { "$ref": "#/definitions/settingsPropertiesComplete" }, @@ -412,18 +436,6 @@ "core/post-author": { "$ref": "#/definitions/settingsPropertiesComplete" }, - "core/post-comment": { - "$ref": "#/definitions/settingsPropertiesComplete" - }, - "core/post-comment-author": { - "$ref": "#/definitions/settingsPropertiesComplete" - }, - "core/post-comment-content": { - "$ref": "#/definitions/settingsPropertiesComplete" - }, - "core/post-comment-date": { - "$ref": "#/definitions/settingsPropertiesComplete" - }, "core/post-comments": { "$ref": "#/definitions/settingsPropertiesComplete" }, @@ -788,6 +800,30 @@ "core/columns": { "$ref": "#/definitions/stylesPropertiesAndElementsComplete" }, + "core/comment-author-name": { + "$ref": "#/definitions/stylesPropertiesAndElementsComplete" + }, + "core/comment-author-avatar": { + "$ref": "#/definitions/stylesPropertiesAndElementsComplete" + }, + "core/comment-content": { + "$ref": "#/definitions/stylesPropertiesAndElementsComplete" + }, + "core/comment-date": { + "$ref": "#/definitions/stylesPropertiesAndElementsComplete" + }, + "core/comment-edit-link": { + "$ref": "#/definitions/stylesPropertiesAndElementsComplete" + }, + "core/comment-reply-link": { + "$ref": "#/definitions/stylesPropertiesAndElementsComplete" + }, + "core/comment-template": { + "$ref": "#/definitions/stylesPropertiesAndElementsComplete" + }, + "core/comments-query-loop": { + "$ref": "#/definitions/stylesPropertiesAndElementsComplete" + }, "core/cover": { "$ref": "#/definitions/stylesPropertiesAndElementsComplete" }, @@ -857,18 +893,6 @@ "core/post-author": { "$ref": "#/definitions/stylesPropertiesAndElementsComplete" }, - "core/post-comment": { - "$ref": "#/definitions/stylesPropertiesAndElementsComplete" - }, - "core/post-comment-author": { - "$ref": "#/definitions/stylesPropertiesAndElementsComplete" - }, - "core/post-comment-content": { - "$ref": "#/definitions/stylesPropertiesAndElementsComplete" - }, - "core/post-comment-date": { - "$ref": "#/definitions/stylesPropertiesAndElementsComplete" - }, "core/post-comments": { "$ref": "#/definitions/stylesPropertiesAndElementsComplete" }, diff --git a/test/integration/fixtures/blocks/core__comment-author-avatar.html b/test/integration/fixtures/blocks/core__comment-author-avatar.html new file mode 100644 index 00000000000000..dddb51a38c41a2 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-author-avatar.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-author-avatar.json b/test/integration/fixtures/blocks/core__comment-author-avatar.json similarity index 88% rename from test/integration/fixtures/blocks/core__post-comment-author-avatar.json rename to test/integration/fixtures/blocks/core__comment-author-avatar.json index e7cb1956cd568f..66ddca6fe0d6e6 100644 --- a/test/integration/fixtures/blocks/core__post-comment-author-avatar.json +++ b/test/integration/fixtures/blocks/core__comment-author-avatar.json @@ -1,7 +1,7 @@ [ { "clientId": "_clientId_0", - "name": "core/post-comment-author-avatar", + "name": "core/comment-author-avatar", "isValid": true, "attributes": { "width": 120, diff --git a/test/integration/fixtures/blocks/core__post-comment-author-avatar.parsed.json b/test/integration/fixtures/blocks/core__comment-author-avatar.parsed.json similarity index 86% rename from test/integration/fixtures/blocks/core__post-comment-author-avatar.parsed.json rename to test/integration/fixtures/blocks/core__comment-author-avatar.parsed.json index 52899f814b38e1..0e75e9b16f57a2 100644 --- a/test/integration/fixtures/blocks/core__post-comment-author-avatar.parsed.json +++ b/test/integration/fixtures/blocks/core__comment-author-avatar.parsed.json @@ -1,6 +1,6 @@ [ { - "blockName": "core/post-comment-author-avatar", + "blockName": "core/comment-author-avatar", "attrs": { "width": 120, "height": 120, diff --git a/test/integration/fixtures/blocks/core__comment-author-avatar.serialized.html b/test/integration/fixtures/blocks/core__comment-author-avatar.serialized.html new file mode 100644 index 00000000000000..0fe87aca2dd180 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-author-avatar.serialized.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__comment-author-name.html b/test/integration/fixtures/blocks/core__comment-author-name.html new file mode 100644 index 00000000000000..03090055078a7b --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-author-name.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-author.json b/test/integration/fixtures/blocks/core__comment-author-name.json similarity index 81% rename from test/integration/fixtures/blocks/core__post-comment-author.json rename to test/integration/fixtures/blocks/core__comment-author-name.json index 1418da92d5db65..c3c83df161d141 100644 --- a/test/integration/fixtures/blocks/core__post-comment-author.json +++ b/test/integration/fixtures/blocks/core__comment-author-name.json @@ -1,7 +1,7 @@ [ { "clientId": "_clientId_0", - "name": "core/post-comment-author", + "name": "core/comment-author-name", "isValid": true, "attributes": { "isLink": false, diff --git a/test/integration/fixtures/blocks/core__post-comment-author.parsed.json b/test/integration/fixtures/blocks/core__comment-author-name.parsed.json similarity index 66% rename from test/integration/fixtures/blocks/core__post-comment-author.parsed.json rename to test/integration/fixtures/blocks/core__comment-author-name.parsed.json index f4e12e37868eb8..4c5da0fa322a19 100644 --- a/test/integration/fixtures/blocks/core__post-comment-author.parsed.json +++ b/test/integration/fixtures/blocks/core__comment-author-name.parsed.json @@ -1,6 +1,6 @@ [ { - "blockName": "core/post-comment-author", + "blockName": "core/comment-author-name", "attrs": {}, "innerBlocks": [], "innerHTML": "", diff --git a/test/integration/fixtures/blocks/core__comment-author-name.serialized.html b/test/integration/fixtures/blocks/core__comment-author-name.serialized.html new file mode 100644 index 00000000000000..03090055078a7b --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-author-name.serialized.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.html b/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.html new file mode 100644 index 00000000000000..3698bdb1039d07 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.json b/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.json similarity index 84% rename from test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.json rename to test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.json index bf632aac0e092d..87177bbffe6406 100644 --- a/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.json +++ b/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.json @@ -1,7 +1,7 @@ [ { "clientId": "_clientId_0", - "name": "core/post-comment-author", + "name": "core/comment-author-name", "isValid": true, "attributes": { "isLink": false, diff --git a/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.parsed.json b/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.parsed.json similarity index 81% rename from test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.parsed.json rename to test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.parsed.json index 6948700ab3c0a9..57e8940029edbd 100644 --- a/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.parsed.json +++ b/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.parsed.json @@ -1,6 +1,6 @@ [ { - "blockName": "core/post-comment-author", + "blockName": "core/comment-author-name", "attrs": { "style": { "typography": { diff --git a/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.serialized.html b/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.serialized.html new file mode 100644 index 00000000000000..732bcce77f5d00 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-author-name__deprecated-v1.serialized.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__comment-content.html b/test/integration/fixtures/blocks/core__comment-content.html new file mode 100644 index 00000000000000..3b082d2d4d01e7 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-content.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-content.json b/test/integration/fixtures/blocks/core__comment-content.json similarity index 75% rename from test/integration/fixtures/blocks/core__post-comment-content.json rename to test/integration/fixtures/blocks/core__comment-content.json index 6b43772d7feeea..a4a1e4d0a8f7bc 100644 --- a/test/integration/fixtures/blocks/core__post-comment-content.json +++ b/test/integration/fixtures/blocks/core__comment-content.json @@ -1,7 +1,7 @@ [ { "clientId": "_clientId_0", - "name": "core/post-comment-content", + "name": "core/comment-content", "isValid": true, "attributes": {}, "innerBlocks": [], diff --git a/test/integration/fixtures/blocks/core__post-comment-date.parsed.json b/test/integration/fixtures/blocks/core__comment-content.parsed.json similarity index 67% rename from test/integration/fixtures/blocks/core__post-comment-date.parsed.json rename to test/integration/fixtures/blocks/core__comment-content.parsed.json index 709870154517cf..98940c432a7137 100644 --- a/test/integration/fixtures/blocks/core__post-comment-date.parsed.json +++ b/test/integration/fixtures/blocks/core__comment-content.parsed.json @@ -1,6 +1,6 @@ [ { - "blockName": "core/post-comment-date", + "blockName": "core/comment-content", "attrs": {}, "innerBlocks": [], "innerHTML": "", diff --git a/test/integration/fixtures/blocks/core__comment-content.serialized.html b/test/integration/fixtures/blocks/core__comment-content.serialized.html new file mode 100644 index 00000000000000..3b082d2d4d01e7 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-content.serialized.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__comment-date.html b/test/integration/fixtures/blocks/core__comment-date.html new file mode 100644 index 00000000000000..eb8b93bdb4a09a --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-date.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-date.json b/test/integration/fixtures/blocks/core__comment-date.json similarity index 80% rename from test/integration/fixtures/blocks/core__post-comment-date.json rename to test/integration/fixtures/blocks/core__comment-date.json index 3bce3436fe805d..746e1537b3a488 100644 --- a/test/integration/fixtures/blocks/core__post-comment-date.json +++ b/test/integration/fixtures/blocks/core__comment-date.json @@ -1,7 +1,7 @@ [ { "clientId": "_clientId_0", - "name": "core/post-comment-date", + "name": "core/comment-date", "isValid": true, "attributes": { "isLink": false diff --git a/test/integration/fixtures/blocks/core__post-comment-content.parsed.json b/test/integration/fixtures/blocks/core__comment-date.parsed.json similarity index 66% rename from test/integration/fixtures/blocks/core__post-comment-content.parsed.json rename to test/integration/fixtures/blocks/core__comment-date.parsed.json index 8b8929e3b2af0a..14bde10ccee92c 100644 --- a/test/integration/fixtures/blocks/core__post-comment-content.parsed.json +++ b/test/integration/fixtures/blocks/core__comment-date.parsed.json @@ -1,6 +1,6 @@ [ { - "blockName": "core/post-comment-content", + "blockName": "core/comment-date", "attrs": {}, "innerBlocks": [], "innerHTML": "", diff --git a/test/integration/fixtures/blocks/core__comment-date.serialized.html b/test/integration/fixtures/blocks/core__comment-date.serialized.html new file mode 100644 index 00000000000000..eb8b93bdb4a09a --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-date.serialized.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.html b/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.html new file mode 100644 index 00000000000000..e6f5e3c7b9426d --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.json b/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.json similarity index 83% rename from test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.json rename to test/integration/fixtures/blocks/core__comment-date__deprecated-v1.json index 4c36aac77826dd..bff4c1067c2b7b 100644 --- a/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.json +++ b/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.json @@ -1,7 +1,7 @@ [ { "clientId": "_clientId_0", - "name": "core/post-comment-date", + "name": "core/comment-date", "isValid": true, "attributes": { "isLink": false, diff --git a/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.parsed.json b/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.parsed.json similarity index 82% rename from test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.parsed.json rename to test/integration/fixtures/blocks/core__comment-date__deprecated-v1.parsed.json index 3c83c9b5f5237c..36c8d4adc663e9 100644 --- a/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.parsed.json +++ b/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.parsed.json @@ -1,6 +1,6 @@ [ { - "blockName": "core/post-comment-date", + "blockName": "core/comment-date", "attrs": { "style": { "typography": { diff --git a/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.serialized.html b/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.serialized.html new file mode 100644 index 00000000000000..10708571d8fdb4 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-date__deprecated-v1.serialized.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-edit.html b/test/integration/fixtures/blocks/core__comment-edit-link.html similarity index 80% rename from test/integration/fixtures/blocks/core__post-comment-edit.html rename to test/integration/fixtures/blocks/core__comment-edit-link.html index 48e9c7c4034661..205ebecb0e989b 100644 --- a/test/integration/fixtures/blocks/core__post-comment-edit.html +++ b/test/integration/fixtures/blocks/core__comment-edit-link.html @@ -1 +1 @@ - + diff --git a/test/integration/fixtures/blocks/core__post-comment-edit.json b/test/integration/fixtures/blocks/core__comment-edit-link.json similarity index 93% rename from test/integration/fixtures/blocks/core__post-comment-edit.json rename to test/integration/fixtures/blocks/core__comment-edit-link.json index fae0501ba14c16..d0f0923f6345de 100644 --- a/test/integration/fixtures/blocks/core__post-comment-edit.json +++ b/test/integration/fixtures/blocks/core__comment-edit-link.json @@ -1,7 +1,7 @@ [ { "clientId": "_clientId_0", - "name": "core/post-comment-edit", + "name": "core/comment-edit-link", "isValid": true, "attributes": { "linkTarget": "_blank", diff --git a/test/integration/fixtures/blocks/core__post-comment-edit.parsed.json b/test/integration/fixtures/blocks/core__comment-edit-link.parsed.json similarity index 92% rename from test/integration/fixtures/blocks/core__post-comment-edit.parsed.json rename to test/integration/fixtures/blocks/core__comment-edit-link.parsed.json index dfa7123204e54f..835826a8ddd120 100644 --- a/test/integration/fixtures/blocks/core__post-comment-edit.parsed.json +++ b/test/integration/fixtures/blocks/core__comment-edit-link.parsed.json @@ -1,6 +1,6 @@ [ { - "blockName": "core/post-comment-edit", + "blockName": "core/comment-edit-link", "attrs": { "linkTarget": "_blank", "style": { diff --git a/test/integration/fixtures/blocks/core__post-comment-edit.serialized.html b/test/integration/fixtures/blocks/core__comment-edit-link.serialized.html similarity index 80% rename from test/integration/fixtures/blocks/core__post-comment-edit.serialized.html rename to test/integration/fixtures/blocks/core__comment-edit-link.serialized.html index 156b45b00efdfa..8492ea9b93dab1 100644 --- a/test/integration/fixtures/blocks/core__post-comment-edit.serialized.html +++ b/test/integration/fixtures/blocks/core__comment-edit-link.serialized.html @@ -1 +1 @@ - + diff --git a/test/integration/fixtures/blocks/core__comment-reply-link.html b/test/integration/fixtures/blocks/core__comment-reply-link.html new file mode 100644 index 00000000000000..cd727e9ee85f90 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-reply-link.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-reply-link.json b/test/integration/fixtures/blocks/core__comment-reply-link.json similarity index 92% rename from test/integration/fixtures/blocks/core__post-comment-reply-link.json rename to test/integration/fixtures/blocks/core__comment-reply-link.json index 197e2489561b3c..aa7e264df94240 100644 --- a/test/integration/fixtures/blocks/core__post-comment-reply-link.json +++ b/test/integration/fixtures/blocks/core__comment-reply-link.json @@ -1,7 +1,7 @@ [ { "clientId": "_clientId_0", - "name": "core/post-comment-reply-link", + "name": "core/comment-reply-link", "isValid": true, "attributes": { "textAlign": "right", diff --git a/test/integration/fixtures/blocks/core__post-comment-reply-link.parsed.json b/test/integration/fixtures/blocks/core__comment-reply-link.parsed.json similarity index 91% rename from test/integration/fixtures/blocks/core__post-comment-reply-link.parsed.json rename to test/integration/fixtures/blocks/core__comment-reply-link.parsed.json index 5e34e1feefb75e..80572b28494087 100644 --- a/test/integration/fixtures/blocks/core__post-comment-reply-link.parsed.json +++ b/test/integration/fixtures/blocks/core__comment-reply-link.parsed.json @@ -1,6 +1,6 @@ [ { - "blockName": "core/post-comment-reply-link", + "blockName": "core/comment-reply-link", "attrs": { "textAlign": "right", "style": { diff --git a/test/integration/fixtures/blocks/core__comment-reply-link.serialized.html b/test/integration/fixtures/blocks/core__comment-reply-link.serialized.html new file mode 100644 index 00000000000000..5f90cd2be65cb9 --- /dev/null +++ b/test/integration/fixtures/blocks/core__comment-reply-link.serialized.html @@ -0,0 +1 @@ + diff --git a/test/integration/fixtures/blocks/core__post-comment-author-avatar.html b/test/integration/fixtures/blocks/core__post-comment-author-avatar.html deleted file mode 100644 index bed05ba0a3ab94..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-author-avatar.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-author-avatar.serialized.html b/test/integration/fixtures/blocks/core__post-comment-author-avatar.serialized.html deleted file mode 100644 index 1d6f41053cb166..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-author-avatar.serialized.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-author.html b/test/integration/fixtures/blocks/core__post-comment-author.html deleted file mode 100644 index 44b1948b99d105..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-author.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-author.serialized.html b/test/integration/fixtures/blocks/core__post-comment-author.serialized.html deleted file mode 100644 index 44b1948b99d105..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-author.serialized.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.html b/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.html deleted file mode 100644 index fc634546cb41bb..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.serialized.html b/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.serialized.html deleted file mode 100644 index 0812a689f93d10..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-author__deprecated-v1.serialized.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-content.html b/test/integration/fixtures/blocks/core__post-comment-content.html deleted file mode 100644 index 992fe61e3614f0..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-content.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-content.serialized.html b/test/integration/fixtures/blocks/core__post-comment-content.serialized.html deleted file mode 100644 index 992fe61e3614f0..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-content.serialized.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-date.html b/test/integration/fixtures/blocks/core__post-comment-date.html deleted file mode 100644 index cd049fd7742d86..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-date.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-date.serialized.html b/test/integration/fixtures/blocks/core__post-comment-date.serialized.html deleted file mode 100644 index cd049fd7742d86..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-date.serialized.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.html b/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.html deleted file mode 100644 index aacddd134a90e9..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.serialized.html b/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.serialized.html deleted file mode 100644 index ce86c427a78291..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-date__deprecated-v1.serialized.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-reply-link.html b/test/integration/fixtures/blocks/core__post-comment-reply-link.html deleted file mode 100644 index af837d2e3e353e..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-reply-link.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test/integration/fixtures/blocks/core__post-comment-reply-link.serialized.html b/test/integration/fixtures/blocks/core__post-comment-reply-link.serialized.html deleted file mode 100644 index 8e6c147336d66a..00000000000000 --- a/test/integration/fixtures/blocks/core__post-comment-reply-link.serialized.html +++ /dev/null @@ -1 +0,0 @@ -