feat(web): cap markdown table column width at 700px#1587
Merged
Conversation
🦋 Changeset detectedLatest commit: 567b578 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
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 Issue
None — the problem is explained below. Follow-up to #1577.
Problem
After #1577, a wide markdown table grows with its content up to 1040px. But a table does not need many columns to become wide: a single cell holding long prose (a description column, a pasted log line, a long URL list) stretches its column without bound, dragging the whole table past the reading column and forcing horizontal scrolling where simple wrapping would read better.
What changed
--p-table-cell-max: 700pxinsrc/style.css, next to--p-table-max..table-node th/tdinMarkdown.vuegetmax-width: var(--p-table-cell-max): under the stage-1table-layout: auto, the column stops growing at 700px and the cell content wraps. markstream's cells already usewhite-space: normal+overflow-wrap: break-word, so wrapping — including long unbroken strings — is native and no wrap override is needed.--p-table-maxand scroll inside their wrapper beyond it.--p-table-cell-maxand the §04 wide-table paragraph. Changeset included.Verification:
pnpm --filter @moonshot-ai/kimi-web typecheck,check:style,build, andgit diff --checkall pass. Runtime acceptance (long single-cell table wraps at 700px; 20-column table unchanged; mobile unchanged) is manual in the browser; this package has no component-test harness.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.