Repository navigation
Let a table column grow to fill the table's width - #35
Merged
Merged
Conversation
A table was only as wide as its cells, so in a box or a screen whose other lines span the width its heading rule and columns stopped short. TableColumn.Grow gives a column a share of the width left over once every column fits; a table with one fills its width. HTML marks it ms-fill (width: 100%) and gives each growing heading its share as a percentage. A growing column stops at its Max, and the serializer keeps the share. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018eAjtsQTFqWAeWQMc7ebNo
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (7)
✨ Finishing Touches📝 Generate docstrings
Comment |
A percentage width on the growing heading made the browser squeeze every other column to its narrowest. The table now carries a colgroup with each column's share of the width as the text layout draws it (Table.ColumnWidths), and a page narrow enough to hide columns lets the rest share the width freely. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018eAjtsQTFqWAeWQMc7ebNo
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018eAjtsQTFqWAeWQMc7ebNo
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.
Before: a
Tablewas only as wide as its cells. Inside a box, or on a screen whose rules span the width, its columns and heading rule stopped partway across.After: a column with
Growtakes a share of the width left over once every column fits, so the table fills its width, heading rule included. In HTML such a table isms-fill(width: 100%inLayoutCss), and each growing heading carries its share as a percentage width.How:
Table.Widthshands the spare cells to the growing columns by share (Spread). The cells lost to rounding go to the first growing column, and no column grows past itsMax. A table too wide for its width is unchanged. The serializer keeps the share asgr. Tests cover filling, shares, too-wide,Max, HTML and the round trip. SharpMUSH uses it for the+help/+scenetables (SharpMUSH/SharpMUSH#1640).🤖 Generated with Claude Code
https://claude.ai/code/session_018eAjtsQTFqWAeWQMc7ebNo
Generated by Claude Code