Commit e11acc5
authored
fix(layout): per-section footer constraints for multi-section docs (SD-1837) (#2022)
* fix(layout): per-section footer constraints and fldSimple field rendering (SD-1837)
Footer tables now respect per-section margins in multi-section documents.
Previously, all footers were measured using the first section's content
width, causing table overflow on sections with different margins.
Key changes:
- Add margins/pageSize to SectionMetadata for per-section constraint computation
- Refactor layoutPerRIdHeaderFooters to compute per-section constraints
using composite keys (rId::sN) for section-specific measurements
- Handle pct-based table widths by pre-expanding constraints
- Add rescaleColumnWidths to all table fragment creation sites (SD-1859)
- Unwrap unhandled w:fldSimple fields (FILENAME, etc.) to render cached text
* fix(editor): footer editing and page interaction bugs (SD-1837)
Fix multiple issues with footer editing in presentation mode:
- Fix hover tooltip only showing on first page by detecting page index
from DOM via elementsFromPoint in normalizeClientPoint
- Fix double-click on footer selecting body text by properly preventing
default browser behavior on pointerdown in footer regions
- Fix clicking on page N redirecting to page 1 by keeping Y as global
layout coordinates in normalizeClientPoint (only X is adjusted for
page centering) and computing page-local Y separately from the page
element's bounding rect for header/footer hit testing
- Fix switching between footer editors on different pages by cleaning up
the previous editing session in enterMode before setting up the new one
- Fix footer table layout collapsing by setting table-layout:fixed on
tables in the footer ProseMirror editor element
- Fix wrong total page count in footer by reading body layout page count
via getBodyPageCount dependency instead of header layout
- Fix page-number NodeView reading incorrect totalPageCount property
* docs(converter): clarify preProcessPageFieldsOnly is rendering-only, not import pipeline1 parent 33e907b commit e11acc5
20 files changed
Lines changed: 666 additions & 110 deletions
File tree
- packages
- layout-engine
- contracts/src
- layout-bridge/src
- painters/dom/src/table
- pm-adapter/src/sections
- super-editor/src
- assets/styles/elements
- core
- presentation-editor
- dom
- pointer-events
- super-converter/field-references
- extensions
- page-number
- pagination
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
862 | 873 | | |
863 | 874 | | |
864 | 875 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1385 | 1385 | | |
1386 | 1386 | | |
1387 | 1387 | | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
| 1388 | + | |
1393 | 1389 | | |
1394 | 1390 | | |
1395 | 1391 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
| 849 | + | |
| 850 | + | |
849 | 851 | | |
850 | 852 | | |
851 | 853 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
207 | 209 | | |
208 | 210 | | |
209 | 211 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
165 | 177 | | |
166 | 178 | | |
167 | 179 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
0 commit comments