docs(table): document folding a record into column groups - #140
Merged
Conversation
Table wrapping documented folding the last column, which is not enough for a table with many columns: it still scrolls sideways on a phone because the remaining columns are each narrow but there are too many of them. Document `wrap-cols` under it, with a live example, and state the rule the counts must satisfy along with what happens to a list left stale by a column being added. Notes that folded headings are hidden, since that is what makes the grouping a decision rather than a default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
Summary
Documents
wrap-colson the Table component page, under Table wrapping.Requires gethinode/hinode#2138, released in v3.23.0.
Why
The page documented folding the last column, which is not enough for a table with many columns — it still scrolls sideways on a phone, because the remaining columns are each narrow but there are too many of them.
wrap-colsfolds a record into groups so it stacks as a card instead.What's added
A Column groups subsection with a live example (
2,4,1across seven columns), covering:The generated argument table at the bottom of the page picks
wrap-colsup automatically from the structure definition.Testing
Built through hinode's example site with this branch mounted in place of the released module. The example renders as a plain table, so it folds server-side:
table-wrap table-wrap-3, three rows per record, with the values split into[Database, launch, Shipped, both]and the description.markdownlint-cli2reports 0 issues on the changed file.Note on existing lint failures
pnpm lintfails oncontent/blocks/preview.md,content/blocks/testimonials.mdandcontent/components/testimonial.md(MD060, MD012, MD009). Those are pre-existing onmainand untouched here —content/components/table.mdis the only changed file and lints clean.