Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nadavoid’s picture

Patch attached that updates comments and labels.

The phrase "custom block" was used differently in several places, so some wording that was updated to "block content" may still need to be adjusted. I've also attached a word diff with more context, to make it easier to review.

Here's the change overview:

 core/modules/block_content/block_content.info.yml                                       |  4 ++--
 core/modules/block_content/block_content.links.action.yml                               |  4 ++--
 core/modules/block_content/block_content.links.task.yml                                 |  4 ++--
 core/modules/block_content/block_content.module                                         | 14 +++++++-------
 core/modules/block_content/block_content.pages.inc                                      |  4 ++--
 core/modules/block_content/block_content.routing.yml                                    |  4 ++--
 core/modules/block_content/config/schema/block_content.schema.yml                       |  4 ++--
 core/modules/block_content/src/BlockContentAccessControlHandler.php                     |  2 +-
 core/modules/block_content/src/BlockContentForm.php                                     | 12 ++++++------
 core/modules/block_content/src/BlockContentInterface.php                                | 12 ++++++------
 core/modules/block_content/src/BlockContentListBuilder.php                              |  2 +-
 core/modules/block_content/src/BlockContentTranslationHandler.php                       |  2 +-
 core/modules/block_content/src/BlockContentTypeForm.php                                 |  8 ++++----
 core/modules/block_content/src/BlockContentTypeInterface.php                            |  2 +-
 core/modules/block_content/src/BlockContentTypeListBuilder.php                          |  4 ++--
 core/modules/block_content/src/BlockContentViewBuilder.php                              |  6 +++---
 core/modules/block_content/src/Controller/BlockContentController.php                    | 24 ++++++++++++------------
 core/modules/block_content/src/Entity/BlockContent.php                                  | 22 +++++++++++-----------
 core/modules/block_content/src/Entity/BlockContentType.php                              | 10 +++++-----
 core/modules/block_content/src/Form/BlockContentDeleteForm.php                          |  6 +++---
 core/modules/block_content/src/Form/BlockContentTypeDeleteForm.php                      |  8 ++++----
 core/modules/block_content/src/Plugin/Block/BlockContentBlock.php                       | 14 +++++++-------
 core/modules/block_content/src/Plugin/Derivative/BlockContent.php                       |  2 +-
 core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php   |  6 +++---
 core/modules/block_content/src/Tests/BlockContentCacheTagsTest.php                      |  4 ++--
 core/modules/block_content/src/Tests/BlockContentCreationTest.php                       | 12 ++++++------
 core/modules/block_content/src/Tests/BlockContentListTest.php                           | 14 +++++++-------
 core/modules/block_content/src/Tests/BlockContentSaveTest.php                           | 10 +++++-----
 core/modules/block_content/src/Tests/BlockContentTestBase.php                           |  8 ++++----
 core/modules/block_content/src/Tests/BlockContentTranslationUITest.php                  |  4 ++--
 core/modules/block_content/src/Tests/BlockContentTypeTest.php                           | 14 +++++++-------
 core/modules/block_content/src/Tests/PageEditTest.php                                   |  2 +-
 core/modules/block_content/templates/block-content-add-list.html.twig                   |  6 +++---
 core/modules/block_content/tests/modules/block_content_test/block_content_test.info.yml |  4 ++--
 core/modules/block_content/tests/modules/block_content_test/block_content_test.module   |  4 ++--
 35 files changed, 131 insertions(+), 131 deletions(-)
nadavoid’s picture

Status: Needs work » Needs review
nadavoid’s picture

Issue tags: +Needs usability review

Here are some initial examples, for review. Since the word "custom" was dropped from the module, one of the main things in the other language is to remove the word custom and at least start the phrase with the word "block."

+++ b/core/modules/block_content/block_content.links.action.yml
@@ -1,12 +1,12 @@
 block_content_type_add:
   route_name: block_content.type_add
-  title: 'Add custom block type'
+  title: 'Add block content type'
   appears_on:
     - block_content.type_list
 
 block_content_add_action:
   route_name: block_content.add_page
-  title: 'Add custom block'
+  title: 'Add block content'
   appears_on:
     - block.admin_display
     - block.admin_display_theme

+++ b/core/modules/block_content/block_content.links.task.yml
@@ -1,5 +1,5 @@
 block_content.list:
-  title: 'Custom block library'
+  title: 'Block content library'
   route_name: block_content.list
   base_route: block.admin_display

+++ b/core/modules/block_content/block_content.routing.yml
@@ -10,7 +10,7 @@ block_content.add_page:
   path: '/block/add'
   defaults:
     _content: '\Drupal\block_content\Controller\BlockContentController::add'
-    _title: 'Add custom block'
+    _title: 'Add block content'
   options:
     _admin_route: TRUE
   requirements:

Status: Needs review » Needs work

The last submitted patch, 1: update_entity_labels-2371313-1.patch, failed testing.

nadavoid’s picture

FileSize
0 bytes

This should fix the failed test.

nadavoid’s picture

Status: Needs work » Needs review
rpayanm’s picture

Status: Needs review » Needs work

@nadavoid you last patch is 0 byte :(

Bojhan’s picture

Could you explain to me why we are changing these labels? API change is not really an argument, since we don't have to name API and UI labels the same - this is an established practice within core.

nadavoid’s picture

Status: Needs work » Needs review
FileSize
52.75 KB
tim.plunkett’s picture

FileSize
218.19 KB

@Bojhan, the original motivation for this issue was confusion in dropdowns when "Block" and "Custom block type" are nowhere near each other, compared to how it would be if it was "Block" and "Block content type"

nadavoid’s picture

The origin of this change was that after creating a custom block type and then a block from that new block type, I went to the single export page and was confused about how to export the new block type. At first I thought the block type option was missing, but Tim Plunkett pointed out that it's "Custom Content Blocks." My confusion was only because I was expecting all Block exports to be adjacent to each other, starting with the word "Block." Tim pointed out that since the entity type had been renamed from custom block to block content, and that following that up by updating labels and comments would clarify the list that I was originally looking at. It would also improve consistency between user-facing labels and corresponding machine names.

So that's the background and the reason. Whether it's entirely a good thing or needed or how far to take it is what I would like feedback on. It's good to know now that it's an established practice in drupal core to name UI labels sometimes slightly differently from API names. (although this sometimes leads to confusion) Now that I know the proper thing to select when exporting individual blocks and block types, my immediate issue is resolved. So perhaps the label aspect of this could be considered a training issue on my part.

nadavoid’s picture

Thanks for the screen shot Tim. :)

jhodgdon’s picture

So the reason for changing all of these labels is just for the Config export? That doesn't seem like a really great idea to me, because I think in most or all other contexts, people probably think of these entities as "custom blocks", not "block content". Most people will probably never be exporting or importing config for these anyway... it seems like you're throwing out an intuitive label in favor of a less intuitive label, for a developer edge case.

tim.plunkett’s picture

No, that was not the entire reason. That was an example that I could screenshot easily to demonstrate the confusion.

"Custom blocks" is very misleading in D8, because of the two-step nature of blocks. There was a lot of thought put into the new name of "block content" and "block content type", because that's what they are.

jhodgdon’s picture

I guess some before/after screen shots of where all these changes appear in the UI would be helpful. Presumably that would help the Usability team evaluate whether the changes all make sense in context.

saltednut’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The last submitted patch, 9: update_entity_labels-2371313-9.patch, failed testing.

saltednut’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
57.09 KB
saltednut’s picture

saltednut’s picture

Bojhan’s picture

Did we update on the latest thinking around this?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)

Wondering if this is still needed know it's been several years.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

So rechecked 11.x and not seeing custom block phrase being used. So think this is probably old.