Skip to content

feat: support wide tables rendering outside of margins#2823

Open
VladaHarbour wants to merge 2 commits intomainfrom
sd-2544-2545_wide-table-prep
Open

feat: support wide tables rendering outside of margins#2823
VladaHarbour wants to merge 2 commits intomainfrom
sd-2544-2545_wide-table-prep

Conversation

@VladaHarbour
Copy link
Copy Markdown
Contributor

No description provided.

@linear
Copy link
Copy Markdown

linear bot commented Apr 15, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb148ad488

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 199 to +203
if (justification === 'center') {
return { x: baseX + Math.max(0, (columnWidth - width) / 2), width };
return { x: baseX + (columnWidth - width) / 2, width };
}
if (justification === 'right' || justification === 'end') {
return { x: baseX + Math.max(0, columnWidth - width), width };
return { x: baseX + (columnWidth - width), width };
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve column ownership when aligning overwide tables

Removing the Math.max(0, …) clamp for centered/right tables lets fragment.x move left of the table’s actual flow column when width > columnWidth (e.g., a table laid out in column 2 can start inside column 1). Several layout-bridge paths infer column index from fragment.x (notably assignFootnotesToColumns in layout-bridge/src/incrementalLayout.ts and determineColumn in layout-bridge/src/position-hit.ts), so this change can misclassify the table as belonging to the wrong column in multi-column documents, which breaks footnote placement and column-aware hit testing for those tables.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

@VladaHarbour VladaHarbour Apr 16, 2026

Choose a reason for hiding this comment

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

Here for any table with width > columnWidth:

  1. centered tables would no longer shift left into the margin
  2. right/end-aligned tables would no longer overflow leftward from the content area

Adding fix to support multi-column layout together with wide tables overflow.

@VladaHarbour VladaHarbour force-pushed the sd-2544-2545_wide-table-prep branch from eb148ad to a06f987 Compare April 16, 2026 09:35
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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