Problem/Motivation
The Block Layout page is for site-building tasks. Any configuration there is exported in the configuration management.
But the Custom block library page is a page to create and edit content. Administrators on a production website need to be able to edit this content - but usually they should not be able to change block layout etc at the same time.
There already is an issue to provide more granular block permissions, or at least a separate permission that only allows to edit an existing block (#1975064: Add more granular block content permissions and #2809291: Add "edit block $type" permissions). This would solve part of the problem because users then can't break the site.
However, users still require access to the whole Structure and Configuration part of the site to navigate to the Custom block library tab on the Block layout page.
Proposed resolution
- Make the list of "custom" blocks a local task (tab) on the Content page (
/admin/content
), not Block layout (/admin/structure/block
). - Change the path from
/admin/structure/block/block-content
to/admin/content/block-content
. This affects breadcrumbs. - Change the page and tab titles from "Custom block library" to "Custom blocks".
- Change the "empty" text from "There are no custom blocks available." to "No custom blocks available."
- Update help text (
hook_help()
and Help Topics). - Update tests for the changed paths and interface text.
Some related issues:
- #2987964: Move custom block types admin link to admin/structure is already done. The "Custom block types" page used to be a child of this one.
- #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" is not a hard-block for this issue, but several participants would like to see it completed alongside this issue.
- #3318112: [PP1] Move "Block layout" from Structure to Appearance is the last sibling issue for rearranging pages (paths, local tasks, and menu links).
- There are sibling issues to consider further changes to interface text (page titles, menu links, etc.).
Remaining tasks
Confirm whether #2987964: Move custom block types admin link to admin/structure is a blocker for this issue.Review the patch in #2862564-83: Move Custom block library to Content.Update the change record.Get project manager review or decide that it is not needed.Updatehook_help()
and Help Topics.Add "before and after" screenshots to the "User interface changes" section just below.Postponed on #3333383: Create a redirect for the new Block types path: once that issue is fixed, implement a similar redirect for this issue. See Comment #131.
User interface changes
Update the help text on the following pages:
/admin/help/block_content
/admin/help/topic/block.overview
/admin/help/topic/block_content.add
Parent page
These screenshots show the parent page, with the Administration menu, path, breadcrumbs, and local tasks (tabs).
Before
After
Child page
These screenshots show the child page (list of custom blocks), with the Administration menu, path, breadcrumbs, and other local tasks (tabs).
Before
After
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#157 | jyDc9mR1kIlDW.gif | 189.21 KB | larowlan |
#155 | Screenshot from 2023-02-22 08-08-05.png | 181.92 KB | larowlan |
#155 | Screenshot from 2023-02-22 08-07-32.png | 323.28 KB | larowlan |
#155 | Screenshot from 2023-02-22 08-07-20.png | 265.08 KB | larowlan |
#155 | Screenshot from 2023-02-22 08-06-09.png | 226.24 KB | larowlan |
Issue fork drupal-2862564
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
Comment #2
ifrikI'll work on this during DevDays.
Comment #3
larowlanBe sure to check in with yoroy first, as this is a Ux thing
Comment #4
yoroy CreditAttribution: yoroy at Roy Scholten commentedWe did :)
Comment #5
gambryThis is not an new feature. With D7 Bean module you create block types from Structure and create/add instances from Content menu.
May be using the same menu items labels as well could help?
Comment #6
rachel_norfolkWe need a whiteboard and catchup to decide what goes where exactly. I like the bean thing above, though.
Comment #7
ifrikHere's a first attempt to see how that could work.
There are in fact two Custom block libraries: the one provided by the module (and included in its links.task.yml file); the other one is an optional view provided if the Views module is enabled. That's the nicer one with a search filter.
At the moment the "Custom block library" link on the Block types page, links to the library as provided by the module, not to the correctly placed View on the Content page. So that would still need fixing. The view page also misses the action button to create a new Custom block.
As pointed out previously: The Content page (basically a View of content type content) will be filling up with tabs fast this way. If we want to go there, we need to think of a differently structured top-level page for all content.
Comment #8
rachel_norfolkNot sure why the diff is showing "+ngcode" is that weird?
Comment #9
ifrikOkay, fixed the duplication of the two Custom Block Libraries.
For now the Custom Block Library does not show up as tab on the Content page, but the rest works.
Comment #10
ifrikI fixed the missing characters in the view yml file as mentioned in #6.
Comment #14
ifrikNew version of the patch, but it still needs an update path to update the View Custom block library (block_content).
Comment #16
LendudeHere is an update path for this.
Comment #18
yoroy CreditAttribution: yoroy at Roy Scholten commentedComment #19
benjifisherComment #20
Chris Burge CreditAttribution: Chris Burge commentedI agree with the need for this. I just completed user training on my first Drupal 8 site and got comments like this:
"Where are the blocks again?"
"If custom blocks are content, then why aren't they just under content? Why are they buried in another part of the site?"
Comment #21
yoroy CreditAttribution: yoroy at Roy Scholten commentedThanks for that feedback @Chris Burge. Lets do this.
Comment #24
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedI think this is a great idea.
Rerolling #16, please check the diff as there was a conflit I had to manually fix on
block_content/block_content.routing.yml
Comment #25
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedHere is the update path test.
Comment #27
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedFixing some failing tests...
Comment #28
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedThis made me realize that when you go to configure the fields for a block type, the path no longer makes sense.
Comment #30
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedAlso, the block tab is not showing up yet.
Comment #31
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedI wonder if this has anything to do with #30 #2804195: Views does not create parent local task for a default local task
Comment #33
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedThis should fix the last failing test.
Comment #34
jibranComment #35
amjad1233Hi,
I have created a patch for it to be moved to the Content Area.
In my opinion it totally make sense having "Content" in content area.
Since custom blocks are primary building blocks of Drupal. I reckon this needs quite urgent look to be merged to latest 8.
Regards,
Amjad
Comment #37
amjad1233Sorry #35 was wrong patch...
Comment #38
benjifisher@amjad1233:
Before classifying this issue as "major", please review Priority levels of issues and explain how the issue meets the criteria there.
A change like this should not be made in a patch release (8.5.x). It is appropriate to target the 8.6.x branch. See Allowed changes during the Drupal 8 and 9 release cycles.
I am re-uploading the patch from #33, which already passes tests. I do not have time for a full review now, but I notice that the patch from #33 includes most of the changes from the one in #37. I also see a few surprising changes in #37, like this:
Why do we want to change caching behavior? Even if we do want to change it, how is it in scope for this issue?
Comment #39
benjifisherWe discussed this at the weekly UX meeting today. Although most everyone agrees that this issue is a good idea, it will be hard (very hard) to get a change like this committed without some user testing.
A possible way forward would be to combine this with some other improvements in a contrib module, or possibly an experimental one. Of course, this means implementing each improvement twice, once as a core patch and once as part of the module. Once we have such a module, we can use it for user testing.
I think that #2809291: Add "edit block $type" permissions, already listed as a related issue, would be a good candidate for such a module. Even better would be a more comprehensive review of the URL and menu structure, or information architecture (IA) of the Drupal admin UI. There are some issues listed under #2888657: [meta] Less confusing and more consistent wording needed in module/theme add/install/update that might be good candidates.
Comment #41
tim.plunkett#2987964: Move custom block types admin link to admin/structure has a different solution for this
Comment #42
tedbowJust a reroll.
I think we want the "Custom Block Library" to also show up in the tabs
The actual help text changes besides the routes seem out of scope here
re #39
I wonder if it would be easier to commit #2987964: Move custom block types admin link to admin/structure first and then do this issue.
Comment #44
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedGreat to see activity here!
Re #43.1 Yep, mentioned this on #30 - I think it's because of #2804195: Views does not create parent local task for a default local task so perhaps we should pause this one until that gets fixed?
Comment #45
eelkeblokI would like to second #5. "Custom block library" makes some sense in its current location, but very much would like to see the labels just become "Add block", "Blocks", etc. The only issue might be the distinction with dedicated, "coded" blocks (although "Custom block" might start to become more appropriate for those than for content-based blocks).
Comment #47
Chris Matthews CreditAttribution: Chris Matthews commentedAgreed!
Comment #48
manuel.adanPatch updated with:
Interdiff fails because different baselines, but I managed to generate one to easily see the mentioned changes.
#2987964: Move custom block types admin link to admin/structure does not block this, but would be appropriate to be committed under the same CR
Comment #49
joachim CreditAttribution: joachim commentedThis is great, but it makes #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" even more of a pressing need, since once this is fixed, there will be TWO tabs here provided by core which are potentially inaccessible if node module is disabled.
Comment #50
manuel.adanI didn't know that issue, added as related here.
We have also the Comments and Files tabs from core. I suggested a solution for it (#2862859-31: Create a top level, extendable, "Content" admin menu route that behaves like "Structure") that would not affect the changes makes here.
Comment #55
vikashsoni CreditAttribution: vikashsoni as a volunteer and at Zyxware Technologies commentedPatch not working in drupal-9.3.x-dev showing error
Needs to re-roll
Comment #56
longwaveComment #57
yogeshmpawarpicking it.
Comment #58
yogeshmpawarI have tried to add most of the changes in #48 patch but I am not sure where these changes need to add in the current patch as
core/modules/block_content/tests/src/Functional/Update/BlockContentUpdateTest.php
file is not available in code.Comment #60
radheymkumar CreditAttribution: radheymkumar commentedPatch not working in drupal-9.3.x-dev
Comment #64
smustgrave CreditAttribution: smustgrave at Mobomo commentedRerolled
Added a fixture and update test for the post_update hook
Fixed some test failures that were using the old path
Comment #66
smustgrave CreditAttribution: smustgrave at Mobomo commentedSeems to be a random FunctionalJavascript error moving back to NR
Comment #67
rkollerThank you for picking that one up and working on it! I've successfully applied the patch in #64 to Drupal 10.1.0-dev. There are three details I've noticed.
1. There are currently two pages for the custom block library:
/admin/content/block-content
and/admin/structure/block/block-content
(see screenshot). the page at/admin/structure/block/block-content
should better be removed.2. as illustrated in the screenshot as well the custom block library page under
structure
has a filter option while the custom block library page undercontent
is missing one. so adding a filter option in case the views module is enabled according to #7 would be good.3. The position of the custom blocks tab between content and comments looks correct. but i've noticed in case the admin toolbar module is installed the order of the tabs differs to the order of corresponding menu section.
probably reasonable to open a follow up issue in the admin_toolbar queue as soon as this issue lands? or would it make sense to open an issue already now there?
Comment #68
smustgrave CreditAttribution: smustgrave at Mobomo commentedSo when I apply the patch, running drush updb, and cr I'm not seeing /admin/structure/block/block-content I get a 404
And yes I agree there should be a follow up on admin_toolbar that will be postponed until this lands.
Comment #69
rkolleroh no i forgot the
drush updatedb
. i've only rundrush cr
. I've retried and #67.1 is invalid./admin/structure/block/block-content
got properly removed here as well. my bad, apologies!Comment #70
smustgrave CreditAttribution: smustgrave at Mobomo commentedNo worries! Moving back to NR
Comment #71
benjifisherUsability review
We discussed this issue at #3316853: Drupal Usability Meeting 2022-10-28. That issue will have a link to a recording of the meeting.
For the record, the attendees at today's usability meeting were @AaronMcHale, @benjifisher, @rkoller, @shaal, and @worldlinemine.
The last time this issue came up at a usability meeting (see #39) I suggested usability testing. That would be nice, but it does not look as though it is going to happen. Perhaps the next best thing is to spread the idea around and get some fedback. Ask your local Drupal meetups what they think. Mention it in a BoF session at the next Drupal Camp you attend. Who knows, maybe someone will get excited by the idea and do some real user tests.
Leave a short comment on this issue describing the collective response. Or leave a long comment if new ideas come up.
For now, I created #3318110: [meta] Reorganize Block items in the administration menu, and I am collecting this issue and a few others as children of that issue. I think all of these issues should be considered together.
Comment #72
benjifisherComment #73
benjifisherI am adding tags for the required approvals.
Comment #74
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis seems like a great idea. Definitely approval and hope it can be added.
Comment #76
smustgrave CreditAttribution: smustgrave at Mobomo commentedHad to update a test since https://www.drupal.org/project/drupal/issues/2350939 landed
Comment #77
larowlanI have seen talk of renaming this to just 'Blocks' where did we end up on that?
I think we should check that this path is what the module ships by default before we update it.
Sites own their config and may have moved it elsewhere already
Same for these changes
Is this out of scope?
Let's run some assert before the test to make sure things are in the state we expect.
e.g. we're not using the fixture file anywhere that I can see, so either its not needed, or the site isn't in the state we expect before we run the updates.
Also, just stating I'm +1 for this change
Comment #78
benjifisher@larowlan, thanks for the review!
#77.1: I think the current plan is to change the title from "Custom blocks" to "Blocks" as part of #3318549: Rename Custom Block terminology in the admin UI.
That plan is not set in stone, but there was a long discussion in Slack before settling on it. Part of the idea of separating the issues is that we can have a separate discussion on that issue about the appropriate label.
Comment #79
pameeela CreditAttribution: pameeela commentedBig +1 to this change. I address this already on any site where clients are editing blocks by adding a second menu link to the custom block library under 'Content'.
I also agree with the change from 'Custom block library' to 'Blocks'. The term 'library' is pretty random here as it's not used anywhere else in Drupal AFAIK and 'Custom blocks' is meaningless to content editors.
Comment #80
Anchal_gupta CreditAttribution: Anchal_gupta at Srijan | A Material+ Company for Drupal India Association commentedI have to Upload the patch
And Addressed #77 - point - 1,3,4
Needs work on points 2,5
Comment #81
WebbehThe changes in #80 (addressing #77.1 and #77.3) should be undone, please see #78 for justification. We'll keep the change in that issue.
Comment #82
joachim CreditAttribution: joachim commentedI really think we should fix #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" first.
Comment #83
smustgrave CreditAttribution: smustgrave at Mobomo commented77.1 = will be done in another ticket
77.2 = added quick check
77.3 = will be done in another ticket
77.4 = don't think it's a problem to be here
77.5 = added quick assertion
Thought I think https://www.drupal.org/project/drupal/issues/2987964 needs to land first.
Comment #84
WebbehUpdated IS for where we're at on this. Thanks @smustgrave for the quick work and updates to fix #80.
Per #82 and #83, we need checks on:
Comment #85
rachel_norfolkJoachim has a good point in #82 – these issues were first developed together as part of the same work. One kind of needs the other.
Comment #86
AaronMcHaleI don't necessarily see #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" being a hard blocker, partly because that issue has been stuck for a long time, but mainly because we're just following existing precedent here. Under Content there's already a tab for Media, here we're simply adding a similar tab for (Custom) Blocks. Seems more like a nice to have to me.
#2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" would be a significant change, and if anything by doing this issue we simply make the case stronger for getting that issue done.
Comment #87
joachim CreditAttribution: joachim commented> but mainly because we're just following existing precedent here. Under Content there's already a tab for Media, here we're simply adding a similar tab for (Custom) Blocks. Seems more like a nice to have to me.
Yes, but committing this issue makes the problem in #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" worse:
- there are too many tabs at /admin/content
- if you disabled node module, you can't get to any of them
By committing this we make the case stronger for #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure", yes -- by making an existing UX bug worse.
Comment #88
AaronMcHaleActually that's not true, the
/admin/content
route and links are actually provided by the system module in system.routing.yml, system.links.menu.yml and system.links.task.yml.As you can see from this screenshot, on a Drupal 10.1.x site with Comment and Media installed but Node uninstalled, there is still a clear route to access the Media and Comment tabs, the only issue I can see is that the Content tab does not have much information other than a message saying there are no administrative items.
Even in the case of permissions, to get to the Comments tab under Content, the only permissions the user appears to need are:
- Administer comments and comment settings
- Use the administration pages and help
And optionally:
- Use the toolbar
- View the administration theme
So, while not the most optimal experience, I don't think it's a hard blocker to this issue from a UX perspective.
This is of course a discussion for that specific issue, but I also don't believe that is a strong blocker because it is very subjective. In which contexts are there "too many tabs", and couldn't the same logic be applied to menu links. In my screenshot there are four tabs right now, would adding a fifth one be "too many". It might be, but it's very context dependent (screen size, etc), and on mobile the tabs contract into a dropdown list of links (in Claro). I'm sure there's other parts of the Admin UI with more than four or five tabs right now. One could also make the argument that the proposed solution in that issue is no better because in it increases the number of clicks to get to the list of content (from 1 to 2).
Anyway, my point is that I still don't see a strong case for blocking this issue on that issue, particularly given that it's been stuck for so long.
Comment #89
acbramley CreditAttribution: acbramley at PreviousNext for Service NSW commentedI agree with #86 and #88, to be honest I don't see #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" landing for quite a while. I don't even think we've nailed down which solution to go with there. It's also a highly disruptive change (I can see a lot of push back coming from the community) given that admin/content has been the go to for a list of nodes in Drupal for a long time.
Comment #90
rkollerI've presented the current plan for moving and untwining the block related pages in Core at the weekly Lean Coffee Table at the Drupal User group in Munich to the attendees @drubb, @franz-m, @it-cru, @jurgenhaas, @martin-mayer as well as to the Fox Valley Computer Professionals attendees Anthony E. Scandora, @bsnodgrass, Sally Gradle, @TBone242.
With both groups in the context of the moving the custom block library to content one key need gradually manifested while going through all the proposed changes and the screenshots illustrating it. Everyone realized you have for one the blocks
Core
ships with, then you have thereusable custom blocks
, then you have thenot reusable custom blocks
only available in the context of layout builder and then you also have blocks that are made available with every contrib module that ships with any blocks. While writing up the comments I've installed the Gutenberg module by accident and discovered the following overview that illustrates the problem pretty well. :In that installation the only two blocks that are visible inside the custom block library are
first block
andanother standard block
. but the consensus and desire after realizing in both groups was to make all available blocks visible and accessible in the custom block library even if it means that 100s of blocks of different types and sources are shown there.Everyone wanted to be in control. if the blocks would be labeled correctly in the list view and the available options would differ based on the type that would be fine. but that way the users would be in control. it would also solve another problem someone mentioned. sometimes one has to search if a view has already created a certain block or if you have to create it on your own.
aside the fact that many of the different block types are not visible and accessible via the custom block library i guess the more underlaying problem is that people not really understand the difference between all those different blocks. there is no apparent sharpness of separation between the different block concepts. if there is the problem of clear differentiation users are getting confused why a block is called
custom block
here, and thecustom blocks
in layout builder are not shown in custom block library. then you also have the following issue making blocks created in layout builder reusable: https://www.drupal.org/project/drupal/issues/2999491 . overall it is more or less confusing if you try to stay in the loop.making adjustments about what is shown in the custom blocks library is definitely out of the scope of this issue. but it is a more than valid and important point imho. aside that everyone is 100% inline moving the custom block library to
/admin/content
Comment #91
rkollerI've read through all the new comments that came in during the last few days. i agree with #88 and #89. I've also tested uninstalling the node module with the patch in #83 applied. Same result like aarons only difference the custom blocks tab is next to the content one and fully functional. so i also wouldn't consider #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" a hard blocker. even though i think it should definitely be discussed and worked on. @benjifisher already added the issue to the review queue for the ux meeting: https://www.drupal.org/project/drupal/issues/3320757#comment-14786871
Comment #92
WebbehSounds like we've reached consensus on #2862859: Create a top level, extendable, "Content" admin menu route that behaves like "Structure" not being a hard-block. I've moved the issue into the Proposed resolution of the IS as a to-do alongside this issue.
I also adjusted the IS to note the patch in question for review is #83, not #80, as @smustgrave did a great job of applying feedback and creating the all-important interdiff.
Do we have an existing issue that would be helpful to place the comment from #2862564-90: Move Custom block library to Content in? That's helpful feedback for a UX improvement on custom block variants and I don't want that to get lost in this issue.
Remaining tasks, unless I'm missing any additional feedback:
Comment #93
rkollerre #92 there is no issue for that feedback yet. but instead of simply open an issue I would rather tend to discuss all the insights from the latest feedback sessions. cuz for example the idea of letting the custom block library display not just custom blocks touches several other issues. therefore i think it would make sense to have a broader discussion about the latest insights first. @aaronmchale already put discussing the results of his feedback session to the queue for the next ux meetings tomorrow (everyone is welcome to join - #3320757: Drupal Usability Meeting 2022-11-18). and in addition there could also be a discussion in #block-content on the drupal slack. that way the to be created issue or issues (i guess there might spin up one or two more) will be more focused with a clear proposed resolution.
Comment #94
acbramley CreditAttribution: acbramley at PreviousNext for Service NSW commented@rkoller are you referring to inline blocks added via layout_builder to display there too? Because that is not something that core would support since these blocks are designed as inline (i.e only used in the specific entity they're added to). If you want them to display though you can always add a custom view to override the page and don't add the Reusable filter, or override BlockContentListBuilder so it doesn't filter on the reusable property in
getEntityIds
Comment #95
AaronMcHale#2987964: Move custom block types admin link to admin/structure definitely is a blocker for this issue, because the Block Types sits under the Custom Block Library in terms of the routes/links, so it's not practical to do this issue before that one.
Comment #96
smustgrave CreditAttribution: smustgrave at Mobomo commentedAs soon as the block types ticket lands I’ll immediately pivot to this.
Comment #97
AaronMcHaleComment #99
smustgrave CreditAttribution: smustgrave at Mobomo commentedStarted the MR. This includes #2987964: Move custom block types admin link to admin/structure already. So hopefully once that lands this just needs to be rebased and is ready for testing.
Also https://www.drupal.org/project/drupal/issues/2987964#comment-14815445 discussed removing Needs product manager review that I wonder if it applies here.
Comment #100
smustgrave CreditAttribution: smustgrave at Mobomo commented#2987964: Move custom block types admin link to admin/structure just landed so this is good to go!
Comment #101
smustgrave CreditAttribution: smustgrave at Mobomo commentedBelieve I addressed all the threads but left a few open for review.
Comment #102
AaronMcHaleI think we should address #3325167: Revisit the redirect to 'add block' form in the 'add block content' form either at the same time or after this issue.
The current behaviour of saving a block and getting redirect to Block Layout is weird but not a huge deal given that in 10.0 they sit next to each other, but once Block Content moves to Content, that redirect will become a much bigger problem.
Comment #103
smustgrave CreditAttribution: smustgrave at Mobomo commentedMy vote is to address after to keep this one moving. #3325167: Revisit the redirect to 'add block' form in the 'add block content' form shouldn't be blocked by anything so could probably be worked on now.
Comment #104
AaronMcHaleOh yeah I wasn’t suggesting we should block either issue. Just want to emphasise that doing this issue would make that issue more important.
Comment #105
benjifisherI made a few more comments on the MR. Back to NW.
I am making some updates to the issue summary. We need to update the change record, so I am adding the issue tag for that.
Comment #106
smustgrave CreditAttribution: smustgrave at Mobomo commentedAddressed the feedback.
Updated the change record
Added screenshots.
Comment #107
smustgrave CreditAttribution: smustgrave at Mobomo commentedHiding the files as this is being done in the MR.
Comment #108
catchRemoving the needs product manager review tag since this is a self-contained usability improvement.
Comment #109
smustgrave CreditAttribution: smustgrave at Mobomo commentedThanks @catch!
Comment #110
rkollerUpdated the after screenshot in the issue summary. the position of the
custom blocks
tab was on the far right instead of the intended position betweencontent
andcomments
.Comment #111
benjifisher@smustgrave:
Thanks for the updates. I think the only code changes we still need are for the help text.
The text on
/admin/help/block_content
is nowI would like to make a few changes:
On second thought, here is an alternative to (1). The current text under "About" duplicates the information under "Uses". It is a little out of scope, but I think it would be an improvement to
It is definitely out of scope for this issue, but I notice that the help text does not mention the per-block-type permissions added in #2809291: Add "edit block $type" permissions. Maybe we should mention those permissions here, or maybe that is too much information for this page.
Comment #112
benjifisherI reviewed the Help Topics pages. I have just two suggestions:
/admin/help/topic/block.overview
, insert "manage" into the sentence, "The Custom Block module allows you to custom block types and custom blocks." under "Managing blocks overview"./admin/help/topic/block_content.add
, the first step isAn earlier version of the MR added a link in the admin menu, but now that link is not there. Break this up into two steps: navigate to Content from the menu, then choose the Custom blocks tab.
Comment #113
smustgrave CreditAttribution: smustgrave at Mobomo commentedAttempted to address help issues.
Comment #114
benjifisher@smustgrave:
Maybe I should have been more explicit about some of the changes.
On
/admin/help/block_content
Most of the changes look good, but add the phrase, "just like blocks provided by other modules", to the end of the second sentence under "Creating custom blocks":
On
/admin/help/topic/block.overview
Keep the word "to" and add "manage":
On
/admin/help/topic/block_content.add
Since Custom blocks is not in the administration menu, you cannot navigate to that link in the menu. It has to be two steps:
Or you could combine the first part of Step 3 with Step 2:
Comment #115
smustgrave CreditAttribution: smustgrave at Mobomo commentedAddressed points in #114
Comment #116
benjifisherThere is just one more thing for
/admin/help/topic/block_content.add
: see the MR.Comment #117
smustgrave CreditAttribution: smustgrave at Mobomo commentedupdated help topic.
Comment #118
benjifisher@smustgrave:
Thanks for updating the Help and Help Topics pages. I reviewed the changes, and I am marking this issue RTBC.
I am also making several updates to the issue description:
Comment #119
xjmThanks everyone; glad to see this is getting close!
I left a few comments on the MR.
Meanwhile, there are still references to the "Custom block library" that probably need to be cleaned up:
The first two are part of the upgrade path, but the rest will need to be updated.
Thanks!
Comment #120
xjmTagging for RM review of:
(Others' feedback on the point is also welcome.)
Comment #121
catchThis crossed my mind as well. I think we could provide a route with the old path, that does a redirect to the new path, and issues a @trigger_error() deprecation message. One drawback is we haven't finished #3159210: Support route aliasing (Symfony 5.4) and allow deprecating the route name yet, not sure how important that is since we're not changing the route for a path, but changing the path for a route.
Comment #122
smustgrave CreditAttribution: smustgrave at Mobomo commentedAll the renaming is going to happen separately in the next ticket.
Comment #123
smustgrave CreditAttribution: smustgrave at Mobomo commentedAll the renaming is going to happen separately in the next ticket.
Comment #124
benjifisherRe #120, #121:
In #73, I added the tag for product manager review because this change is so disruptive. I was pleasantly surprised when @catch removed that tag in #108. Well, I was more surprised when the same thing happened on the earlier issue, #2987964: Move custom block types admin link to admin/structure.
Maybe I am missing something, but I do not see that #3159210: Support route aliasing (Symfony 5.4) and allow deprecating the route name is relevant. I think we are treating routes as intended: less subject to change than the paths and page titles associated with them.
I think a redirect and a new route would be pretty easy to implement: perhaps
entity.block_content.collection.bc
? But I wonder how effective it would be to trigger a deprecation notice. The only way to see it would be an automated test that did something likedrupalGet('admin/structure/block/block-content')
, right? A log message might be more helpful: a warning in Drupal 10, an error in Drupal 11, and then remove the BC route in Drupal 12.Re #122:
@smustgrave, what issue do you have in mind?
I think we have agreed that #3318112: [PP1] Move "Block layout" from Structure to Appearance is the "next" issue.
After that comes #3318549: Rename Custom Block terminology in the admin UI, which includes changing "custom blocks" to "content blocks". But we are getting rid of "Custom block library" in the UI in this issue, so I think now is the time to update the references listed in #119. I am happy to do that myself, but then we will need to find someone else to take the reviewer role for this issue.
Comment #125
smustgrave CreditAttribution: smustgrave at Mobomo commentedMoving the block layout and renaming don’t block each other so can happen at the same time.
Comment #126
benjifisherA little more manual testing
I forgot to test with the Views module uninstalled.
Comparing to the screenshots in the issue summary (with Views installed) the Administration menu, paths, and breadcrumbs are all the same. The only differences I notice are
Those are the same differences with the current MR or with 10.1.x.
I am setting the status to NW for #119 and the new threads on the MR.
Comment #127
catchIt's more that if we add that route, we'd want to immediately deprecate it for later removal, and adding a standard way to deprecate routes would help with that - for example it's unlikely but someone could reference the route name directly in code too. However since we don't expect anyone to do that, I don't think that issue really affects things, we can do a 'manual' deprecation (@trigger_error() or unsilenced warning) if the path is visited, and that is probably enough.
I wasn't that sure about the redirect route overall, but @xjm mentioned shortcuts, and shortcuts does indeed store
internal:/admin/structure/foo
rather than a route name, so that makes the redirect route a bit more pressing. Shortcuts stores internal paths so that people can reference say admin/content and still have that work even if they completely replace the path with a custom view, so I don't think we should try to do anything like updating shortcuts. E_USER_WARNING does seem like a better idea - anyone getting this redirect is very likely to be in a position to fix the link to the old path.Comment #128
smustgrave CreditAttribution: smustgrave at Mobomo commentedSo to confirm we are doing renaming now in this ticket now?
And changing that text no blocks available follows what content does we can update but will be going against the grain
Comment #129
smustgrave CreditAttribution: smustgrave at Mobomo commentedUpdated "no blocks available" text.
Updated all instances of custom block library.
Comment #130
benjifisherI confirmed that @xjm's suggestions on the MR have been applied. I also replied to one open thread.
I searched for "custom block library" (case insensitive). The only places I found it were in the new update function and the related test. These are the places referenced in #119:
That leaves the question of whether to add a redirect from the old path (Comments #120, #121, #124, #127).
I am setting the status to RTBC to get the attention of the release managers. Should we handle the redirect as part of this issue or in a separate one?
Keep in mind that #2987964: Move custom block types admin link to admin/structure already made a related change of path. One option is to revert that change, re-open that issue, and re-postpone this one.
Another option is to handle both redirects as part of this issue.
We could also add a follow-up issue. It might also handle #3318112: [PP1] Move "Block layout" from Structure to Appearance, which is postponed on this issue. All three issues are connected to the same change record. (If not yet, then we we will fix that.)
Comment #131
xjmI would suggest opening a blocking issue for the upgrade path for #2987964: Move custom block types admin link to admin/structure. I considered reverting it, and we'll do that if the upgrade path is not finished in time for 10.1.0-alpha1, but hopefully we won't have to. Then, address the upgrade path for this issue in this issue.
Comment #132
benjifisher@xjm, thanks for the guidance. I added #3333383: Create a redirect for the new Block types path, and I am postponing this issue on it.
Comment #133
smustgrave CreditAttribution: smustgrave at Mobomo commentedBased on the slack conversation with xjm in the contribute channel
Opened #3333394: [policy, no patch] Determine a best practice for providing BC for internal paths that change between minor releases
Added a route to this issue to redirect the old path to the new.
Comment #134
smustgrave CreditAttribution: smustgrave at Mobomo commentedSince there's an issue with the MRs uploading a patch of the MR.
For any failures please do not reroll this issue is being worked on in the MR this is just for tests.
Comment #136
smustgrave CreditAttribution: smustgrave at Mobomo commentedNeeded to update test now that there is a redirect.
Comment #138
smustgrave CreditAttribution: smustgrave at Mobomo commentedRandom ckeditor5 failure
Comment #139
AaronMcHaleAfter recent discussion on #2317981: Move block content edit and delete routes under admin/content/block to improve IA for editors and fix breadcrumbs and at #3331562: Drupal Usability Meeting 2023-01-13, that issue is now a follow-up to this one.
Comment #140
larowlanRemoving the [PP-1] here because we have a path forward for the BC layer along the lines of #3333383: Create a redirect for the new Block types path
Comment #141
larowlanLeft a review on the MR.
Can we get a follow up to add a local action on the block library to 'add block', this would be postponed on both this issue and #3325167: Revisit the redirect to 'add block' form in the 'add block content' form
Great work folks
Comment #142
smustgrave CreditAttribution: smustgrave at Mobomo commentedAddressed threads but left open for review
Opened #3333673: [PP-1] Add a local action on the block library per #141 ready for review.
Comment #143
AaronMcHale@larowlan I don't think #3333673: [PP-1] Add a local action on the block library needs to be postponed on #3325167: Revisit the redirect to 'add block' form in the 'add block content' form, as far as I'm aware there's nothing in #3325167 that would block #3333673, since the former is just adding a link to create a block, while the latter is about what happens when you hit the save button.
Comment #144
larowlan@AaronMcHale sorry I should have been more detailed in why I think it blocks it. When you click 'add custom block' from the block library, you're sent to the place block form if you have administer blocks permission. If you don't, you end up on a 404 page. So the UX is pretty bad. We want to expand the permissions so that you can create/edit/delete custom blocks without the administer blocks permission, so without that change, the experience will be pretty bad for those without the administer blocks permission. Granted all this hinges off us getting the permission change in too, but I think that's our next priority.
Comment #145
smustgrave CreditAttribution: smustgrave at Mobomo commentedComment #146
smustgrave CreditAttribution: smustgrave at Mobomo commentedUpdated MR based on #3333383: Create a redirect for the new Block types path
Comment #147
acbramley CreditAttribution: acbramley at PreviousNext for Service NSW commentedIt looks like the last piece of feedback on the MR was around that deprecation message which I've updated to match the other issue that was just committed :) hoping for an RTBC on this now!
Comment #148
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #149
nod_Temporary issue with the bot
Comment #150
smustgrave CreditAttribution: smustgrave at Mobomo commentedSounds like this needs works
Comment #151
acbramley CreditAttribution: acbramley at PreviousNext for Service NSW commentedWe need feedback on whether the empty arm of the upgrade path needs tests. To me this is slightly overkill but others might disagree.
@mstrelan and I already tested locally with the getOption approach and it failed as per the MR comment.
Comment #152
acbramley CreditAttribution: acbramley at PreviousNext for Service NSW commentedLast bits have been addressed.
Comment #153
mstrelan CreditAttribution: mstrelan at PreviousNext commentedSetting to RTBC as per my earlier testing and all feedback has now been addressed.
Comment #154
larowlanUpdating issue credits, crediting those who provided meaningful reviews that changed the course of the patch, those who were involved in usability testing and review and those who made significant issue summary updates
Comment #155
larowlanDid another round of manual testing and another code review, looks good to me.
Comment #157
larowlan🎉🎉🎉
Committed d7c4cf1 and pushed to 10.1.x. Thanks!
Confirmed the change record already mentions this.
Updated the draft release notes to reference this and the block-types move.
Nice work everyone
See you in #3318549: Rename Custom Block terminology in the admin UI and #2317981: Move block content edit and delete routes under admin/content/block to improve IA for editors and fix breadcrumbs
Comment #158
ifrikWow! Thanks so much to everybody who put work into this and pushed it through!
Comment #160
cilefen CreditAttribution: cilefen commentedComment #163
smustgrave CreditAttribution: smustgrave at Mobomo commentedClosed #2523154: Improve workflow for creating custom blocks moving over credit. Placing here as I don't have ability to add credit to the META.
Comment #164
Promo-IL CreditAttribution: Promo-IL commentedvery bad idea 👎