When using Layout Builder, on the 'Manage Display' page for 'Full Content', the help text is floated to the side. See screenshot.

I've added our standard .contained class to tidy that up in #3027614: Use Layout Builder in Umami for the recipe content type in full view mode , but let's make the region a little better with some more padding or change of background colour or something.

CommentFileSizeAuthor
#23 ootb-layout-builder-hightlight-3044250-22-IE11-RTL.png116.79 KBshaal
#22 ootb-layout-builder-hightlight-3044250-22.patch6.69 KBpawandubey
#22 interdiff_19-22.txt973 bytespawandubey
#22 ootb-layout-builder-hightlight-3044250-22-mobile-rtl.png34.5 KBpawandubey
#22 ootb-layout-builder-hightlight-3044250-22-mobile_ltr.png34.36 KBpawandubey
#22 ootb-layout-builder-hightlight-3044250-22-desktop-ltr.png44.88 KBpawandubey
#22 ootb-layout-builder-hightlight-3044250-22-desktop-rtl.png45.04 KBpawandubey
#19 interdiff-3044250-14-19.txt3.28 KBkjay
#19 ootb-layout-builder-hightlight-3044250-19.patch6.71 KBkjay
#16 interdiff_14-16.txt1.33 KBshaal
#16 ootb-layout-builder-hightlight-3044250-16.patch6.77 KBshaal
#16 layout-build-help-message-mobile-rtl.png64.01 KBshaal
#14 Screen Shot 2019-04-01 at 21.45.26.png155.4 KBkjay
#14 interdiff-3044250-12-14.txt335 byteskjay
#14 ootb-layout-builder-hightlight-3044250-14.patch6.82 KBkjay
#13 layout-builder-help-message-RTL(iPhone 5_SE).png125.36 KBshaal
#12 status-messages.png432.3 KBkjay
#12 Screen Shot 2019-04-01 at 16.49.43.png233.68 KBkjay
#12 Screen Shot 2019-04-01 at 16.49.07.png223 KBkjay
#12 interdiff-3044250-8-12.txt4.19 KBkjay
#12 ootb-layout-builder-hightlight-3044250-12.patch6.31 KBkjay
#8 Screen Shot 2019-03-30 at 07.13.03.png246.56 KBkjay
#8 Screen Shot 2019-03-30 at 07.03.09.png245.97 KBkjay
#8 interdiff-3044250-4-8.txt3.72 KBkjay
#8 ootb-layout-builder-hightlight-3044250-8.patch4.86 KBkjay
#7 Screen Shot 2019-03-29 at 23.59.40.png219.5 KBkjay
#5 ootb-layout-builder-hightlight-3044250-5.png64.64 KBpawandubey
#4 ootb-layout-builder-hightlight-3044250-4.patch1.15 KBshaal
#4 recipe-layout-builder-with-dotted-border-around-help-section.png333.88 KBshaal
Screenshot 2019-03-28 at 22.01.10.png147.98 KBmarkconroy

Comments

markconroy created an issue. See original summary.

gábor hojtsy’s picture

Category: Feature request » Bug report

This is a current screenshot as of just now:

This issue is about the highlighted region above the page title. Keep in mind people may use it to place other content elsewhere, so it should not just be styled for this use in particular but as a general highlighted content region. Bartik puts a border around it.

gábor hojtsy’s picture

shaal’s picture

Version: 8.8.x-dev » 8.7.x-dev
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new333.88 KB
new1.15 KB

A similar solution of Bartik does - a dotted border around the block-help message (Recipe Layout builder instructions)
/en/admin/structure/types/manage/recipe/display/full/layout

pawandubey’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new64.64 KB

@shaal

I have reviewed and tested this and patch works fine as per the attached screenshot.

Moving this to RTBC.

gábor hojtsy’s picture

Let's get @kjay agree to this as the point person for the Umami design. :)

kjay’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new219.5 KB

I think we have a regression issue with the styling of the highlighted region and fixing it will impact on the styling of help messages.

See the following screenshot:

Only local images are allowed.

#3027614: Use Layout Builder in Umami for the recipe content type in full view mode adds a new div .container wrapper around the highlighted region, probably to contain the layout builder help text, but the design for content in the highlighted region is 100% width with an appropriate background colour for the type of highlighted message. Plus the message is enhanced with an icon in some cases.

I think the help text should not be placed on top of the page background colour because even with a border, the presentation feels like it is part of the page and we need to separate the purpose of this message out and use the same style for all help messages in the highlighted region.

I propose following the same design pattern we have used for the status messages in the highlighted region and place the content on a 100% width background coloured region. Pale blue for example helps separate this out from the regular page components, like the example in this screenshot...

Proposed help message design.

I'll do a patch for this proposed design in the morning.

kjay’s picture

Status: Needs work » Needs review
StatusFileSize
new4.86 KB
new3.72 KB
new245.97 KB
new246.56 KB

Here's a patch for the proposed design in #7.

Applied it should look like this:

Help text styles.

This also fixes the style regression for the status messages by making the highlighted region full viewport width again:

Confirmation message 100% width.

markconroy’s picture

Status: Needs review » Reviewed & tested by the community

This looks great. I'll create a follow up issue to come up with a generic solution to this region, so if other blocks are placed there they won't float to the left just because each block template hasn't got a specific class in it.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/profiles/demo_umami/themes/umami/css/components/blocks/help/help.css
    @@ -0,0 +1,30 @@
    +.block-help > .container {
    ...
    +[dir=rtl] .block-help > .container {
    
    +++ b/core/profiles/demo_umami/themes/umami/templates/components/help-block/block--help.html.twig
    @@ -0,0 +1,46 @@
    +  <div class="container">
    

    Since we have control over the markup, could we add a specific class here? Something like .block-edit__container.

  2. +++ b/core/profiles/demo_umami/themes/umami/templates/components/help-block/block--help.html.twig
    @@ -0,0 +1,46 @@
    +{%
    +set classes = [
    +'block',
    +'block-' ~ configuration.provider|clean_class,
    +'block-' ~ plugin_id|clean_class,
    +]
    +%}
    

    Nit: The indentations are not correct here.

  3. +++ b/core/profiles/demo_umami/themes/umami/templates/components/help-block/block--help.html.twig
    @@ -0,0 +1,46 @@
    +        <h2{{ title_attributes }}>{{ label }}</h2>
    ...
    +        {{ content }}
    

    Nit: These should be intended with 2 fewer spaces.

gábor hojtsy’s picture

My understanding was @kjay was planning on a more general solution that does not require block templates per special block. If that is not going to happen, this is still a visually superior solution :)

kjay’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new6.31 KB
new4.19 KB
new223 KB
new233.68 KB
new432.3 KB

Thanks @lauriii for the review. I've addressed your points in the attached.

Here's a version of the highlighted region that acts as a container for whatever blocks are thrown at it. It means moving away from the (slightly) better looking 100% width viewport status messages, but this still looks pretty good and I think is very clear.

And here's some screenshots to show how this should look when applied, including a custom block of lorem ipsum to show how the region looks with standard block content.

Layout builder help text.

Lorem ipsum custom block example.

Status message examples.

shaal’s picture

Status: Needs review » Reviewed & tested by the community
Related issues: +#3043228: Add Umami-specific styling for Layout Builder messages, +#3044366: Fix styling of Umami for layout builder
StatusFileSize
new125.36 KB

Looks great!
I tested it on desktop, mobile, and RTL.

Attached - a preview of RTL mobile

I added related issues of Layout Builder theming in Umami.

kjay’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new6.82 KB
new335 bytes
new155.4 KB

Thanks for the review @shaar. I'm sorry, I messed the patch up. Plus 8.8.x just got an update that causes an error applying the patch in #12.

Here's a re-roll and to fix the error in my previous patch, the missing highlighted.css file is now included. The screenshots on #12 remain unchanged and there should have been margin around the highlighted region content on all screen sizes.

Layout builder dialogue mobile.

pawandubey’s picture

@kjay

Patch#14 looks fine just need to fix end line issue.

shaal’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new64.01 KB
new6.77 KB
new1.33 KB

I added the missing newline in 2 files - highlighted.css&help.svg

@kjay this one looks even better :)

The new mobile RTL looks like this now -

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/profiles/demo_umami/themes/umami/templates/components/help-block/block--help.html.twig
@@ -0,0 +1,46 @@
+  <div class="block-help__container container">

Just realized that we have nested container elements. Should we remove the inner container since it's redundant?

There's also some stylelint coding standard violations after #3024527: Add and configure stylelint-order landed. You can see the change record for how to fix those automatically.

kjay’s picture

@lauriii We could remove the container but won't that mean we're going to be messing around with some fiddly offsets for the background image? At the moment we can use background position as left or right and it positions up against the padding of the parent nicely. If we go down the route of removing that inner wrapper, we'll need two switch to using px's or rems for the padding to give us fine control (or a mix of them both) and we'll need to do some kind of right offset (which I think is supported by modern browsers) as we can't just position the background image right.

Are we sure it's worth it?

kjay’s picture

Status: Needs work » Needs review
StatusFileSize
new6.71 KB
new3.28 KB

I've misunderstood and @lauriii is referring to the unnecessary .container class on the inner wrapper, not the wrapper itself. New patch attached along with yarn fixes. Thanks @lauriii and @pawandubey

kjay’s picture

Hoping this will nudge a new test.

Status: Needs review » Needs work

The last submitted patch, 19: ootb-layout-builder-hightlight-3044250-19.patch, failed testing. View results

pawandubey’s picture

@kjay

I have reviewed the patch and its working in both mobile and desktop layout as per attached screenshots.

I have re-rolled the patch again to fix the minor end line issue for the .svg file.

shaal’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new116.79 KB

I tested #22

I reviewed the code and tested the patch using Chrome, IE11, with LTR/RTL and various screen width.

In addition to the screenshots in #22, here's the preview of IE11 + RTL:

gábor hojtsy’s picture

Title: Make the highlighted region more presentable » Make the highlighted region in Umami more flexible so it adapts to its use with Layout Builder and could be used to demonstrate placement of other blocks

Assigning credits and cleaning up the title.

  • Gábor Hojtsy committed be2f08e on 8.8.x
    Issue #3044250 by kjay, shaal, pawandubey, markconroy, Gábor Hojtsy,...
gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all!

  • Gábor Hojtsy committed f12a2e2 on 8.7.x
    Issue #3044250 by kjay, shaal, pawandubey, markconroy, Gábor Hojtsy,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.