the workflow for adding blocks adds step to add custom block (step2) after clicking on 'place block' in modal. User then adds content, but then is passed to anther screen with block options and are once again asked to select region, even though they started off by picking a region.
Action link in modal should be removed
/core/modules/block/src/Controller/BlockLibraryController.php
lines 94-96Current Steps
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 2732643_4-Remove-Action-link-for-add-custom-block.patch | 1.22 KB | skaught |




Comments
Comment #2
skaughtComment #3
skaughtComment #4
skaughtComment #5
tim.plunkettYes the workflow is not perfect, and it has obvious ways to improve, but that is not grounds to remove the link altogether and completely hide the ability to add custom blocks.
This was explicitly added in #2512456: Implement the new block layout design to emphasize the primary interaction of placing a block.
I would instead suggest that we pass the theme along as a query parameter all the way through, and then the final form will already know which region to put it in, and will hide the select list.
Comment #6
skaughtThere is already a Tab link on the base Block Layout page to get to the custom block UI, the modal link is secondary. This doesn't remove the action link from the full page, just the modal context.
step2

Comment #7
harish b commentedHi the Drupal core at add custom block layout Flow is not perfect as mentioned at https://www.drupal.org/node/2732643#comment-11226753, But removing link is not user friendly. Instead i would suggest to add default region in configure block page If placed block from particular region.
Comment #8
tkoleary commented@harish b
No functionality is being removed here. If the user goes to /block-layout they get the same experience of adding a custom block as always.
The modal was added as part of #2724819: Create experimental module for place block on any page feature, therefore all of it is new, so we would not be "removing a link" but rather choosing not to follow the pattern of the full block layout form precisely, and there is very good reason not follow it.
Here the user has explicitly triggered the "Place block" state, so there is no ambiguity that their intent is to place a block, not to create a new custom block. While the user realize that there is no block in the list that will meet their need so they will need to create one, providing the link to do that would be adding additional functionality to cover another user need, not removing functionality.
The problem is that you cannot treat a modal experience the same way you treat a non-modal experience. In a modal experience the user counts on being routed back to the place where they began at the end of the process. So in this case, if the user is provided with the "add custom block" link after they have entered the "place block" modal, the expected experience would be as follows:
That is a lot of routing and certainly warrants it's own issue if it's functionality we want to add, which is not the only possible conclusion. There are many other approaches that could solve the same user issue. For example, putting an "add custom block" link in the toolbar, or in contextual links, or adding it as a dropdown below the "place block" toggle, or adding "add custom block" links to the regions displayed when "place blocks" is triggered.
None of the above would necessarily involve the complexity of combining the "place" and "add" flows in a single experience.
Comment #9
skaughtI hear what you are all saying.. should this ticket be closed or just re-worked it summary?
i'm happy to close it. I'm not sure it there's such a ticket about fixing this destination issue, although I am aware #2745911: Block add links should respect destination was committed recently and may help with the general problem. If any follow up would be required??
@tkoleary #8
the action link (as a part of the moda)l does pre-exist #2724819.. this overall behaviour is 'broken' in both the the norma lworkflow from
once you click one the good old 'pace block' links from there.
my opening this ticket was basically a shortcut from fixing the issue... but overall i do agree with tim #5... that fixing is better than removing.
--> Users should have the ability to spontaneously create a new block in the middle of placing a block..
Comment #10
skaughtalso then:
should this be done under #2724819: Create experimental module for place block on any page feature
Comment #11
tim.plunkettThat issue has a well-scoped patch and is only waiting on a blocking commit.