feat(list): forward filter-responsive to the table partial - #203
Merged
Conversation
The list component builds its own table args and passes them to assets/table.html one by one, so an argument absent from that dict never reaches the table however the author spells it in frontmatter. `filter-responsive` (hinode v3.22.0) was missing, leaving component-rendered tables unable to collapse their filter button group into a dropdown on narrow viewports while shortcode-rendered ones could. Reads both spellings the way `filter-col` already does, since a bookshop blueprint declares keys in snake_case while the table partial expects kebab-case. Bumps the example site to hinode v3.22.0, which is where the argument exists, and adds a demo block so the forward is exercised rather than merely declared. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Contributor
Author
|
🎉 This PR is included in version 2.5.0 🎉 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
Forwards
filter-responsivefrom thelistcomponent to the table partial, so component-rendered tables can collapse their filter button group into a dropdown on narrow viewports — the same thing shortcode-rendered tables gained in hinode v3.22.0.Why
list.hugo.htmlbuilds its table args explicitly, one key at a time. An argument missing from that dict never reachesassets/table.html, however the author spells it in frontmatter — and there is no warning, because the key is simply dropped.filter/filter_col/wrapwere forwarded;filter-responsivewas not, so a filtered list block had no way to opt in.Changes
list.hugo.html— forwards the argument, reading both spellings the wayfilter-colalready does, since a bookshop blueprint declares keys in snake_case while the table partial expects kebab-case.list.bookshop.yml— declares the key. No inline type: the blueprint doubles as the CloudCannon field spec, and every key here resolves against mod-utils' global definitions.exampleSite— bumps hinode to v3.22.0 (where the argument exists) and mod-utils to v6.10.0 (where its type is defined), and adds a demo block so the forward is exercised rather than merely declared.Dependency
Requires gethinode/mod-utils#365, released in v6.10.0. Without it the build fails hard rather than degrading:
Both bumps are in this PR, so it builds standalone.
Testing
pnpm testpasses. The example site builds clean against released modules only — no local replacements,_vendorre-vendored from the published tags — and the new demo block renders the dropdown with the button group hidden below the breakpoint (d-none d-md-inline-flex), while the existing filter demo above it is untouched and renders its button group at every width.Earlier in development the same build against mod-utils v6.9.0 failed with the error above, so the dependency is load-bearing rather than assumed.