fix(compare): stop the comparison table scrolling sideways at every width - #132
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
/comparesetmin-w-[60rem]on the table insideMarketingShell'smax-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/ROWSarrays — no content is duplicated, only the rendering:xland up — the table breaks out to 68rem via negative margins and drops the min-width. All six approaches fit, no scrolling. Deliberately notvw-based:100vwincludes the scrollbar and would reintroduce the exact overflow this removes.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.scrollWidthnever exceedsclientWidthat any widthdisplay:none(so it is out of the a11y tree too)xlboundary the 1088px table sits inside 1280px with ~91px margin362/362 unit tests, typecheck, lint and build clean. No console errors on the page.
https://claude.ai/code/session_01XBNGwWrPih2Xgu6MVrcd6R