Problem/Motivation

Currently the Block items are getting reorganized in the administration menu. Instead of opening a new issue @smulvih2 and I agreed to rescope this issue, which was initially about the same goal, but tried to accomplish that solely in admin_toolbar (the problems see in #8 and #9). The changes introduced with #3318110: [meta] Reorganize Block items in the administration menu will definitely require adjustments for admin_toolbar. Issue identified so far are:

for #2987964: Move custom block types admin link to admin/structure: the menu item custom block types got renamed to block types and moved one level up the hierarchy so it is on the same level like block layout, content types, media types and so on. but under block layouts there is still another menu item block types.

for #2862564: Move Custom block library to Content: on /admin/content the Blocks tab is placed between content and Comments but in admin toolbar custom blocks is placed between comments and files.

Proposed resolution

The issue is set to postponed until the moving and renaming issues in Core are landed otherwise it might lead to unnecessary extra work. I will keep the list of identified issues up to date along the way.

Remaining tasks

User interface changes

API changes

Data model changes

Original report by @smulvih2

Currently all block_content links are added under Structure, see image below:

Block links under staructure

Feedback on current links added under Structure:

  • Add custom block - this is content and not structure, so should be nested under Content
  • Block types - keep this menu item where it is since it is Structure, remove this link if drupal/block_content_permissions module is enabled since it provides a more granular menu structure for this.
  • Custom block library - this is content similar to the Content overview page, should not be under Structure

Here is what I propose for the block_content links:

New block_content links

New links:

  • Blocks - goes to the blocks overview page that lists all custom blocks
  • Add block - goes to the page that lists links to add blocks of different types
  • List all of the available block_content_type under Add block
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

smulvih2 created an issue. See original summary.

smulvih2’s picture

Status: Active » Needs review
StatusFileSize
new2.04 KB

Patch to implement changes to block links.

lbonfioli made their first commit to this issue’s fork.

lbonfioli’s picture

Assigned: Unassigned » lbonfioli
lbonfioli’s picture

Assigned: lbonfioli » Unassigned
Status: Needs review » Reviewed & tested by the community

Hello, good job @smulvih2, I've tested and the toolbar is working as intended; moving to RTBC.

smulvih2’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.38 KB

I realized I made this patch when I had the drupal/block_content_permissions module enabled, which provides a replacement for the entity.block_content_type.collection route link. This means my patch above, when used without drupal/block_content_permissions, removes the Block types UI link.

New patch checks for the drupal/block_content_permissions module, and if not enabled will include this link. If the drupal/block_content_permissions module is enabled it provides a better menu structure for this link as it also includes the ability to drill down into the sub-options like Manage fields, Manage form display, etc...

smulvih2’s picture

Issue summary: View changes
rkoller’s picture

I've applied the patch and taken a look. Unfortunately the approach has one fundamental flaw. If you click in the admin toolbar on content->blocks then the path of the page you are directed to shows /admin/structure/block/block-content and its breadcrumb home > administration > structure > block layout. Meaning the user is first in the top level menu item /admin/content but the page the user ends up is under /admin/structure. that is a potential source for confusion.
If you go to block types in the admin toolbar menu the second level nav item next to block types on the left is also blocks. it points to the same page you get to when clicking blocks under content. so two different menu items in two different sections (content & structure) pointing to the very same page.

In general I completely agree with the need and the effort to solve the problem caused by the current representation of blocks under the top level menu item structure. But I think that the problem should better be solved in Core. There are actually two issues that got momentum again two or three days ago, thanks to @smustgrave, solving that exact problem.

When I was taking a look at the current state of those issues one of the problems was that there were some discrepancies with menu items that admin_toolbar probably hasn't created dynamically and therefore there was a disconnect with the changes the patches introduced.

for #2987964: Move custom block types admin link to admin/structure: the menu item custom block types got renamed to block types and moved one level up the hierarchy so it is on the same level like block layout, content types, media types and so on. but under block layouts there is still another menu item block types.

for #2862564: Move Custom block library to Content:the custom block library got moved over to content. in yesterdays ux meeting #3316853: Drupal Usability Meeting 2022-10-28 there was also the idea and discussion to change the naming of custom block library and custom blocks (that isn't reflected in #2862564: Move Custom block library to Content yet). on /admin/content the custom blocks tab is placed between content and comments. but in admin toolbar custom blocks is placed between comments and files.

there was an agreement to open an issue about the matter in the admin_toolbar issue queue. @smustgrave suggested to open an issue and postpone it until the two issues are landed in Core. so i went into the admin_toolbar issue queue tonight. that's where i've noticed the issue here.

The question now is how you would like to proceed? Would you prefer that i open a new issue for the necessary changes those linked issues in Core entail and let credits be moved over from this issue, or better rescope this issue or go with another option you would have in mind? Just wanted to avoid double work for anyone involved nor make any decisions over anyones head.

smulvih2’s picture

@rkoller thanks for linking to the core issues and your summary! I did realize after testing my patch that the routes are still /admin/structure/* which requires a core change to align with changes in this ticket. I'm in favor of re-scoping this issue and it being dependent on core changes in the linked issues.

smulvih2’s picture

rkoller’s picture

Thanks @smulvih2! I'll remove the related issue and set the issue as child of the overall meta issue reorganizing the block items in the administration theme. cuz the admin_toolbar issue not only applies to the "moving the custom block library to content" but also to "block types" and "block layout". making it the child of the meta would cover everything.

Aside that i think the title would have to reworded to reflect the new scope as well as an update to the issue summary is need. for the moment i would say to add the two paragraphs from #8 to the proposed resolution section with the note that it might entail more changes as soon as the the move of block layout gets implemented as well.

and i am not sure about the correct form. but if an issue gets postponed blocked by one or more other issues would it have [P-1] prepended?

rkoller’s picture

Title: Seperate block content and config » [P-5] Adjust to the changes introduced reorganizing Block items in the administration menu
Issue summary: View changes
Status: Needs review » Postponed
Issue tags: +Usability
aaronmchale’s picture

Title: [P-5] Adjust to the changes introduced reorganizing Block items in the administration menu » [PP-2] Adjust to the changes introduced reorganizing Block items in the administration menu
rkoller’s picture

thanks for updating the issue aaron! this issue has definitely to be placed after #3318549: Rename Custom Block terminology in the admin UI until the micro copy (and the h1s in particular) is agreed on. i was already thinking about adding an update to the issue here yesterday after the "moving the block library to content" issue has landed but i have struggled picking the right PP level. but it feels like PP-2 is the correct pick.

aaronmchale’s picture

Thanks @rkoller. In terms of the "PP-X" level, the way I approach it is it should be the number of issues that this issue is directly postponed on, in this case 2 issues, even though one of them is postponed on another issue that doesn't really matter for this issue, otherwise it just ends up being a bit hard to track what is postponed on what.

rkoller’s picture

Just a heads up. The first alpha of Drupal 10.1 is getting close (scheduled for the 24th of april). The last two issues (#3318112: [PP1] Move "Block layout" from Structure to Appearance & #3318549: Rename Custom Block terminology in the admin UI) currently blocking this issue should hopefully getting finalized and being committed in the upcoming days.

rkoller’s picture

Title: [PP-2] Adjust to the changes introduced reorganizing Block items in the administration menu » [PP-1] Adjust to the changes introduced reorganizing Block items in the administration menu

#3318549: Rename Custom Block terminology in the admin UI got in today so only one blocking issue left.

rkoller’s picture

We might already start discussing how to approach the necessary changes. how about the following.

Content:
the cleanest option might be like already suggested in the issue summary
https://www.drupal.org/files/issues/2022-10-26/Screenshot%20from%202022-...
it just looks odd having a single menu item under blocks and then under that several block types (depending on the number of block types created). the only
necessary change to the screenshot, the label for the add menu item shouldnt be Add custom block but Add content block.

Structure:
the menu item block types under structure is already displayed correctly. the only detail i would suggest to change is adding a Add block type menu item that the available options are consistent with for example content types.

Appearance:
at the moment the block layout menu item under appearance still has the add custom block, block types, and custom block library submenu items. removing those three would be the logical step. but i wonder if it would make sense to make the secondary nav tabs for block layout available as menu items instead like done for the settings menu item under appearance.
the only problem, for settings there is the default global settings tab that is reached when the parent settings menu item is clicked while you see the child menu items for claro and olivero. but for block layout you would reach olivero when clicking block layout menu item and you would only have claro as the sole child menu item. sort of suboptimal. :/

rkoller’s picture

Title: [PP-1] Adjust to the changes introduced reorganizing Block items in the administration menu » Adjust to the changes introduced reorganizing Block items in the administration menu
Status: Postponed » Needs work

I am moving this issue to Needs work now. Drupal 10.1 RC1 is out and #3318112: [PP1] Move "Block layout" from Structure to Appearance got postponed on #2755613: Restructure the admin interface Information Architecture today after it was hanging in RTBC for quite a while. That way this issue should focus only on the first two points in #18 (with a small addition for the point about structure i've missed before):

Content:
the cleanest option might be like already suggested in the issue summary
https://www.drupal.org/files/issues/2022-10-26/Screenshot%20from%202022-...
it just looks odd having a single menu item under blocks and then under that several block types (depending on the number of block types created). the only
necessary change to the screenshot, the label for the add menu item shouldnt be Add custom block but Add content block.

Structure:

  • The menu item block types under structure is already displayed correctly. the only detail i would suggest to change is adding a Add block type menu item that the available options are consistent with for example content types.
  • The sub menu items for the menu item Block Layout under structure would have to be removed.

In regards of the Block Layout move a new issue could be opened as soon as there is a final consensus about the new location.

neclimdul’s picture

StatusFileSize
new6.54 KB

" the label for the add menu item shouldnt be Add custom block but Add content block."
The text is actually just "Blocks."

At least this one is easy. The text mentioned is in the module currently and being removed.
This is the new layout in the patch:

j.’s picture

Patch from #6 is really helpful. I though i was loosing my mind because i couldn't find these "new links" after the changes in 10.1 Thank you!

bwaindwain’s picture

Prashant.c made their first commit to this issue’s fork.

prashant.c’s picture

Applied changes from #6 to the fork.

The branch has some JS issues like $(...).once is not a functionwhich is causing the "Admin Toolbar quick search" to stop working, tested on Drupal 10.1.7.

japerry’s picture

Status: Needs work » Closed (outdated)