1616: Epic: Section Color — Component theme picker parity across all Layout Builder section types - #509
Open
dblanken-yale wants to merge 9 commits into
Open
1616: Epic: Section Color — Component theme picker parity across all Layout Builder section types#509dblanken-yale wants to merge 9 commits into
dblanken-yale wants to merge 9 commits into
Conversation
Two Column (70/30) in yalesites-project is switching from its own yds-two-column organism to the shared yds-layout organism from component-library-twig. This hand-written admin CSS positioned the Layout Builder contextual-links pencil icon scoped to yds-two-column classes only; added a matching selector for yds-layout[data-component-layout='seventy-thirty'] so the fix still applies once 70/30 stops using the old classes.
Core's "One column" layout renders through this template, but it never carried the yds-layout class or data-component-theme attribute the section color rules in _yds-layout.scss key on. Add both, only when a theme other than "Default - no color" is picked, so an unthemed section's markup is unchanged. Deliberately does not embed @organisms/layout/layout the way Two Column/Three Column do -- this layout's own child components already bring their own site-width/gutter containment, so embedding the organism's __inner wrapper would double it up. See yalesites-org/YaleSites-Internal#1549.
…mponent-theme-picker
…' into 1549-one-column-component-theme-picker
A themed One column section with no blocks in it rendered nothing at all, so no colour band appeared after saving the layout, while Two Column (70/30) and 50/50 sections show one. The wrapper was guarded on `content.content` -- this layout's single region -- and LayoutDefault::build() only copies regions that actually hold components, so that key is unset for an empty section. `content` itself stays truthy because build() always adds `#settings`/`#layout`, which is why the sibling templates guard on it and behave differently. The guard now also passes when a theme is picked, rather than simply switching to `content` the way the siblings do. An unthemed empty section has to keep rendering nothing: several rules select on which onecol section is first or last among its siblings -- `.main-content .layout.layout--onecol:last-of-type .layout__region--content > *:last-child` supplies the page's bottom margin before the footer, and `.main-content > *:first-child` supplies the top margin -- and the post, event, and page default displays each ship a trailing EMPTY layout_onecol "Content Section". Rendering those would hand `:last-of-type` to an empty wrapper and drop that bottom margin on every node using those displays. Also guards the region attributes, which are only built for regions that hold components and so are undefined for an empty section. This template adds classes to them where the siblings only print theirs, and a method call on an undefined variable throws once a site turns on Twig's strict_variables.
…theme-picker 1549: Layout Section: add Component theme picker support to One column layout
This was referenced Aug 27, 2026
…picker 1541: Add color theme picker to Two Column (70/30) layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Post-RC work — do NOT bring this into the upcoming release.
This epic targets
after-2260deliberately. It is not intended for the release currentlyin RC; it can be brought forward once RC testing is complete and the release has shipped.
Do not retarget this PR at
developto get it merged sooner.Note for reviewers:
after-2260is currently at the same commit asdevelop, so the diffhere reads like a develop diff. That is expected — the isolation comes from when
after-2260is merged forward, not from the branch currently differing.1616: Epic: Section Color — Component theme picker parity across all Layout Builder section types
Description of work
This epic brings the Component theme (section background color) picker to every Layout Builder section type an editor can add, and ensures blocks placed in newly colorable sections stay readable against all backgrounds.
Functional testing steps:
Epic status at time of writing
1616-section-color-parity?Child PRs stacked on this branch
Known open items carried by this epic
--color-layout-border, which turned filled CTAs from gold to white in four of seven global themes, so it was reverted. Resolving these needs a design decision, tracked for follow-up rather than resolved here.TestCI.test.ymltriggers only on PRs targetingmainordevelop, so PRs based on this branch run no tests. Worth fixing in the workflow'sbranches:filter.References yalesites-org/YaleSites-Internal#1616