mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-24 20:45:56 +03:00
[GH-ISSUE #711] Markdown table cells truncate content instead of word-wrapping #962
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#962
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mocksoul on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/711
Description
Markdown table cells use
height: 1andoverflow: "hidden", which truncates any content that doesn't fit in a single line. Long cell content is silently cut off instead of word-wrapping.Silently hiding data from the user is about the worst thing a UI can do — the user has no way to know that content was cut off, and may act on incomplete information.
Steps to Reproduce
Render a markdown table with cells containing text wider than the column width:
Expected Behavior
Cell content should word-wrap within the column, and the row height should expand to accommodate the wrapped text.
Actual Behavior
Content is truncated to a single line. Anything beyond the column width is hidden.
Screenshots
Before (content truncated):
After (content word-wraps):
Root Cause
In
createTableRenderable(), each cell'sTextRenderableis created withheight: 1andoverflow: "hidden". The table uses a column-major layout (each column is a separate flex-column container), which makes it impossible to synchronize row heights across columns when cells have different content lengths.Proposed Fix
Rewrite the table layout from column-major to row-major:
alignItems: stretch(default) automatically synchronizes cell heights within a rowheight: 1andoverflow: "hidden"— letmeasureFuncauto-calculate height based on wrapped contentflexBasisbased on natural column widths for compact tables,flexShrink: 1for proportional shrinking when the table exceeds viewport widthThis also fixes row separators:
│───│→├───┼───┤(proper T-junction characters).