Skip to content

fix(layout): lay out all header/footer variants in per-section path (SD-2500)#2759

Open
caio-pizzol wants to merge 2 commits intomainfrom
caio/sd-2500-first-page-header-variant-titlepg-not-applied-on-section-1
Open

fix(layout): lay out all header/footer variants in per-section path (SD-2500)#2759
caio-pizzol wants to merge 2 commits intomainfrom
caio/sd-2500-first-page-header-variant-titlepg-not-applied-on-section-1

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

layoutWithPerSectionConstraints only measured the default header variant per section, ignoring first/even/odd. When titlePg was enabled and the decoration provider resolved the first-page rId, it wasn't in layoutsByRId — so the cover page header with branding images never rendered.

  • Replace resolveDefaultRIdPerSection with buildEffectiveRefsBySection to collect all variant rIds per section (with OOXML inheritance)
  • Iterate and lay out each variant's rId with section-appropriate constraints
  • Remove the now-unused resolveDefaultRIdPerSection

Fixes SD-2500. Affects Patriot, M3, and Heffernan — any doc where section 1 has titlePg=true with a branded first-page header.

…SD-2500)

layoutWithPerSectionConstraints only measured the default header variant
per section, ignoring first/even/odd. When titlePg was enabled and the
decoration provider resolved the first-page rId, it wasn't in
layoutsByRId so the cover page header (with branding images) never
rendered.

Replace resolveDefaultRIdPerSection with buildEffectiveRefsBySection to
collect all variant rIds, then iterate and lay out each one with
section-appropriate constraints.
@linear
Copy link
Copy Markdown

linear bot commented Apr 9, 2026

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