Skip to content

Show all templates on Publish page as a single sortable table#472

Merged
tkuhn merged 1 commit into
masterfrom
feat/publish-all-templates-table
May 27, 2026
Merged

Show all templates on Publish page as a single sortable table#472
tkuhn merged 1 commit into
masterfrom
feat/publish-all-templates-table

Conversation

@tkuhn
Copy link
Copy Markdown
Contributor

@tkuhn tkuhn commented May 27, 2026

Replaces the topic-grouped All Templates section on the Publish page with a single, sortable table of all templates.

Changes

  • TemplateList — the per-tag grouping (DataView<Topic> + ItemListPanel + client-side TemplateData sort) is replaced by one view over the published get-all-templates query, rendered with QueryResultTableBuilder. This reuses the existing all-templates-view (a TabularView), so the renderer now matches the view's declared type. Columns: template (clickable → publish form) · tag · creator · date, each with a sortable header, plus the built-in filter box and pagination. (TemplateList.html simplified to a single all-templates container; the redundant <h3> dropped since the view supplies its title.)
  • QueryResultTable — strip a trailing _iri when deriving column headers, so headers read "template"/"user" instead of "template iri"/"user iri". Completes the pattern already applied to _multi/_multi_iri/_multi_val; the full column key is untouched, so the publish-link special-casing, label pairing, and sorting are unaffected.

Notes

  • Sorting applies across the full result set (not just the visible page); IRI columns sort on their _label companion (template sorts by name).
  • Cosmetic, query-driven leftovers: the header reads "creator" (the query's ?creator/signer), and the date shows as a raw ISO string (sorts chronologically). Prettifying those (author name, formatted date) would require editing + republishing the get-all-templates query.

Verification

  • mvn compile clean; wicket:ids match; WicketApplicationTest green. No automated PublishPage render test exists, so the page itself wasn't machine-rendered.

🤖 Generated with Claude Code

Replaces the topic-grouped "All Templates" section on the Publish page with a
single view driven by the published get-all-templates query, rendered as a
sortable table (template · tag · creator · date) via QueryResultTableBuilder.
This reuses the existing all-templates-view (a TabularView), so the renderer
now matches the view's declared type, and adds server-side data + a filter box
in place of the client-side per-tag grouping (DataView<Topic>/ItemListPanel).

Also strip a trailing _iri suffix when deriving tabular column headers, so the
header reads "template" instead of "template iri" (and "user" instead of
"user iri", etc.) — completing the pattern already applied to _multi/_multi_iri/
_multi_val. The full column key is unchanged, so the template_iri publish-link
special-casing, label pairing and sorting all still work.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tkuhn tkuhn merged commit ad92b31 into master May 27, 2026
7 checks passed
@tkuhn tkuhn deleted the feat/publish-all-templates-table branch May 27, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant