Skip to content

Document tabs#294

Merged
namedgraph merged 35 commits intodevelopfrom
ft-external-doc-tabs
May 9, 2026
Merged

Document tabs#294
namedgraph merged 35 commits intodevelopfrom
ft-external-doc-tabs

Conversation

@namedgraph
Copy link
Copy Markdown
Member

No description provided.

namedgraph and others added 30 commits April 15, 2026 23:45
- Render proxied external documents in tab panes (bs2:TabBody/ldh:CreateTab/ldh:ActivateTab/ldh:RenderTabPane)
- Convert breadcrumb-nav from id to CSS class to support per-pane breadcrumbs; populate breadcrumbs in external tab panes; extract ldh:PopulateBreadcrumbNav named template to DRY up local/external breadcrumb logic
- Fix CSS block border selectors: #content-body → .content-body, add intermediate container-fluid level
- Narrow btn-edit and btn-create-chart match patterns to require .block ancestor, preventing false matches on action-bar
- Fix drag handler match patterns: update stale direct-child path to match new two-level content-body/container-fluid/block structure
- Fix modal content-body lookup: use ancestor:: for action-bar buttons, active tab-pane for global buttons, so modals append to the visible pane for proxied documents
- Remove dead document-mode-tabs template and broken progress bar update targeting hidden #content-body
- Remove unused getModes() override from XSLTWriterBase

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ide auth guard

- Prevent click handler from firing on disabled edit button by adding [not(contains-token(@Class, 'disabled'))] predicate
- Move ACL and Edit buttons inside the xsl:if auth guard so they are not rendered for unauthorized users
- Wrap edit button in pull-right div and add ldh:logo icon to match ACL button structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add [not(contains-token(@Class, 'disabled'))] predicate to the btn-edit
match template so that clicking a disabled edit button does not open the
edit modal.

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

- Replace LinkedDataHub.tabs/tab-counter JS registry with data-uri/data-endpoint
  attributes directly on tab <li> elements; sd:endpoint() now reads from dataset
- Give each external document its own tab pane (one per URI) instead of a shared
  external pane; tab pane visibility toggled via display:none/block
- Rename ldh:CreateTab → ldh:AddTabNavBarListItem (no longer handles rendering);
  ldh:RenderTab now accepts $tab-pane-id (xs:string) instead of $tab-pane element,
  since the element is detached after ixsl:replace-element
- ProxyRequestFilter: inject MediaTypes, throw NotAcceptableException on no variant
  match instead of silently returning; remove manual HTML Accept-header inspection
- Remove $ac:uri XSLT param and related proxy-target plumbing from XSLTWriterBase
  and layout.xsl; remove LDH.access_to vocabulary property
- Switch service document fetches from ac:build-uri() to ldh:href() throughout
- Move srx:sparql bs2:ContentBody template from layout.xsl to document.xsl

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HTTP test and unit test
…n-bar change

The action-bar moved from inside .navbar-fixed-top (120px body padding) to sticky positioning (55px body padding), eliminating the 14px gap that existed between the action-bar and content-body.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…arate templates

The client-side getResourceWithRetry(servicesRequestUri) fetch and ldh:apps
stylesheet parameter were unused — remove them along with the service select
dropdown and related onServiceLoad/RenderServices templates. Refactor the
navbar into bs2:NavBarLeft, bs2:NavBarMain, and bs2:NavBarRight templates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update hardcoded 55px navbar height to 51px across CSS and XSLT to match
actual rendered height after search bar refactoring. Move left-sidebar from
global #left-sidebar to per-tab-pane .left-sidebar, store endpoint/base/application
as data attributes on tab panes instead of tab-bar list items, and refactor
navigation to scope sidebar operations to the active tab pane.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t-body XPaths

Wraps action-bar and content-body in a document-body div (carrying @about/@typeof),
removes XHTML-based ldh:xhtml-document-loaded in favour of a new ldh:DocumentNavigate
named template that centralises local/external navigation via RDF. Fixes content-body
ancestor XPaths broken by the new document-body wrapper, pre-renders the local tab in
the tab-bar, and removes server-side SD endpoint / forShape param passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… on PATCH success

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move signup.xsl include from admin/layout.xsl to client.xsl so its
  templates compile into the Saxon-JS SEF; drop use-when="SAXON" gates,
  switch $ldt:base to ldt:base() and $main-doc to ldh:base-uri(.)
- Replace ldh:construct / Construct.java extension function with
  ldh:construct-forClass via the existing /ns endpoint
- Implement tab close: remove pane, activate fallback tab, hide tab-bar
  when only the base-uri tab remains; reposition .tab-close as absolute
  corner element
- Drop dead error-alert fallback in ldh:rdf-document-response

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…alizing

Pre-selecting a variant from a combined Model+ResultSet writable types list
before knowing the response entity type caused a 500 when the upstream returned
RDF (read as Model) but the pre-selected variant was application/sparql-results+xml
— Jersey had no MessageBodyWriter<Model> for that type.

External HTTP responses are now forwarded verbatim (status, Content-Type, body,
Link headers). The upstream already negotiates content type via the forwarded
Accept header. Local paths (DataManager cache, ontology DESCRIBE) keep proper
Model-specific content negotiation.

Also removes the dead BadGatewayExceptionMapper that incorrectly mapped
BadGatewayException to 500.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The filter no longer pre-selects a variant, so 406 for unsatisfiable
Accept is delegated to the upstream. The test and its now-unused
getSupportedLanguages() stub are removed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
namedgraph and others added 5 commits May 9, 2026 13:39
ProxyRequestFilter:

- Drop the `quality(MediaType)` helper and the topQ/filter pipeline. Per the
  JAX-RS spec, `getAcceptableMediaTypes()` is sorted by q descending (Jersey:
  `HttpHeaderReader.readQualifiedList` → `AcceptableMediaType.COMPARATOR`), so
  the first non-wildcard type is the top-ranked one. Replace with a single
  loop that returns on (X)HTML and breaks otherwise.

Tests:

- Add `GET-proxied-accept-forwarded.sh` regressing 708edfc: send a single
  specific RDF type as `Accept` and assert the response `Content-Type` matches.
  Pre-fix, ProxyRequestFilter substituted its own readable-types list for the
  client's `Accept`, so upstream could pick any RDF format (e.g. rdf-thrift).
- Rework `GET-proxied-accept-html-not-preferred.sh` to use HTTP status as the
  bypass-vs-forward discriminator. The previous content-type assertion was
  unreachable in a symmetric admin/end-user setup — both paths negotiate the
  same media type. A UUID-named non-existent path produces 200 on bypass
  (`ApplicationFilter` strips `?uri=` → admin root) and 404 on forward.
- Silence `DEBUG:` echoes in `HEAD-proxied-etag.sh` to match the convention of
  the other proxy tests.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Pass `'form-signup'` to `bs2:RowForm` via `form-id` (lands on the form
  itself) instead of `id` (wrapper div), so the new submit handler matches.
- Add `match="form[@id = 'form-signup']"` template that overrides
  `$callback` via `xsl:next-match`, plus `ldh:signup-form-response`:
  `201 + Location` calls `bs2:SignUpComplete`, otherwise delegates to
  `ldh:row-form-response`.
- Update `bs2:SignUpComplete` to target the active tab pane's
  `content-body` (post-tabs DOM no longer has a singleton `#content-body`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@namedgraph namedgraph marked this pull request as ready for review May 9, 2026 17:38
@namedgraph namedgraph merged commit bb28205 into develop May 9, 2026
1 check passed
@namedgraph namedgraph deleted the ft-external-doc-tabs branch May 9, 2026 17:38
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