Repository navigation
fix(files): keep Markdown tables readable while scrolling #10041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -378,19 +378,33 @@ | |
| border-radius: 4px; | ||
| } | ||
|
|
||
| /* Borders, padding, typography, and header fill come from document-table.css — the chrome shared | ||
| with the CSV/XLSX previews. Only the editor-specific bits live here: `table-layout: fixed` is | ||
| required by prosemirror-tables' column-resizing plugin, and `overflow: visible` lets a | ||
| collaborator's caret name label escape the table box instead of being clipped (fixed layout means | ||
| columns can't exceed the table width, so nothing else needs clipping). */ | ||
| .rich-markdown-nodes table { | ||
| table-layout: fixed; | ||
| /* Keep wide tables inside their own viewport. Vertical padding keeps peer labels inside the clip. */ | ||
| .rich-markdown-nodes .tableWrapper { | ||
| max-width: 100%; | ||
| overflow-x: auto; | ||
| } | ||
|
Comment on lines
+382
to
+385
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
A collaborator name can be clipped after the user scrolls a wide table. Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
|
|
||
| /* Content sizing avoids dividing many columns into single-character strips. */ | ||
| .rich-markdown-nodes .tableWrapper > table { | ||
| table-layout: auto; | ||
| width: max-content; | ||
| overflow: visible; | ||
| } | ||
|
|
||
| /* The block margin is prose rhythm, so it stays with the type scale. */ | ||
| .rich-markdown-prose table { | ||
| margin: 1rem 0; | ||
| .rich-markdown-nodes .tableWrapper > table > tbody > tr > th, | ||
| .rich-markdown-nodes .tableWrapper > table > tbody > tr > td { | ||
| min-width: 80px; | ||
| max-width: 320px; | ||
| overflow-wrap: anywhere; | ||
| } | ||
|
|
||
| .rich-markdown-prose .tableWrapper { | ||
| margin: 0.5rem 0; | ||
| padding: 0.5rem 0; | ||
| } | ||
|
|
||
| .rich-markdown-prose .tableWrapper > table { | ||
| margin: 0; | ||
| } | ||
|
|
||
| /* A diff's links are chips, so they keep their own colour instead of the prose link style. */ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The visibility guard can permanently suppress recovery: after Tiptap hides the menu when the selection leaves a clipping ancestor, subsequent scroll callbacks are ignored, so scrolling back cannot reposition and show the toolbar. Dispatch the position update whenever the connected menu and editor are alive, regardless of its current visibility.
Prompt for AI agents