fix: allow markdown tables to scroll horizontally instead of compressing#12027
Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
Draft
fix: allow markdown tables to scroll horizontally instead of compressing#12027roomote-v0[bot] wants to merge 1 commit intomainfrom
roomote-v0[bot] wants to merge 1 commit intomainfrom
Conversation
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.
Related GitHub Issue
Closes: #12026
Description
This PR attempts to address Issue #12026. Feedback and guidance are welcome.
The root cause is that markdown tables in the chat view were forced to compress within the chat window width due to
table-layout: fixedandmax-width: 100%CSS rules, combined withword-wrap: break-wordon cells. This made tables unreadable in narrow chat panels.Changes in
MarkdownBlock.tsx:table-layout: fixedfrom thetablestyle -- this was forcing equal-width columns and preventing the table from sizing naturally based on contentmax-width: 100%from thetablestyle -- lets the table grow beyond the container width when content requires itmarginfrom thetablestyle since.table-wrapperalready provides itword-wrap: break-word/overflow-wrap: break-wordonth/tdtowhite-space: nowrap-- prevents cell content from wrapping so cells size to their content.table-wrapperwithoverflow-x: autonow correctly provides the horizontal scrollbar when the table content is wider than the chat windowTest addition:
Added a test to verify that tables render inside a
.table-wrapperdiv for horizontal scrolling.Test Procedure
cd webview-ui && npx vitest run src/components/common/__tests__/MarkdownBlock.spec.tsx-- all 5 tests pass (4 existing + 1 new)Pre-Submission Checklist
Screenshots / Videos
N/A -- CSS-only change, reviewers can verify by rendering a wide markdown table in a narrow chat panel.
Documentation Updates
No documentation updates are required.
Additional Notes
This is a minimal, targeted CSS fix. When a table fits within the chat width, it behaves as before. When it is too wide, a horizontal scrollbar appears -- matching the behavior described in the issue (similar to Cursor).
Interactively review PR in Roo Code Cloud