Skip to content

fix: improve multi-column rendering#2369

Merged
harbournick merged 8 commits intomainfrom
sd-2008_multi-column-bug
Mar 17, 2026
Merged

fix: improve multi-column rendering#2369
harbournick merged 8 commits intomainfrom
sd-2008_multi-column-bug

Conversation

@VladaHarbour
Copy link
Contributor

Initial issue:
SuperDoc does not match Word layout for early pages in a document that combines:

  1. Continuous section breaks.
  2. A manual column break before the first custom two-column section.
  3. An asymmetric first two-column setup.
Screen Shot 2026-02-25 at 1 30 05 PM

@linear
Copy link

linear bot commented Mar 11, 2026

caio-pizzol

This comment was marked as outdated.

@caio-pizzol caio-pizzol self-requested a review March 11, 2026 21:24
Copy link
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 overall. left a few small inline comments.

one test comment at column-balancing.test.ts:293 describes a check that doesn't exist — easy fix.

normalizeColumnsForFootnotes and normalizeColumns are mostly the same ~30 lines — a shared helper would keep them in sync.

on tests: widthsEqual and cloneColumnLayout have a few branches but no unit tests. also nothing covers the case where two sections share count/gap but differ only in widths or equalWidth.

Copy link
Collaborator

@harbournick harbournick left a comment

Choose a reason for hiding this comment

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

LGTM

@harbournick harbournick enabled auto-merge (squash) March 17, 2026 21:28
@harbournick harbournick disabled auto-merge March 17, 2026 21:58
@harbournick harbournick merged commit d231640 into main Mar 17, 2026
5 of 6 checks passed
@harbournick harbournick deleted the sd-2008_multi-column-bug branch March 17, 2026 21:58
@superdoc-bot
Copy link
Contributor

superdoc-bot bot commented Mar 17, 2026

🎉 This PR is included in superdoc v1.19.1-next.3

The release is available on GitHub release

@superdoc-bot
Copy link
Contributor

superdoc-bot bot commented Mar 17, 2026

🎉 This PR is included in superdoc-cli v0.3.0-next.4

The release is available on GitHub release

harbournick pushed a commit that referenced this pull request Mar 18, 2026
# [1.20.0](v1.19.1...v1.20.0) (2026-03-18)

### Bug Fixes

* behavior tests ([#2436](#2436)) ([2d087f2](2d087f2))
* change default link protocol ([#2319](#2319)) ([1deda06](1deda06))
* **cli:** restore tracked diff redline roundtrip ([#2438](#2438)) ([f609371](f609371))
* **comments:** resolve double-click activation and edit mode issues (SD-2035) ([#2259](#2259)) ([d9465aa](d9465aa))
* **diffing:** ignore volatile OOXML attrs in image and paragraph diff comparison ([#2421](#2421)) ([ca91225](ca91225))
* **doc-api:** gate textStyle attrs and sync reference coverage ([#2430](#2430)) ([e2d6ca6](e2d6ca6))
* **docs:** coherence pass on doc api, clean up dead code, update CLI SKILL.md ([#2424](#2424)) ([bf0d4b8](bf0d4b8))
* **document-api:** add document diff API and fix tracked diff replay in CLI host session ([#2418](#2418)) ([2a804f7](2a804f7))
* **editor:** prevent scroll-to-top when clicking toolbar buttons ([#2236](#2236)) ([ab30a36](ab30a36))
* guard drawing export against invalid structures and zero IDs (SD-824) ([#2363](#2363)) ([9c7fc2e](9c7fc2e))
* improve multi-column rendering ([#2369](#2369)) ([d231640](d231640))
* **lists:** stabilize list item addresses for docs without paraIds ([#2429](#2429)) ([0070de6](0070de6))
* newline formatting inheritance without serializing style-derived formatting (SD-2228) ([#2417](#2417)) ([5a3318f](5a3318f))
* open links in view mode ([#2350](#2350)) ([25f0aad](25f0aad))
* **presentation-editor:** arrow key scroll-into-view with unconstrained containers (SD-1950) ([#2411](#2411)) ([fa8afc8](fa8afc8)), closes [#findScrollableAncestor](https://github.com/superdoc-dev/superdoc/issues/findScrollableAncestor)
* register DOCX numbering metadata for lists.create ([#2432](#2432)) ([129772f](129772f))
* seed base docx package for collaboration exports ([#2416](#2416)) ([df36853](df36853))
* show correct paragraph font in toolbar when selection is empty (SD-2145) ([#2402](#2402)) ([39e1477](39e1477))
* **super-editor:** guard against style definition nodes without elements ([#2379](#2379)) ([7dd57f8](7dd57f8))
* text selection inside headers/footers ([#2404](#2404)) ([09677dc](09677dc))
* **toc:** inject _Toc bookmarks so exported DOCX TOC links work without manual Update Table ([#2431](#2431)) ([54c5aa7](54c5aa7))

### Features

* **comments:** add scrollToComment API ([#2440](#2440)) ([0132d0e](0132d0e))
* **doc-info:** add live page counts to doc.info ([#2435](#2435)) ([e631f4b](e631f4b))
* **doc-info:** live doc.info counts for characters, tracked changes, SDT fields, and lists ([#2428](#2428)) ([2978507](2978507))

### Reverts

* Revert "fix(types): fix broken .d.ts imports in published superdoc package (S…" ([#2443](#2443)) ([33215ee](33215ee))
@harbournick
Copy link
Collaborator

🎉 This PR is included in superdoc v1.20.0

The release is available on GitHub release

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.

4 participants