Skip to content

Rebuild annotation overlay on demand in rdfae:show-overlay - #26

Merged
namedgraph merged 1 commit into
masterfrom
overlay-ensure-if-absent
Aug 6, 2026
Merged

Rebuild annotation overlay on demand in rdfae:show-overlay#26
namedgraph merged 1 commit into
masterfrom
overlay-ensure-if-absent

Conversation

@namedgraph

Copy link
Copy Markdown
Member

The annotation overlay is a render-once singleton. A host that re-renders the page DOM — or disposes it as a Bootstrap modal, as LinkedDataHub does via its generic modal teardown — can remove the overlay between invocations. rdfae:show-overlay then passed an empty node to rdfae:show-at (element(), exactly one), throwing a SaxonJS cardinality error on the next right-click.

This rebuilds the overlay on demand: show-overlay calls rdfae:init-overlay when id($rdfae:overlay-id, ixsl:page()) resolves to nothing, so show-at always has an element to position.

Already mirrored into LinkedDataHub (overlay.xsl is byte-identical there, commit 896288c8d).

🤖 Generated with Claude Code

The overlay is a render-once singleton, but a host that re-renders the page
DOM (or disposes it as a Bootstrap modal, as LinkedDataHub does via its
generic modal teardown) can remove it between invocations. show-overlay then
passed an empty node to rdfae:show-at (element(), exactly one), throwing a
SaxonJS cardinality error on the next right-click. Ensure the overlay exists
before positioning it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@namedgraph
namedgraph merged commit cd04bbe into master Aug 6, 2026
2 checks passed
@namedgraph
namedgraph deleted the overlay-ensure-if-absent branch August 6, 2026 10:06
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