Skip to content

feat(views): add header views (gen:HeaderView) - #573

Merged
tkuhn merged 1 commit into
masterfrom
572-header-views
Jul 29, 2026
Merged

feat(views): add header views (gen:HeaderView)#573
tkuhn merged 1 commit into
masterfrom
572-header-views

Conversation

@tkuhn

@tkuhn tkuhn commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements header views (#572): a new query-less display type that renders just a section header at its structural position — like the hardcoded "Structure" etc. headers on the About pages — with a title, an optional description text shown below it, and optional (result-level) action templates.

  • gen:HeaderView added to KPXL_TERMS and to View's supported display types; dct:description is parsed; the query-required check is skipped for header views (the one display type without gen:hasViewQuery).
  • ViewList branches to the new HeaderViewPanel before any query machinery runs; the panel defaults to full width and reuses the section-header styling, so a header leads its position-group's section stripe.
  • HeaderViewPanel renders a flex title row (menu right-aligned outside the h3, so it keeps the body font), the description paragraph below the line, and the view's result-level actions as top entries of the view-display dropdown.
  • ViewDisplayMenu accepts a null query ref, hiding the query-dependent entries (show query, full screen, refresh now) while keeping show view / edit / deactivate / show nanopub.
  • ViewResultsPage guards against query-less views; CSS cache param bumped.

Ecosystem

  • Creation template "Declaring a header view" published: RAZYU_kQ… — fixed gen:ResourceView, gen:HeaderView types, kind, label, title, optional description, applies-to fields, structural position, optional width, optional gen:ViewResultAction-only action group (no query fields).
  • No server-side changes needed: get-view-displays (both variants) and all listing/resolution queries key on gen:ResourceView only, which header views keep alongside gen:HeaderView; verified against the published query nanopubs.
  • Older instances degrade gracefully: the old View constructor's "Query not found" throw is swallowed per-row at display-list assembly, so header views are silently skipped (server-log line only), never a page error.

Test plan

Verified end-to-end on a local instance against a live test header view (RAUqJMjX…/test-header-view) displayed on the test/group space: renders full-width at position 5.1 with underline + description, dropdown right-aligned with the action entry (correct pre-filled publish link) and without the query-dependent entries.

Closes #572

🤖 Generated with Claude Code

…n, and actions

A new query-less display type (issue #572): a view that renders just a
section header at its structural position, with a title, an optional
description text below it, and optional result-level action templates.

- View: gen:HeaderView added to the supported types, dct:description
  parsed, and the query-required check skipped for header views
- ViewList: header views branch to the new HeaderViewPanel before any
  query machinery runs (full-width by default, section-header styling)
- HeaderViewPanel: flex title row with the view-display menu
  right-aligned outside the h3, description paragraph, and result-level
  actions as top menu entries
- ViewDisplayMenu: tolerates a null query ref, hiding the
  query-dependent entries (show query, full screen, refresh now)
- ViewResultsPage: guards against query-less views

Views are created with the published "Declaring a header view"
template (RAZYU_kQZ0B3ruoNSeZOaKR6M93PJ-z1jlArXl7_H4EEU). No
server-side changes needed: all listing/resolution queries key on
gen:ResourceView only, which header views keep alongside gen:HeaderView.
Older Nanodash instances skip header views gracefully (logged,
per-row) without breaking the page.

Closes #572

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tkuhn
tkuhn merged commit 6f9d833 into master Jul 29, 2026
7 checks passed
@tkuhn
tkuhn deleted the 572-header-views branch July 29, 2026 11:53
tkuhn added a commit to knowledgepixels/nanopub-skill that referenced this pull request Jul 29, 2026
Documents the new query-less header-view type (nanodash issue #572,
PR knowledgepixels/nanodash#573): assertion shape, rules differing
from regular views, creation template pointer, and old-instance
compatibility. Adds the published 'Declaring a header view' template
to the local template collection.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 5.8.0 🎉

The release is available on:

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.

Allow for "header views"

1 participant