feat(table): add widths option to control column sizes#909
feat(table): add widths option to control column sizes#909
Conversation
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
|
Summary
🎉 No failed tests in this run. Github Test Reporter by CTRF 💚 |
|
I suggest we formalize the syntax rules for all table options before we design each feature separately. Proposed rulesSyntax shape
Values
Option lines
Cell attrs
Rendering
Compatibility
|
|
Following these rules, the syntax for each feature could look like this: WidthsCell backgroundHeader + stickyMerge cells (existing, no changes)SortingFiltering |
|
And combinations of these features could look like this: 1. Styled report table2. Sortable table with merged cells3. Full-featured table4. Simple colored status table |
|
I also noticed some design questions that need a separate discussion. Sticky: property name vs value?Two possible approaches: Option A — value of Option B — separate boolean property: Option B is more flexible, but more verbose. Option A is shorter, but mixes semantics (what is a header) with behavior (how it behaves). Sticky columns and rows in the futureToday we only talk about sticky header. But in the future a user may want to:
If we choose or even: |
This is outside the scope of the current PR |



Description
Adds per-table column width control via
|:{widths="200px auto 10%"}option syntax, rendered as<colgroup>/<col>HTML elements.Example:
Specifics:
|:{key="value"}widthsvalue is space-separated CSS values (e.g.,30px auto 100px)auto; more widths → ignore extras<colgroup>renderedstyle="width:..."attribute