Skip to content

Inline creation in views - #351

Merged
namedgraph merged 4 commits into
developfrom
ft-inline-creation
Aug 19, 2026
Merged

Inline creation in views#351
namedgraph merged 4 commits into
developfrom
ft-inline-creation

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Implements the Inline Creation in Views proposal.

Views attached to properties via ldh:view/ldh:inverseView get a Create button in the view toolbar when the View carries the new ldh:container metadata. The button opens a modal with the full row-form UI (SPIN constructor + SHACL shapes) for the class inferred from the ontology (rdfs:range for forward views, rdfs:domain for inverse, including rdfs:subPropertyOf paths). Submitting issues a single PUT that creates the container's child document with the instance as a #id{uuid} fragment; forward views then PATCH the linking triple into the current document (INSERT/WHERE form), while inverse views ship it inside the PUT body. The view re-queries in place afterwards.

  • New vocabulary: ldh:container and ldh:showWhenEmpty (default true — when false, empty views are hidden)
  • Create button gated on acl:Write, read from the container's acl:mode Link headers via a HEAD request; forward views additionally require acl:Write on the current document
  • Discovery metadata (?property, direction, ?forClass, ?container, ?showWhenEmpty) travels through the ontology view query against /ns, so package views can be annotated from the app's own namespace
  • SKOS package views now tolerate untagged prefLabel literals (LDH forms submit plain xsd:string)
  • Codifies the form-placement convention (modal vs inline by document membership) in CLAUDE.md

🤖 Generated with Claude Code

namedgraph and others added 3 commits August 19, 2026 00:08
Implements the Inline-Creation-in-Views proposal: views attached via
ldh:view/ldh:inverseView get a Create button in the view toolbar when the
View carries the new ldh:container metadata. The modal constructor form
PUTs the new instance document into the container; forward views PATCH
the linking triple into the current document (INSERT/WHERE form), inverse
views ship it inside the PUT body. Property, direction and constructed
class are inferred from the ontology (rdfs:domain/rdfs:range incl.
rdfs:subPropertyOf paths); the Create button is gated on acl:Write
obtained by HEADing the container for its acl:mode Link headers.
Also adds optional ldh:showWhenEmpty (default true).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The creation modal now renders through the document-level bs2:Form
pipeline over the instantiated resource (ldh:set-typeahead-form-resource),
producing the full row-form UI with the form shell; the instance is minted
as a fragment within the new document and the description ships as the PUT
body. The post-creation refresh rebuilds the results context from the
contents cache like the pager listeners (the view's spin:query RDFa is
consumed by the initial render, so ldh:RenderRow re-entry cannot match).
Also resets the progress cursor on terminal paths and floats the Create
button (now btn-primary) left of the mandatory order-by/mode controls.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LDH forms submit plain xsd:string literals, which the hardcoded
langMatches(lang(?prefLabel), "en") filters excluded from every package
view.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ldh:render-view restores the default cursor once the results render, same
as the pager/order/mode interactions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@namedgraph
namedgraph merged commit 6624f46 into develop Aug 19, 2026
0 of 2 checks passed
@namedgraph
namedgraph deleted the ft-inline-creation branch August 19, 2026 12: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