Skip to content

feat(list): forward filter-responsive to the table partial - #203

Merged
markdumay merged 1 commit into
mainfrom
feat/list-filter-responsive
Aug 23, 2026
Merged

feat(list): forward filter-responsive to the table partial#203
markdumay merged 1 commit into
mainfrom
feat/list-filter-responsive

Conversation

@markdumay

Copy link
Copy Markdown
Contributor

Summary

Forwards filter-responsive from the list component 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.html builds its table args explicitly, one key at a time. An argument missing from that dict never reaches assets/table.html, however the author spells it in frontmatter — and there is no warning, because the key is simply dropped. filter / filter_col / wrap were forwarded; filter-responsive was not, so a filtered list block had no way to opt in.

Changes

  • list.hugo.html — forwards the argument, reading both spellings the way filter-col already 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:

ERROR partial [.../list.hugo.html] - Invalid arguments: components/list.md
        schema: missing type for 'list.filter_responsive'

Both bumps are in this PR, so it builds standalone.

Testing

pnpm test passes. The example site builds clean against released modules only — no local replacements, _vendor re-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.

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]>
@markdumay
markdumay merged commit 79f57ce into main Aug 23, 2026
8 checks passed
@markdumay
markdumay deleted the feat/list-filter-responsive branch August 23, 2026 10:38
@markdumay

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 2.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant