Problem/Motivation

I am still having trouble showing customers the Layout Builder re: adding inline blocks to landing pages. They're confused. I want them to build using inline blocks as I believe this is the common "Squarespace/Wix/SaaS cms" type workflow that people ask for (landing page node with inline blocks). Not all content should be this way in Drupal, sure, but there's a big internet out there and we want Drupal to crack the DXP space as best it can. This means supporting building landing pages and making this UX as easy as possible. The problems we see:

1. The CTA is dark, and often overlooked
2. The CTA text "Create Custom Block" feels more like a Drupalism than UX for everybody.
3. The existing block search and fieldset listings aren't labeled so its unclear what they do.

Proposed resolution

1. Change the CTA to use the Drupal blues from core. Normal state, #5181c6, Hover state. #004875 - I found these colors in /core/misc/icons

2. Change the CTA text and add accessibility text. What I've done in this patch is change the text to "Add new block" which lines up much more cleanly with "Add a new Inline Block" (the text you see once you click on "Add Custom Block" currently) - I also added a "title" to the link retaining the call that loads the bundle name for the help text.

3. Add an "item" to the form that serves as a guide/label for the existing blocks. It says "Add existing block"

The changes look like this:

layout builder inline block add ux changes

Remaining tasks

Reviews needed, discussion requested

User interface changes

Minor form item and CSS changes to the Layout Builder "Add Block" controller (modules/layout_builder/src/Controller/ChooseBlockController.php)

Data model changes

N/A

Release notes snippet

Improved UX of Layout Builder's "Add Block" menu

Original report by brantwynn on github.com/acquia/df

https://github.com/acquia/df/issues/131

Comments

brantwynn created an issue. See original summary.

saltednut’s picture

Issue summary: View changes
saltednut’s picture

saltednut’s picture

Issue summary: View changes
saltednut’s picture

Issue summary: View changes
saltednut’s picture

One last note: This patches both layout_builder and the stable theme. They both provide different layout_builder.css files - wasn't sure what was up with that, but only the one from /core/themes/stable/css/layout_builder/ was loading on my sites.

saltednut’s picture

Added another patch that will apply to 8.7 - its the same patch, just without the changes to the tests that don't apply in 8.7.x

rlnorthcutt’s picture

This looks much better and its a very simple fix. I've been wanting the collapsed fieldsets for a while and the colored CTA button is a great addition.

webchick’s picture

I love this!!

webchick’s picture

Issue tags: +AcquiaUXTest

Also tagging, as this came up in recent UX testing the Acquia Customer Experience team did (still working out a way to help get these results public). These changes would go a long way towards addressing problems with e.g. noticing there's an "Add new block content" option to begin with, and the overwhelmingness of the list of blocks, for example.

webchick’s picture

Category: Feature request » Task
Priority: Normal » Major

And since this is a primary interaction that's confusing people, escalating to "major" and a "task."

tim.plunkett’s picture

Cross linking with another issue as this introduces more usage of the word "inline"

rlnorthcutt’s picture

So, it passes the tests for 8.8, but has a few failures for 8.7

Does that mean backporting any test changes from 8.8 to 8.7?

tim.plunkett’s picture

Status: Needs review » Needs work
Issue tags: -Layout Builder +Blocks-Layouts

Let's have the most recent patch be for 8.8 since that has to happen first.

  1. +++ b/core/modules/layout_builder/css/layout-builder.css
    @@ -133,21 +133,28 @@
     }
     
    +
     #drupal-off-canvas .inline-block-list {
    

    Nit: no need for an extra line here

  2. +++ b/core/modules/layout_builder/src/Controller/ChooseBlockController.php
    @@ -119,16 +119,23 @@ public function build(SectionStorageInterface $section_storage, $delta, $region)
    +      '#attributes' => ['class' => ['existing-block-create-title']]
    

    I think this needs to be BEM-ified

  3. +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php
    index 06b32a0eb4..b1bed1e7ed 100644
    --- a/core/themes/stable/css/layout_builder/layout-builder.css
    
    --- a/core/themes/stable/css/layout_builder/layout-builder.css
    +++ b/core/themes/stable/css/layout_builder/layout-builder.css
    

    Can't change the stable CSS, afaik

starshaped’s picture

Status: Needs work » Needs review
StatusFileSize
new8.66 KB
new3.71 KB

Removed the empty line in #14.1, and removed the CSS class in 14.2 as I didn't see it being used anywhere.

As for 14.3, I updated the CSS to add a new selector and added that to Stable so that no existing Stable CSS is being changed.

tim.plunkett’s picture

Looks good, just two small nits

  1. +++ b/core/modules/layout_builder/src/Controller/ChooseBlockController.php
    @@ -119,16 +119,22 @@ public function build(SectionStorageInterface $section_storage, $delta, $region)
    -        $build['add_block']['#attributes']['class'][] = 'inline-block-create-button';
    +        $build['add_block']['#attributes']['class'][] = 'inline-block-create-button inline-block-create-button--large';
    

    This original line should be left as-is, and copied to add the second class (each as its own array entry)

  2. +++ b/core/modules/layout_builder/src/Controller/ChooseBlockController.php
    @@ -119,16 +119,22 @@ public function build(SectionStorageInterface $section_storage, $delta, $region)
    +      '#plain_text' => $this->t('Add existing block')
    

    Missing trailing comma

starshaped’s picture

StatusFileSize
new8.63 KB
new1.22 KB

Fixed nits as described in #16.

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

tim.plunkett’s picture

Status: Needs review » Needs work

Pushing back on this for now, I believe there's been more design work here and it needs to be represented here.

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

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

bkosborne’s picture

One thing our editors have been confused about is why there's seemingly two separate lists of blocks.

There's the main list you see when you click "Add block", and then there's this secondary list that's only revealed when you click "Create custom block". Why is this separation needed? Yes, behind the scenes, these "custom" blocks are distinct because they represent the creation of BlockContent entities, but to a site builder, all blocks are layout building components.

It seems that when content blocks were first added to layout builder, they were shuffled in with the main list of blocks, but it was changed in #2968500: Change inline blocks workflow in Layout Builder to match mocks to separate them.

I agree that the UX improvements proposed in this issue are indeed improvements, but I propose that this issue be closed and instead effort be focused in improving the overall block selection UX in #3073648: The list of available blocks in Layout Builder is overwhelming to users.

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

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

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

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

chrisgross’s picture

I agree that custom blocks need to be moved back to the main blocks list. I have read through the issue that caused this change and still do not see a good reason for said change, but it seems like really, really bad UX. It is confusing to users and unnecessary, as to them, there is no meaningful difference between custom blocks and other types. Also, if you click on "Create custom block" and you want to then go back to the main block list, you can't. The only option is to close the panel and start over. Plus, the search box does not work for custom block types in the current configuration. Please move it back, or provide a simple means for us to do so.

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

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

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

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now 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.

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

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now 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.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.