Skip to content

fix(compare): stop the comparison table scrolling sideways at every width - #132

Merged
iiamit merged 1 commit into
mainfrom
fix/compare-table-layout
Aug 2, 2026
Merged

fix(compare): stop the comparison table scrolling sideways at every width#132
iiamit merged 1 commit into
mainfrom
fix/compare-table-layout

Conversation

@iiamit

@iiamit iiamit commented Aug 2, 2026

Copy link
Copy Markdown
Owner

The problem

/compare set min-w-[60rem] on the table inside MarketingShell's max-w-3xl (a 45rem content box), so it overflowed at every viewport size — including 4K.

The consequence was worse than an awkward scrollbar: the clipped column was the right-hand one, which is MyTailLog's. On a 1512px screen the reader saw the five alternatives and had to drag the table to reach our column — on a page whose entire purpose is that comparison.

Why widening alone wasn't enough

Seven columns of prose can't fit a 45rem measure. Several cells are full sentences ("A ZIP of every row as JSON + the original scans, re-importable"), so even a table that technically fits would give each column ~20 characters per line.

Two presentations over the same COLS / ROWS arrays — no content is duplicated, only the rendering:

  • xl and up — the table breaks out to 68rem via negative margins and drops the min-width. All six approaches fit, no scrolling. Deliberately not vw-based: 100vw includes the scrollbar and would reintroduce the exact overflow this removes.
  • Below xl — one block per axis, each answer on the full measure. Better suited to sentence-length cells, and it never scrolls.

Our column is highlighted in both views.

Verification

Driven in a real browser at 1470 / 1300 / 1280 / 1024 / 768 and narrow:

  • documentElement.scrollWidth never exceeds clientWidth at any width
  • no element extends past the viewport (the only offenders found were the Next dev overlay)
  • the correct view is shown at each breakpoint, and the other is display:none (so it is out of the a11y tree too)
  • at the xl boundary the 1088px table sits inside 1280px with ~91px margin

362/362 unit tests, typecheck, lint and build clean. No console errors on the page.

https://claude.ai/code/session_01XBNGwWrPih2Xgu6MVrcd6R

…idth

The table set min-w-[60rem] inside MarketingShell's max-w-3xl (a 45rem
content box), so it overflowed at *every* viewport size — including 4K.
Worse, the overflow cut off the right-hand column, which is MyTailLog's:
the one column the page exists to show was off-screen until you dragged
it into view.

Seven columns of prose can't fit a 45rem measure, so widening alone
wasn't enough. Two presentations over the same COLS/ROWS arrays instead
(no content is duplicated):

- xl and up: the table breaks out to 68rem via negative margins and
  drops the min-width, so all six approaches fit with no scrolling.
  Deliberately not vw-based — 100vw includes the scrollbar and would
  reintroduce the very overflow this removes.
- below xl: one block per axis, each answer on the full measure. Suits
  cells that are sentences rather than yes/no, and never scrolls.

Our column is highlighted in both views.

Verified in a browser at 1470 / 1300 / 1280 / 1024 / 768 / narrow:
documentElement.scrollWidth never exceeds clientWidth, and at the xl
boundary the 1088px table sits inside 1280px with ~91px to spare.

Claude-Session: https://claude.ai/code/session_01XBNGwWrPih2Xgu6MVrcd6R
@iiamit
iiamit merged commit 99eddf7 into main Aug 2, 2026
7 checks passed
@iiamit
iiamit deleted the fix/compare-table-layout branch August 2, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant