The original design for the recipe content type in Umami used a complex field layout that was not possible without Layout Builder being stable. Umami began making use of Layout Builder to manage the display of the recipe content type's full page view mode in 8.7.x but this implementation was a simple demonstration of the type's fields using one column Layout Builder sections.
This issue follows up on that work to use Layout Builder to display the recipe content type in a way that is more closely aligned to the original design (#2900720).

I propose a few interpretations of this original design layout in order to keep the demo flexible with how core works:
- Stack the recipe category and tags fields, don't 'inline' them like they are in this visual.
- Move the summary to appear above the image and extend 100% width of its container. This will be more practical, flexible, and is probably a better design approach.
- Remove the cream coloured background section from behind the ingredients and method. This will require layout styles and may be a future enhancement to demonstrate such a feature. But will simplify the implementation.
- Remove the "What you'll need and how to make this dish" sub-heading to ingredients and method. This would require complexity in the master layout and isn't necessary for the demo experience.
Note:
Although not essential, I recommend this issue should be dependent on the responsive layout style improvements made in #3001660. As such, any patches supplied on this issue would ideally be visually tested with that issue applied also.
| Comment | File | Size | Author |
|---|---|---|---|
| #25 | interdiff.txt | 7.2 KB | lauriii |
| #18 | Screen Shot 2019-11-21 at 20.58.59.png | 74.2 KB | lauriii |
| #18 | Screen Shot 2019-11-21 at 20.58.48.png | 53.07 KB | lauriii |
| #14 | interdiff-11-14.txt | 2.85 KB | kjay |
| #14 | drupal-umami_recipe-ctype-layout-builder--3085534-14.patch | 26.79 KB | kjay |
Comments
Comment #2
kjay commentedHere's a patch that provides the following changes:
How it looks at desktop size:
How it looks at small size:
How default layouts with gutters now look with 2, 3, 4 columns
Comment #3
kjay commentedComment #5
kjay commentedWe reviewed this issue in the Out of the Box call this week and @markconroy noted that it would be better to follow the same method for layout in the 2 column and one plus four grid layout as we have in the 3 column where negative margins are used on the wrapper and equal left/right margins are applied to the children.
I also found errors in my original layout work so here is a new patch for review.
Comment #7
markconroy commentedWe reviewed this on a number of calls this week over Google Hangouts.
Marking RTBC, reviewed by myself @shaal
Thanks for the work on this @kjay
Comment #8
webchickLOOK AT THAT!! IT'S GLORIOUS!!
I'm not sure I feel comfortable reviewing/committing this myself, since there's a lot of front-end code in there, but HOLY COW does that look great!! :D
Comment #9
lauriiiThis needs a reroll 🧚♂️
Comment #10
shaalAfter media images got committed to core, attempting a re-roll... going once...
(and adding a reroll diff instead of the regular interdiff)
Comment #11
shaalFound a CSS code in recipe.css that was removed in #5 but I restored it by mistake, removing that CSS again.
Comment #12
shaalI ran a full visual regression test comparison through https://diffy.website
When applying the latest patch from #3001660: Fix Umami's responsive layout styles + the latest patch from this issue, the result is stunning.
I compared the previous RTBC'd patch and the current patch, you can download the visual comparison differences (150MB).
You'll notice that the only changes are actually unrelated (improvements in Drupal core's translation to Spanish...)
https://diffy-files.s3.amazonaws.com/2019/11/06/Umami88x2019-11-6-1903.t...
Comment #13
lauriiiThis could be a follow-up or something we don't want to do but I noticed that the category and tags are inline on the designs. Has that changed since then or should we make that change to make the designs match more closely with the original designs?
Maybe this could be more specific.
grid-wrappersounds very generic. Something likelayout__four-grid-groupwould at least in my opinion be clearer.Should we make the machine name match with these? Also, there's a double underscore before the section.
Comment #14
kjay commentedThank you @lauriii for your review. I have addressed the points below and in the attached patch.
Comment #15
shaalInterdiff file looks good!
I finished running visual regression test with diffy.website between patch #14 and the previous patch.
0 differences, and all pages look exactly as they should!
RTBC'd :)
Comment #16
lauriiiThe changes in #14 address all of my feedback on #13. We're on a commit freeze right but I will come back here after the freeze ❄✌️
Comment #17
shaalYou can use this link to view the Diffy visual comparison of before/after this patch + #3001660: Fix Umami's responsive layout styles
https://app.diffy.website/#/shared/MTgxMTExNDA2/diffs/18111
Comment #18
lauriiiDo we want the icons to be present in Layout Builder?
Comment #19
lauriiiMoving back to needs work after talking to @shaal and @kjay.
Comment #20
lauriii#18 is a pre-existing issue not caused by this. Let's open a follow-up for that. Feel free to move this back to RTBC once the issue has been opened 😇
Comment #21
markconroy commented@lauriii follow-up created here #3096350: Layout Builder omits view-mode class when editing layout
Setting back to RTBC
Comment #25
lauriiiThank you for opening the follow-up!
I applied
yarn run lint:css --fixand fixed manually a coding standard problem in the Twig template. Interdiff attached.Committed f193ad9 and pushed to 9.0.x, 8.9.x and 8.8.x. Thanks!
Comment #27
chenx319 commentedhello , is this feature is released in drupal 8.9.13 ?
Comment #28
markconroy commentedHi @chenx319
Yes, this feature has been in Drupal core since 8.8 which was released about a year ago.