From 2a75032f6b957d5efe437b7ed94d0e92f90dcf6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Jusevi=C4=8Dius?= Date: Mon, 18 May 2026 22:50:25 +0200 Subject: [PATCH 1/2] Thread doc-uri / fragment / mode separately across navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The client-side navigation pipeline overloaded a single $uri to mean both "doc to fetch/cache" and "resource to display." Different consumers silently stripped or kept different parts, surfacing as: blank panes on fragment-bearing link clicks, mode toggles ignored when the doc was cached, URL bar gaining a re-encoded fragment after forth-and-back navigation across the local tab. Split into explicit components, threaded through every entry point: - $doc-uri (no fragment, no query) — cache key (LinkedDataHub.contents), tab
  • data-uri, pane @about, every lookup predicate. Always via ac:absolute-path. - $fragment — the sub-anchor; lives on the outer URL per RFC 3986, extracted via ac:fragment-id($href). Round-tripped through tab @href via the 3-arity ldh:href. - $query-params — mode/forClass/etc.; callers strip the URL fragment via ac:document-uri before passing to ldh:parse-query-params, so no caller can corrupt the last value by gluing the fragment onto it. Touched: ldh:DocumentNavigate, ldh:RDFDocumentLoad, ldh:rdf-document-response, ldh:RenderTab, ldh:ActivateTab, ldh:TabSwitch, ldh:AddTabNavBarListItem; the four event handlers (main, link click, tab click, popstate), close-tab fallback, navbar-form, onDelete, onRDFFileUpload; modal/form callers in bootstrap/2.3.2/client. bs2:TabBody and bs2:DocumentBody now take @about as a mandatory param; the no-op ixsl:set-attribute workaround (operating on a detached node after ixsl:replace-element) is removed; layout.xsl passes @about server-side. TabSwitch gate requires cache hit AND non-uri query params unchanged (deep-equal vs ldh:query-params()); mode changes correctly fall through to DocumentNavigate, so the rendered DOM gets refreshed. ldh:query-params is now defined once (imports/default.xsl); the client-side override that wrapped ixsl:query-params() shadowed fragment-safe parsing and is removed. The remaining direct ixsl:query-params() callers (ac:query stylesheet param, navigation.xsl mode tunnel) go through ldh:query-params() too. Anchor-emitting server templates (xhtml:Anchor, svg:Anchor, @rdf:resource|srx:uri) drop the encoded-full-URI fragment convention: $fragment = ac:fragment-id(.), $href via ac:document-uri. External resource links become ?uri=# instead of ?uri=#. Scroll-to-fragment in RenderTab and TabSwitch uses [@about = $resource-uri] in the active pane, replacing id($fragment, ixsl:page()). Sidesteps the DOM-id uniqueness constraint when two panes both render a resource at #this — the RDFa-emitted @about is resource-URI-scoped, naturally unique. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../xsl/bootstrap/2.3.2/client/form.xsl | 5 +- .../xsl/bootstrap/2.3.2/client/functions.xsl | 4 +- .../xsl/bootstrap/2.3.2/client/modal.xsl | 9 +- .../xsl/bootstrap/2.3.2/client/navigation.xsl | 2 +- .../xsl/bootstrap/2.3.2/document.xsl | 8 +- .../xsl/bootstrap/2.3.2/imports/default.xsl | 17 +- .../xsl/bootstrap/2.3.2/layout.xsl | 1 + .../atomgraph/linkeddatahub/xsl/client.xsl | 295 +++++++++++------- 8 files changed, 208 insertions(+), 133 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/form.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/form.xsl index 1beb13af6..06dcc79de 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/form.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/form.xsl @@ -762,9 +762,10 @@ WHERE - + + - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl index 7abc08c11..9f038a167 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/functions.xsl @@ -41,9 +41,7 @@ exclude-result-prefixes="#all" - - - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl index 2dcd28caa..dd0dd7e55 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl @@ -1272,7 +1272,8 @@ LIMIT 10 - + + @@ -1571,7 +1572,8 @@ LIMIT 10 - + + @@ -1598,7 +1600,8 @@ LIMIT 10 - + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/navigation.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/navigation.xsl index 694a66207..3c28670c9 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/navigation.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/navigation.xsl @@ -667,7 +667,7 @@ ORDER BY DESC(?created) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl index 59225f296..602f877f3 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/document.xsl @@ -419,6 +419,7 @@ extension-element-prefixes="ixsl" +
    @@ -444,6 +445,7 @@ extension-element-prefixes="ixsl" +
    @@ -454,7 +456,7 @@ extension-element-prefixes="ixsl" - +
    @@ -464,9 +466,7 @@ extension-element-prefixes="ixsl" - - - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/imports/default.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/imports/default.xsl index 31aa939fe..1383cd0e6 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/imports/default.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/imports/default.xsl @@ -161,7 +161,8 @@ exclude-result-prefixes="#all" - + + @@ -329,7 +330,7 @@ exclude-result-prefixes="#all" - + - - + + @@ -551,8 +552,8 @@ exclude-result-prefixes="#all" - - + + @@ -573,8 +574,8 @@ exclude-result-prefixes="#all" - - + + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl index c8ee105b6..03ac57302 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl @@ -758,6 +758,7 @@ exclude-result-prefixes="#all"> +
    diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl index 528df5d30..6bb17506e 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/client.xsl @@ -122,7 +122,7 @@ extension-element-prefixes="ixsl" - + @@ -283,8 +283,11 @@ WHERE + - + + @@ -435,7 +438,8 @@ WHERE - + + @@ -475,37 +479,39 @@ WHERE - - + + - - - + + + - + - + - - + + + - + - + - + - + + @@ -524,22 +530,20 @@ WHERE + - - - - - + + - + - - + + @@ -556,6 +560,7 @@ WHERE + @@ -580,7 +585,8 @@ WHERE - + + @@ -588,13 +594,12 @@ WHERE - - - + + - + @@ -640,16 +645,16 @@ WHERE - + + - @@ -658,6 +663,7 @@ WHERE + @@ -676,14 +682,15 @@ WHERE - + + - + -
  • - +
  • + × @@ -695,9 +702,9 @@ WHERE - + - + @@ -710,24 +717,24 @@ WHERE - + - + - + - - + + + - @@ -748,7 +755,7 @@ WHERE - + @@ -763,19 +770,29 @@ WHERE - + - + - - + + + + + + + + + + + + @@ -799,10 +816,11 @@ WHERE - + - - + + + @@ -813,11 +831,13 @@ WHERE - + + + - - + + @@ -833,19 +853,33 @@ WHERE - + + + - + + + + + + + + + + + + - + + @@ -858,14 +892,14 @@ WHERE - + - + - - + + @@ -874,7 +908,7 @@ WHERE - + @@ -887,15 +921,15 @@ WHERE - - - + + - + + @@ -903,18 +937,19 @@ WHERE - + + - - - + + @@ -942,23 +977,27 @@ WHERE - - - - + + + + + + - + - - + + + - + + @@ -974,15 +1013,34 @@ WHERE - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -991,10 +1049,11 @@ WHERE - + - + + @@ -1002,13 +1061,15 @@ WHERE - + - + + - + + @@ -1084,23 +1145,28 @@ WHERE - - - + + + + + + - - + + - - + + + - + + @@ -1110,37 +1176,40 @@ WHERE - + - - + + - + - - + + + - + - - + + + - + + @@ -1226,8 +1295,10 @@ WHERE + - + + From f0f309ab0da226baa8ccd9e02c2d1fff77783689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Jusevi=C4=8Dius?= Date: Tue, 19 May 2026 11:31:13 +0200 Subject: [PATCH 2/2] Scope modal forms to active tab pane and promise-ify their handlers Modals (class-instances, geo, latest, search) and the Add Data / Save As / Reconcile forms now mount inside the active pane's content-body instead of document body, with pane-scoped @id and a data-container-id hook so multiple tabs no longer collide on a single shared modal id. Selectors targeting these modals move from fixed @id to CSS classes (modal-class-instances, modal-geo, modal-latest, modal-search). Converts the access / endpoint-classes / typeahead-resource handlers from xsl:schedule-action named templates to ixsl:promise chains backed by ldh:*-response functions, matching the rest of the client. The typeahead-fetching half of ldh:ShowAddDataForm is extracted to a new ldh:LoadTypeaheads helper so callers compose the two steps explicitly. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../bootstrap/2.3.2/client/constructor.xsl | 2 +- .../xsl/bootstrap/2.3.2/client/modal.xsl | 206 ++++++++++-------- .../xsl/bootstrap/2.3.2/client/navigation.xsl | 44 ++-- .../atomgraph/linkeddatahub/xsl/client.xsl | 13 +- 4 files changed, 160 insertions(+), 105 deletions(-) diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/constructor.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/constructor.xsl index 59304d216..139da7f71 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/constructor.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/constructor.xsl @@ -391,7 +391,7 @@ exclude-result-prefixes="#all" " - + diff --git a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl index dd0dd7e55..0feb67ef8 100644 --- a/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl +++ b/src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/modal.xsl @@ -144,7 +144,7 @@ LIMIT 10
    - + @@ -395,7 +395,7 @@ LIMIT 10
    - +