Skip to content

Commit 15e8379

Browse files
namedgraphclaude
andcommitted
Add external document tabs and fix related CSS/XPath regressions (#293)
- 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>
1 parent 224e7c3 commit 15e8379

File tree

15 files changed

+770
-500
lines changed

15 files changed

+770
-500
lines changed

src/main/java/com/atomgraph/linkeddatahub/writer/XSLTWriterBase.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public abstract class XSLTWriterBase extends com.atomgraph.client.writer.XSLTWri
9090
@Inject jakarta.inject.Provider<Optional<com.atomgraph.linkeddatahub.apps.model.Application>> application;
9191
@Inject jakarta.inject.Provider<DataManager> dataManager;
9292
@Inject jakarta.inject.Provider<XsltExecutableSupplier> xsltExecSupplier;
93-
@Inject jakarta.inject.Provider<List<Mode>> modes;
9493
@Inject jakarta.inject.Provider<ContainerRequestContext> crc;
9594
@Inject jakarta.inject.Provider<Optional<AuthorizationContext>> authorizationContext;
9695

@@ -314,22 +313,6 @@ public XsltExecutable getXsltExecutable()
314313
return xsltExecSupplier.get().get();
315314
}
316315

317-
@Override
318-
public List<URI> getModes(Set<String> namespaces)
319-
{
320-
return getModes().stream().map(Mode::get).collect(Collectors.toList());
321-
}
322-
323-
/**
324-
* Returns a list of enabled layout modes.
325-
*
326-
* @return list of modes
327-
*/
328-
public List<Mode> getModes()
329-
{
330-
return modes.get();
331-
}
332-
333316
@Override
334317
public Set<String> getSupportedNamespaces()
335318
{

src/main/webapp/static/com/atomgraph/linkeddatahub/css/bootstrap.css

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
html { height: 100%; }
2-
body { height: calc(100% - 120px); padding-top: 120px; padding-bottom: 0; }
2+
/* only the main navbar is fixed-top now; tab bar + action bar are sticky inside #tab-body */
3+
body { height: calc(100% - 55px); padding-top: 55px; padding-bottom: 0; }
4+
#tab-bar { position: sticky; top: 55px; z-index: 1000; margin-bottom: 0; }
5+
/* Override Bootstrap's overflow:auto which would make action-bar sticky relative to #tab-content instead of the viewport */
6+
#tab-content { overflow: visible; }
7+
#tab-bar .navbar-inner { min-height: 36px; padding: 4px 0; background: #ccc; box-shadow: none; }
8+
#tab-bar .nav-tabs { border-bottom: none; }
9+
#tab-bar .nav-tabs > li > a { padding: 4px 10px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555; display: inline-block; }
10+
#tab-bar .nav-tabs > li > a:hover { color: #222; }
11+
#tab-bar .nav-tabs > li.active > a, #tab-bar .nav-tabs > li.active > a:hover { color: #333; background-color: #fff; border-color: #aaa #aaa transparent; }
12+
#tab-bar .tab-close { margin-left: 4px; font-size: 10px; color: #888; cursor: pointer; vertical-align: middle; }
13+
#tab-bar .tab-close:hover { color: #333; }
314
body.embed { padding-top: 0; }
415
ul.dropdown-menu { max-height: 26em; overflow-x: hidden; overflow-y: auto; }
516
ul.dropdown-menu ul { margin: 0; }
@@ -17,16 +28,17 @@ ul.dropdown-menu ul { margin: 0; }
1728
.navbar-form .input-append { margin-top: 10px; }
1829
.navbar-form .input-append select { margin-top: 0; height: 34px; }
1930
.navbar-form .btn-search { background-image: url('../icons/ic_search_white_24px.svg'); background-position: center center; background-repeat: no-repeat; width: 34px; height: 34px; }
20-
.action-bar { background-color: #dfdfdf; }
31+
.action-bar { position: sticky; top: var(--action-bar-top, 55px); z-index: 999; background: #dfdfdf; padding: 0; box-shadow: none; }
2132
.action-bar form { margin-bottom: 0; }
2233
.action-bar .span7 .row-fluid > * { margin-top: 10px; }
34+
.action-bar .row-fluid > .span2, .action-bar .row-fluid > .span3 { margin-top: 10px; }
2335
.action-bar .add-constructor, .dropdown-menu .add-constructor { background-color: inherit; display: block; text-align: left; width: 100%; }
2436
.action-bar .add-constructor:hover { color: #ffffff; background-color: #007af5; }
2537
.action-bar .breadcrumb { background-color: inherit; margin-bottom: 0; padding-left: 0; padding-top: 5px; }
2638
.action-bar .breadcrumb .container-logo { background-image: url('../icons/folder.svg'); background-position: left center; background-repeat: no-repeat; padding-left: 28px; }
2739
.action-bar .breadcrumb .item-logo { background-image: url('../icons/file.svg'); background-position: left center; background-repeat: no-repeat; padding-left: 28px; }
2840
.action-bar .breadcrumb .btn-group { margin-top: -4px; }
29-
.action-bar #breadcrumb-nav > .label-info { padding: 8px 15px; margin-right: 8px; font-size: inherit; background-color: #9954bb; }
41+
.action-bar .breadcrumb-nav > .label-info { padding: 8px 15px; margin-right: 8px; font-size: inherit; background-color: #9954bb; }
3042
.action-bar #doc-controls { text-align: right; padding-top: 5px; }
3143
.action-bar #doc-controls .btn-edit { margin-top: -5px; margin-left: 10px; }
3244
.action-bar p.alert { margin-bottom: 0; }
@@ -107,10 +119,10 @@ li button.btn-edit-constructors, li button.btn-add-data, li button.btn-add-ontol
107119
.caret.caret-reversed { border-bottom: 4px solid #000000; border-top-width: 0; }
108120
.faceted-nav input[type=checkbox]:checked + span { font-weight: bold; }
109121
.parallax-nav a { cursor: pointer; }
110-
#content-body { min-height: calc(100% - 14em); }
111-
#content-body > [about].row-fluid { overflow-x: auto; margin-bottom: 20px; }
112-
#content-body > [about].row-fluid, .constructor-triple.row-fluid { border-bottom: 2px solid rgb(223, 223, 223); }
113-
#content-body > [about].row-fluid.drag-over { border-bottom: 4px dotted #0f82f5; }
122+
.content-body { min-height: calc(100% - 14em); }
123+
.content-body > [about] > [about].row-fluid { overflow-x: auto; margin-bottom: 20px; }
124+
.content-body > [about] > [about].row-fluid, .constructor-triple.row-fluid { border-bottom: 2px solid rgb(223, 223, 223); }
125+
.content-body > [about] > [about].row-fluid.drag-over { border-bottom: 4px dotted #0f82f5; }
114126
.row-fluid.block { max-height: 80em; }
115127
.row-fluid.block .drag-handle { display: none; width: 30px; background-color: #149bdf; background-image: radial-gradient(circle at 3px 3px, #0480be 1px, transparent 1.5px); background-size: 6px 6px; border-radius: 2px; cursor: move; }
116128
.list-mode.active { background-image: url('../icons/ic_navigate_before_black_24px.svg'); }

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/admin/acl/layout.xsl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,6 @@ exclude-result-prefixes="#all">
3232
<xsl:template match="rdf:RDF" mode="bs2:NavBarNavList">
3333
<xsl:if test="$foaf:Agent//@rdf:about">
3434
<ul class="nav pull-right">
35-
<!-- <li>
36-
<xsl:if test="$ac:mode = '&ac;QueryEditorMode'">
37-
<xsl:attribute name="class" select="'active'"/>
38-
</xsl:if>
39-
40-
<a href="{ac:build-uri((), map{ 'mode': '&ac;QueryEditorMode' })}" class="query-editor">
41-
<xsl:value-of>
42-
<xsl:apply-templates select="key('resources', 'sparql-editor', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>
43-
</xsl:value-of>
44-
</a>
45-
</li>-->
46-
4735
<xsl:variable name="notification-query" as="xs:string">
4836
<![CDATA[
4937
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

0 commit comments

Comments
 (0)