Commit 8b8aa5d
Scope modal forms to active tab pane and promise-ify their handlers (#302)
* Thread doc-uri / fragment / mode separately across navigation
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 <li> 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=<doc-uri>#<frag> instead of
?uri=<doc-uri%23frag>#<encoded-full-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) <noreply@anthropic.com>
* 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) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5525722 commit 8b8aa5d
9 files changed
Lines changed: 368 additions & 238 deletions
File tree
- src/main/webapp/static/com/atomgraph/linkeddatahub/xsl
- bootstrap/2.3.2
- client
- imports
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
| 765 | + | |
| 766 | + | |
766 | 767 | | |
767 | | - | |
| 768 | + | |
768 | 769 | | |
769 | 770 | | |
770 | 771 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| |||
Lines changed: 124 additions & 91 deletions
Large diffs are not rendered by default.
Lines changed: 31 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
670 | | - | |
| 670 | + | |
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
850 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
851 | 854 | | |
852 | 855 | | |
853 | | - | |
| 856 | + | |
854 | 857 | | |
855 | 858 | | |
856 | 859 | | |
| |||
895 | 898 | | |
896 | 899 | | |
897 | 900 | | |
| 901 | + | |
898 | 902 | | |
899 | 903 | | |
900 | 904 | | |
| |||
975 | 979 | | |
976 | 980 | | |
977 | 981 | | |
978 | | - | |
| 982 | + | |
979 | 983 | | |
980 | 984 | | |
981 | 985 | | |
| |||
988 | 992 | | |
989 | 993 | | |
990 | 994 | | |
991 | | - | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
992 | 999 | | |
993 | 1000 | | |
994 | 1001 | | |
995 | | - | |
| 1002 | + | |
996 | 1003 | | |
997 | 1004 | | |
998 | 1005 | | |
| |||
1009 | 1016 | | |
1010 | 1017 | | |
1011 | 1018 | | |
1012 | | - | |
| 1019 | + | |
1013 | 1020 | | |
1014 | 1021 | | |
1015 | 1022 | | |
| |||
1030 | 1037 | | |
1031 | 1038 | | |
1032 | 1039 | | |
| 1040 | + | |
1033 | 1041 | | |
1034 | 1042 | | |
1035 | 1043 | | |
| |||
1096 | 1104 | | |
1097 | 1105 | | |
1098 | 1106 | | |
1099 | | - | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
1100 | 1111 | | |
1101 | 1112 | | |
1102 | 1113 | | |
1103 | | - | |
| 1114 | + | |
1104 | 1115 | | |
1105 | 1116 | | |
1106 | 1117 | | |
| |||
1138 | 1149 | | |
1139 | 1150 | | |
1140 | 1151 | | |
| 1152 | + | |
1141 | 1153 | | |
1142 | 1154 | | |
1143 | 1155 | | |
| |||
1216 | 1228 | | |
1217 | 1229 | | |
1218 | 1230 | | |
1219 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1220 | 1235 | | |
1221 | 1236 | | |
1222 | | - | |
| 1237 | + | |
1223 | 1238 | | |
1224 | 1239 | | |
1225 | 1240 | | |
| |||
1267 | 1282 | | |
1268 | 1283 | | |
1269 | 1284 | | |
| 1285 | + | |
1270 | 1286 | | |
1271 | 1287 | | |
1272 | 1288 | | |
| |||
1286 | 1302 | | |
1287 | 1303 | | |
1288 | 1304 | | |
1289 | | - | |
| 1305 | + | |
1290 | 1306 | | |
1291 | 1307 | | |
1292 | 1308 | | |
| |||
1295 | 1311 | | |
1296 | 1312 | | |
1297 | 1313 | | |
1298 | | - | |
| 1314 | + | |
1299 | 1315 | | |
1300 | 1316 | | |
1301 | 1317 | | |
| |||
1316 | 1332 | | |
1317 | 1333 | | |
1318 | 1334 | | |
1319 | | - | |
| 1335 | + | |
1320 | 1336 | | |
1321 | 1337 | | |
1322 | 1338 | | |
1323 | | - | |
| 1339 | + | |
1324 | 1340 | | |
1325 | 1341 | | |
1326 | 1342 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| 422 | + | |
422 | 423 | | |
423 | 424 | | |
424 | 425 | | |
| |||
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| 448 | + | |
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
| |||
454 | 456 | | |
455 | 457 | | |
456 | 458 | | |
457 | | - | |
| 459 | + | |
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
| |||
464 | 466 | | |
465 | 467 | | |
466 | 468 | | |
467 | | - | |
468 | | - | |
469 | | - | |
| 469 | + | |
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| |||
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
332 | | - | |
| 333 | + | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
| |||
534 | 535 | | |
535 | 536 | | |
536 | 537 | | |
537 | | - | |
538 | | - | |
| 538 | + | |
| 539 | + | |
539 | 540 | | |
540 | 541 | | |
541 | 542 | | |
| |||
551 | 552 | | |
552 | 553 | | |
553 | 554 | | |
554 | | - | |
555 | | - | |
| 555 | + | |
| 556 | + | |
556 | 557 | | |
557 | 558 | | |
558 | 559 | | |
| |||
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
576 | | - | |
577 | | - | |
| 577 | + | |
| 578 | + | |
578 | 579 | | |
579 | 580 | | |
580 | 581 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
| 761 | + | |
761 | 762 | | |
762 | 763 | | |
763 | 764 | | |
| |||
0 commit comments