Repository navigation
fix(markdown): wrap table cells instead of forcing horizontal scroll - #196
Merged
Merged
Conversation
Tables in chat used min-w-max, so they always grew to their widest unwrapped content and every long row needed horizontal scrolling. - Drop min-w-max so tables fit the chat column and cell text wraps. - Wrap at word boundaries (overflow-wrap: break-word), so a column is never narrower than its longest word and words are not split mid-word. - Let links and inline code in cells break anywhere, so one long URL or path cannot force the table wide. - Lower the per-column floor (8rem -> 4rem, mobile 6rem -> 3.5rem) so short numeric columns stay compact. - Balance header wrapping. Horizontal scrolling remains as a fallback for tables whose words cannot fit (e.g. many columns on mobile).
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.
Problem
Markdown tables in chat used
min-w-max, so a table always grew to the width of its longest unwrapped content. Any table with prose in a cell (e.g. a "finding" column) ran far past the chat column, and every row needed horizontal scrolling to read.Change
Only
styles/globals.css(.markdown-renderertable rules):min-w-max: tables fit the chat column and cell text wraps.overflow-wrap: break-word), so a column never gets narrower than its longest word and words are not split mid-word (previouslyanywhereallowed columns to collapse to single characters).8remto4rem(mobile:6remto3.5rem) so short numeric columns stay compact.text-wrap: balanceon header cells.The
.markdown-table-scrollwrapper and its horizontal scroll stay as a fallback for tables whose words genuinely cannot fit (e.g. eight columns on a phone).Verification
Rendered a 2-column prose table (with a long URL and a code path) and an 8-column numeric table with the same rules at three viewport widths:
Formatting check passes. Not tested inside the running app.