docs(list): document responsive filter controls and column groups - #142
Merged
Conversation
The list block forwards `filter_responsive`, `wrap` and `wrap_cols` to the table it renders, and none of the three were documented — `wrap` was not mentioned at all, so a block author had no way to discover that a list can fold on small screens rather than run off the side. Add `filter_responsive` to the Category Filter section, and a Responsive Tables section for `wrap` and `wrap_cols` with a live example. States the rule the group counts must satisfy, what happens to a list left stale by a column being added, and that folded columns hide their headings — which 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) <noreply@anthropic.com>
Contributor
Author
|
🎉 This PR is included in version 1.15.9 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 the three table arguments the
listblock forwards but never covered:filter_responsive,wrapandwrap_cols.wrapwas not mentioned inlist.mdat all, so a block author had no way to discover that a list can fold on small screens rather than run off the side of one. The shortcode-level docs on the Table component page cover the same features, but nothing pointed a block author at the snake_case equivalents.What's added
filter_responsive: what it swaps, that the two controls stay in step across the breakpoint, and that it defaults tofalse.wrapfor the common one-wide-column case, andwrap_colsfor folding a record into groups, with a live example. Covers the rule the counts must satisfy, the fallback when a list no longer sums (one left stale by a column being added), and that folded columns hide their headings — which is what makes the grouping a decision rather than a default.The example uses the existing
table-filter-hook, which renders three columns, so"1,2"is a valid split against a hook the page already documents.Host requirement
Important
These examples need mod-blocks v2.6.0 in the consuming site. The block examples render live, so a host on an older mod-blocks does not merely fail to fold — it fails the build:
Verified both ways: hinode's example site on mod-blocks v2.4.0 errors as above; on v2.6.0 the page builds and the example emits
data-table-wrap-cols=1,2.gethinode.com mounts this module too and will need the same floor.
Testing
Built through hinode's example site with this branch mounted in place of the released module. Both sections render, and the
wrap_colsexample produces a genuinely folded table rather than only documenting one.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). Pre-existing onmainand untouched here —content/blocks/list.mdis the only changed file and lints clean.