Skip to content

Develop - #335

Draft
namedgraph wants to merge 10 commits into
masterfrom
develop
Draft

Develop#335
namedgraph wants to merge 10 commits into
masterfrom
develop

Conversation

@namedgraph

Copy link
Copy Markdown
Member

No description provided.

namedgraph and others added 10 commits July 26, 2026 10:42
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Prevents maven-war-plugin:war from overwriting entity-resolved overlay
stylesheets before the Dockerfile copies target/ROOT.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Declare $lapp:origin in the client.xsl param block with a computed
default — lapp:origin(ldh:request-uri()), the browser origin — emulating
the server-side writer-set param (XSLTWriterBase), and switch all 140
static-asset lookups (translations.rdf, http-statusCodes.rdf,
countries.rdf, signup icon) from the 0-arg lapp:origin() back to
$lapp:origin.

The 0-arg lapp:origin() reads the active pane's data-base, which for a
proxied LDH pane is the remote origin (stamped from the
Link rel=lapp:application header). Asset document() calls therefore
issued cross-origin sync XHRs that the browser blocked on CORS —
"Get failure https://…/translations.rdf" when browsing remote
dataspaces in ContentMode. Introduced by the #303 sweep
($ac:contextUri → lapp:origin()) and extended by bd0417c.

UI labels are client-local: chrome strings are constants of the client,
versioned with the SEF and resolved against the shell origin. The
pane-scoped 0-arg lapp:origin() remains in place for the
admin-subdomain identity checks and other per-dataspace logic. SSR
output is byte-identical ($lapp:origin was already the resolved base
server-side), so the Saxon and SaxonJS document-pool preloads keep
matching and local rendering still performs zero asset fetches.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Replace WYMEditor with the RDFa editor for XMLLiteral editing

- vendor the RDFa editor XSLT modules under xsl/rdfa-editor/ (synced
  from the RDFa-Editor repo) and import them from client.xsl
- render XMLLiteral form controls as editable div.rdfa-editor-content
  regions with hidden ol/lt inputs (imports/default.xsl)
- create the editor state container in the client main template;
  full chrome bring-up on the first region, per-region init afterwards
  via the upstream local:init-editor/local:init-region seams (form.xsl)
- serialize canonicalized editor content into the ol input in
  ldh:FormPreSubmit
- run the ldh:FormPreSubmit pass before ldh:parse-rdf-post in the block
  POST and generic row-form submit handlers (previously the param
  defaults parsed the inputs before the pass could sync them, dropping
  the empty ol and tripping the ldh:XHTML MissingValue constraint) and
  canonicalize XMLLiterals in the request body (block.xsl, form.xsl)
- chain body onmousemove to the editor's sweep-selection tracker
  which it shadowed by import precedence (navigation.xsl)
- host the singleton toolbar in a per-document editor-bar below the
  action bar (document.xsl slot + local:toolbar-host override); sticky,
  matching action-bar chrome, hidden while no editable region is open
  along with the editor breadcrumb footer (bootstrap.css)
- drop the WYMEditor assets from layout.xsl; load rdfa-editor.css
  under the same conditions instead

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

* Fix RDFa editor-bar visual alignment

- Move border to action-bar bottom (border-top on editor-bar was hidden under action-bar's higher z-index)
- Flex-center editor-bar content (Bootstrap navbar-inner has min-height: 50px with no vertical centering)
- Fix select vertical alignment via auto margins (Firefox ignores align-items: center on native select)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add click-to-edit and autosave for XHTML blocks

- Click anywhere on .main content to enter edit mode (skips if text selected)
- Autosave XMLLiteral on focusout unless focus moved to toolbar/editor UI
- Hide .btn-edit on XHTML blocks (entry point is now content click)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Suppress form-actions for XHTML blocks and exit edit mode on column click

- bs2:RowForm gains $show-form-actions param (default true); XHTML blocks
  pass false via xsl:next-match, omitting the Save/Reset/Cancel buttons
  since autosave-on-blur already handles submission
- ixsl:onclick on XHTML blocks in edit mode submits the form when the
  click target is outside the editor canvas; interactive elements are
  excluded (they steal focus, triggering focusout + autosave instead)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Override RDFa editor annotation typeahead and dialog with LDH's Bootstrap UI

Intercepts local:typeahead-field, local:typeahead-set-value,
local:typeahead-value, and local:render-overlay in form.xsl (which has
higher import precedence than the vendored rdfa-editor/ stylesheets) to
replace the upstream's doc()-on-vocabs typeahead with LDH's /ns-querying
bs2:Lookup widget and to re-style the annotation dialog using Bootstrap
2.3.2 form classes (.well, .form-horizontal, .control-group, .btn).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Refine RDFa editor LDH integration: CSS split, overlay id, modal structure, fieldset fix

- Remove host-UI sections (overlay + toolbar) from vendored rdfa-editor.css; host styles now live only in bootstrap.css
- Replace !important overlay overrides in bootstrap.css with clean rules scoped to #rdfa-editor-overlay; add full #edit-toolbar layout rules
- Parameterize overlay element id via $local:overlay-id in vendored overlay.xsl (matches upstream feature/ldh-integration-seams)
- Restructure RDFa Annotation dialog to follow LDH modal convention: div.modal > div.modal-header + div.modal-body; add label @for attributes
- Suppress fieldset border inside XHTML block edit form to avoid spurious outline around div.main in edit mode
- Mention in-place RDFa editing in README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Extract .edit-dialog styles from vendored rdfa-editor.css; add Bootstrap overrides

Follows upstream feature/ldh-integration-seams: .edit-dialog host-UI rules
(border, border-radius, box-shadow, label/input sizing, action-buttons,
checkbox-label) removed from rdfa-editor.css; Bootstrap-compatible replacements
added to bootstrap.css so toolbar dialogs (insert link, table, figure) inherit
the host UI without Material-blue borders or Roboto sizing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Override toolbar dialog templates in form.xsl with Bootstrap-compatible HTML

Add LDH-layer overrides for all five rdfa-editor named dialog templates
(local:render-table-dialog, local:render-link-dialog, local:render-figure-dialog,
local:render-find-dialog, local:render-extra-dialogs). Each override preserves
the upstream element ids, name attributes, and semantic button classes that the
event handlers depend on, while replacing btn-primary/btn-secondary with Bootstrap's
btn btn-primary / btn / btn btn-danger, adding label @for attributes, and using
Bootstrap's checkbox label pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Handle empty XHTML block in ldh:load-edited-resource

When a block is referenced in the document container (rdf:_N) but has no own
triples, key('resources', \$about) returns empty and the as="element()" type
assertion crashes the promise chain. Synthesise a minimal rdf:Description
from the block element's @typeof attribute so the edit form can open normally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Revert "Handle empty XHTML block in ldh:load-edited-resource"

This reverts commit e6acae8.

* Auto-focus first contenteditable block after editor init to trigger autosave

When a new XHTML block is added via [ + XHTML ] and the user clicks away
without entering the editor, ixsl:onfocusout never fires (focus was never
in the region), so requestSubmit() is never called and the block is not
persisted.

Calling focus() on the first contenteditable block after local:init-region
(or local:init-editor) ensures that any subsequent click outside the region
triggers focusout → requestSubmit() → POST to server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Forward caller params through the XHTML bs2:RowForm override

Non-tunnel params do not survive xsl:next-match, so the override added
for autosave (show-form-actions=false) dropped the ADD flow's
method='post' along with about and show-cancel-button. The new-block
form fell back to the base template's default method='patch', and the
autosave PATCH's DELETE/INSERT/WHERE update matched zero solutions for
a resource with no triples yet — a silent no-op. The block was never
persisted, and re-editing it failed with an empty key('resources', ...)
cardinality error.

Re-declare the params with the base template's defaults and forward
them, so new XHTML blocks are created via POST again (as they were in
the WYMEditor era) and PATCH only ever targets existing blocks.

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

* Adopt the RDFa editor's w3id.org namespaces (rdfae:, rdfax:)

Vendored editor stylesheets re-synced from RDFa-Editor after its
urn: -> https://w3id.org/atomgraph/rdfa-editor# namespace switch;
client.xsl, form.xsl and document.xsl updated to match.

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Replace the details/summary disclosure in the LDH rdfae:render-overlay
override with two always-visible fieldsets: Subject (about, typeof) and
Object (resource, datatype, lang). Bootstrap 2.3.2 styles fieldset/legend
natively; details/summary had no framework styling and hid the advanced
controls behind a collapsed disclosure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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