Skip to content

fix: large header is missing and cursor is buggy in doc with footnotes#2659

Open
VladaHarbour wants to merge 3 commits intomainfrom
sd-2234_missing-header
Open

fix: large header is missing and cursor is buggy in doc with footnotes#2659
VladaHarbour wants to merge 3 commits intomainfrom
sd-2234_missing-header

Conversation

@VladaHarbour
Copy link
Copy Markdown
Contributor

No description provided.

@linear
Copy link
Copy Markdown

linear bot commented Mar 31, 2026

@VladaHarbour VladaHarbour force-pushed the sd-2234_missing-header branch 2 times, most recently from 07bb47b to a79afa3 Compare April 1, 2026 11:15
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VladaHarbour looks good, no blockers.

both root causes are fixed correctly:

  1. first-page headers now get cached (not just the default one), so they render on load
  2. header heights survive the footnote relayout pass, so body text doesn't overlap tall headers

the footnote position guards are also correct — footnotes use a separate position space that overlaps with the body, so skipping them prevents wrong cursor/scroll jumps.

spec check

tested with 6 Word-native documents against ECMA-376 rules:

test what it checks result
titlePg + first header + footnotes core bug fix pass
multi-section, sec2 inherits first header variant inheritance pass
multi-section, sec2 titlePg=false first header suppressed pass
first header + 3 footnotes both fixes together pass
evenAndOddHeaders even page header selection fail pre-existing gap, tracked as SD-2450
empty first header suppresses inheritance pass

5 passing test docs uploaded to the rendering corpus for layout + visual regression coverage.

even/odd gap (pre-existing, tracked as SD-2450)

SuperDoc always shows the default header — it doesn't switch to the even header on even pages. Word does. this isn't caused by this PR and the cache already includes even refs, so it'll be ready when even/odd rendering is added.

test5-even-odd-headers.docx

SuperDoc:
image

Word:
image

left 2 small inline comments, neither blocking.

@VladaHarbour VladaHarbour force-pushed the sd-2234_missing-header branch from a79afa3 to 9e7b817 Compare April 3, 2026 16:02
@VladaHarbour VladaHarbour requested a review from caio-pizzol April 3, 2026 16:13
… layout

- Layout engine: verify oddEvenHeadersFooters drives physical-page parity
  for margin inflation (odd pages get odd-header height, even pages get
  even-header height), and that the option being unset keeps default behavior
- HeaderFooterPerRidLayout: verify even/odd header refs inherited from
  earlier sections produce per-section layout cache entries
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VladaHarbour both items from last round are fixed, nice.

tested the even/odd headers with the same test file from round 1 — SuperDoc now matches Word. odd pages show the odd/default header, even pages show the even header (correctly inherited across sections).

pushed a commit adding tests for the even/odd behavior.

@caio-pizzol caio-pizzol enabled auto-merge April 3, 2026 22:44
@caio-pizzol caio-pizzol added this pull request to the merge queue Apr 3, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 3, 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.

2 participants