Skip to content

Fix table column maximum widths - #557

Open
draarivpatel-ui wants to merge 2 commits into
python-poetry:mainfrom
draarivpatel-ui:fix-table-column-max-width
Open

draarivpatel-ui wants to merge 2 commits into
python-poetry:mainfrom
draarivpatel-ui:fix-table-column-max-width

Conversation

@draarivpatel-ui

Copy link
Copy Markdown

Summary

Fixes #88.

Table.set_column_max_width() now writes to the maximum-width mapping used when rendering, instead of the fixed-width mapping. This makes long cell contents wrap instead of silently treating the configured value as a minimum width.

The wrapping path also now supports tables constructed with either IO or Output. Previously the normal IO case failed an assertion because only Output exposes a formatter directly.

Tests

  • Added a regression test for a wrapped cell in a table constructed with IO.
  • pytest -q tests/ui/test_table.py: 22 passed.

Copilot AI balanced review requested due to automatic review settings November 25, 2026 16:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table rendering throws ValueError (invalid width) for tables wider than screen

2 participants