Skip to content

fix(list): forward justify to filter controls - #192

Merged
markdumay merged 1 commit into
mainfrom
fix/list-filter-justify
Aug 3, 2026
Merged

fix(list): forward justify to filter controls#192
markdumay merged 1 commit into
mainfrom
fix/list-filter-justify

Conversation

@markdumay

@markdumay markdumay commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Unblocked: gethinode/hinode#2115 shipped as hinode v3.18.0.

Problem

justify on the list block reached the section wrapper and the heading, but never the table.

utilities/section.html applies it as align-items-* to the column as a whole. With a width set, that centers the col-12 col-md-* wrapper and leaves its contents flush left, while assets/section-title.html separately centers the heading via mx-auto. On a filtered list the result is a centered heading above a left-aligned filter button group.

Change

Forward justify into $tableArgs so assets/table.html can position the filter row. The table itself is unaffected — it spans the full width of its container either way.

Merged in only when the author set it, rather than passed on every call:

{{ with .justify }}
    {{ $tableArgs = merge $tableArgs (dict "justify" .) }}
{{ end }}

Hinode is a separate module that a site resolves independently — it does not import mod-blocks — so the two versions can move apart. justify reached the table structure only in hinode v3.18.0, and an older copy rejects an unknown argument whatever its value. An unconditional forward therefore broke every list block for anyone updating mod-blocks alone:

ERROR partial [assets/table.html] - Invalid arguments: components/list.md
	[table] unsupported argument 'justify'

Guarding it narrows the requirement to the authors who actually set justify.

Verification

pnpm test passes.

  • exampleSite/go.mod bumped to hinode v3.18.0
  • Added a centered, filtered list fixture to exampleSite/content/components/list.md, which renders:
    class="table-filter-controls d-flex justify-content-center mb-3"
    
  • Backward compatibility checked explicitly: rebuilt against hinode v3.16.3 with no justify set. Clean build. The unconditional version failed the same build on every list block, which is what motivated the guard.

Also verified end-to-end in a consuming site: the affected page renders the heading and the filter bar aligned.

Note

The earlier revision of this branch was committed with --no-verify, since its build could not pass before v3.18.0 existed. That is no longer the case — the hook passes on its own now.

🤖 Generated with Claude Code

`justify` reached the section wrapper and the heading, but not the
table. The section applies it to the column as a whole, so with a
`width` set it centered the column and left its contents flush left —
a centered heading above a left-aligned filter button group.

Forward the argument to assets/table.html, which positions the filter
row only. The table still spans the full width of its container.

Merged in only when the author set it, rather than passed on every
call. Hinode is a separate module that a site resolves independently —
it does not import mod-blocks — and `justify` reached the table
structure in hinode v3.18.0. An older copy rejects an unknown argument
whatever its value, so an unconditional forward would break every list
block for anyone updating mod-blocks alone. Guarding it means only the
authors who set `justify` need the newer hinode.

Bump exampleSite to hinode v3.18.0 and add a centered, filtered list
fixture that renders `justify-content-center`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@markdumay
markdumay force-pushed the fix/list-filter-justify branch from 699b44d to 2064220 Compare August 3, 2026 08:25
@markdumay
markdumay marked this pull request as ready for review August 3, 2026 08:25
@markdumay
markdumay enabled auto-merge August 3, 2026 08:27
@markdumay
markdumay merged commit 36576c8 into main Aug 3, 2026
8 checks passed
@markdumay

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 2.3.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@markdumay
markdumay deleted the fix/list-filter-justify branch August 3, 2026 08:53
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