feat(views): add header views (gen:HeaderView) - #573
Merged
Conversation
…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
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>
Contributor
|
🎉 This PR is included in version 5.8.0 🎉 The release is available on:
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
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:HeaderViewadded toKPXL_TERMSand toView's supported display types;dct:descriptionis parsed; the query-required check is skipped for header views (the one display type withoutgen:hasViewQuery).ViewListbranches to the newHeaderViewPanelbefore any query machinery runs; the panel defaults to full width and reuses thesection-headerstyling, so a header leads its position-group's section stripe.HeaderViewPanelrenders a flex title row (menu right-aligned outside theh3, 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.ViewDisplayMenuaccepts a null query ref, hiding the query-dependent entries (show query, full screen, refresh now) while keeping show view / edit / deactivate / show nanopub.ViewResultsPageguards against query-less views; CSS cache param bumped.Ecosystem
RAZYU_kQ…— fixedgen:ResourceView, gen:HeaderViewtypes, kind, label, title, optional description, applies-to fields, structural position, optional width, optionalgen:ViewResultAction-only action group (no query fields).get-view-displays(both variants) and all listing/resolution queries key ongen:ResourceViewonly, which header views keep alongsidegen:HeaderView; verified against the published query nanopubs.Viewconstructor'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 thetest/groupspace: 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