Skip to content

1616: Epic: Section Color — Component theme picker parity across all Layout Builder section types - #509

Open
dblanken-yale wants to merge 9 commits into
after-2260from
1616-section-color-parity
Open

1616: Epic: Section Color — Component theme picker parity across all Layout Builder section types#509
dblanken-yale wants to merge 9 commits into
after-2260from
1616-section-color-parity

Conversation

@dblanken-yale

@dblanken-yale dblanken-yale commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Important

Post-RC work — do NOT bring this into the upcoming release.

This epic targets after-2260 deliberately. It is not intended for the release currently
in RC; it can be brought forward once RC testing is complete and the release has shipped.
Do not retarget this PR at develop to get it merged sooner.

Note for reviewers: after-2260 is currently at the same commit as develop, so the diff
here reads like a develop diff. That is expected — the isolation comes from when
after-2260 is 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.

  • Add section background color picker to One column and Two Column (70/30) layouts
  • Lock the picker's option set for parity across all section types (add slot-three as 6th option)
  • Audit and fix block contrast against new One column / 70-30 section backgrounds
  • Clean up slot-nine border misuse in Accordion, Wrapped Callout, and Link Grid
  • Update user guides for both new section types

Functional testing steps:

Epic status at time of writing

Child ticket Status Landed on 1616-section-color-parity?
#1518 option-set parity (slot-three as 6th option) Ready for Release (in dev) Yes
#1541 Two Column (70/30) picker Ready for Release (in dev) Yes
#1549 One column picker Ready for Release (in dev) Yes
#1613 block contrast audit + fixes In review Partial — see child PRs below
#1614 slot-nine border/accent misuse In review Child PR open against this branch
#1588 / #1615 user-guide documentation To Do / Backlog Not started (owned separately)

Child PRs stacked on this branch

Known open items carried by this epic

  • Two WCAG AA failures are found but NOT fixed (Whitney Humanities Center: section three 2.42:1, section four 2.99:1). The candidate fix re-pointed --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.
  • The slot-1/6/7 pairing rule from #1539 does not generalise. Extending the computation from slot-nine to all six section backgrounds gives safe foreground sets of one→{8,9}, two→{6,7}, three→{8}, four→{8}, five→{1,6,7}, six→{7} — an empty intersection. #1539 was only ever measured against slot-nine. Use the per-background sets, not a single fixed triple.
  • Stacked PRs get no Test CI. test.yml triggers only on PRs targeting main or develop, so PRs based on this branch run no tests. Worth fixing in the workflow's branches: filter.

References yalesites-org/YaleSites-Internal#1616

dblanken-yale and others added 8 commits August 13, 2026 17:40
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.
…' 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
…picker

1541: Add color theme picker to Two Column (70/30) layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant