Skip to content

Commit ecb3368

Browse files
Merge pull request #268 from jhuapl-bio/264-anchor-table-headers-for-long-row-counts
264 anchor table headers for long row counts
2 parents 4f1f62e + 2f4c521 commit ecb3368

22 files changed

Lines changed: 138228 additions & 34452 deletions

assets/heatmap.html

Lines changed: 85 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -776,17 +776,9 @@ <h2 id="help-card-title"></h2>
776776
<option value="sqrt">Sqrt</option>
777777
</select>
778778
</div>
779-
<div
780-
id="coverage-legend-wrap"
781-
style="
782-
display: flex;
783-
flex-wrap: wrap;
784-
gap: 0.4em 1.2em;
785-
margin: 0.5em 0 0.2em;
786-
font-size: 0.82em;
787-
align-items: center;
788-
"
789-
></div>
779+
<!-- Legend is a collapsed count by default (see drawCoverage); the
780+
chips inside it are what needs the flex row, not this wrapper. -->
781+
<div id="coverage-legend-wrap" style="margin: 0.5em 0 0.2em; font-size: 0.82em"></div>
790782
<div id="coverage-svg-wrap"></div>
791783
</div>
792784
</div>
@@ -1205,7 +1197,7 @@ <h2 id="help-card-title"></h2>
12051197

12061198
<div class="chart-wrap" style="margin-bottom: 0.9em">
12071199
<div class="chart-title" style="margin: 0 0 0.4em">Per-sample novelty</div>
1208-
<div style="overflow-x: auto">
1200+
<div class="tt-scroll-table">
12091201
<table class="data-table" id="novelty-summary-table" style="font-size: 0.82em; width: 100%">
12101202
<thead id="novelty-summary-head"></thead>
12111203
<tbody id="novelty-summary-body"></tbody>
@@ -1245,7 +1237,7 @@ <h2 id="help-card-title"></h2>
12451237
<button id="novelty-cand-last" class="pg-btn" title="Last page">»</button>
12461238
</div>
12471239
</div>
1248-
<div style="overflow-x: auto">
1240+
<div class="tt-scroll-table">
12491241
<table class="data-table" id="novelty-cand-table" style="font-size: 0.82em; width: 100%">
12501242
<thead id="novelty-cand-head"></thead>
12511243
<tbody id="novelty-cand-body"></tbody>
@@ -2108,6 +2100,18 @@ <h2 id="help-card-title"></h2>
21082100
>
21092101
<i class="fas fa-file-export"></i> Export
21102102
</button>
2103+
<!-- ── Opt-in filter scoping for the metadata table. OFF by
2104+
default: this table is the run inventory, so it stays complete
2105+
unless you deliberately narrow it to extract a subset. ── -->
2106+
<label
2107+
id="runmeta-filter-scope-wrap"
2108+
style="display: inline-flex; align-items: center; gap: 0.4em; cursor: pointer; user-select: none"
2109+
title="Show only samples matching the active sidebar filters. Off by default so the table stays a complete inventory of the run."
2110+
>
2111+
<input type="checkbox" id="runmeta-filter-scope" />
2112+
<span>Only filtered samples</span>
2113+
<span id="runmeta-filter-scope-count" style="color: #789"></span>
2114+
</label>
21112115
<span style="color: #888">
21122116
<i class="fas fa-pen" style="font-size: 0.9em"></i> Click any cell to edit — saved with exported state.
21132117
</span>
@@ -2367,6 +2371,73 @@ <h2 id="help-card-title"></h2>
23672371
Sample locations plotted from latitude / longitude metadata. Click a marker (or a cluster) to view
23682372
organisms for those samples — respects active sidebar filters.
23692373
</p>
2374+
<!-- ── Filter scoping for the map. On by default: a search like
2375+
an organism name or a taxid greys out the samples it does
2376+
not match, and cluster bubbles show "matched / total". ── -->
2377+
<label
2378+
id="map-filter-scope-wrap"
2379+
style="
2380+
display: inline-flex;
2381+
align-items: center;
2382+
gap: 0.4em;
2383+
margin: 0 0 0.6em;
2384+
font-size: 0.82em;
2385+
color: #37474f;
2386+
cursor: pointer;
2387+
user-select: none;
2388+
"
2389+
title="Grey out samples that don't match the active filters, and show matched / total on cluster bubbles. Non-matching samples stay on the map so you can still see where the negatives were."
2390+
>
2391+
<input type="checkbox" id="map-filter-scope" checked />
2392+
<span>Highlight only samples matching the active filters</span>
2393+
<span id="map-filter-scope-count" style="color: #789"></span>
2394+
</label>
2395+
<!-- ── Map-only sample show/hide. Writes to _mapHiddenSamples,
2396+
never to the sidebar's sampleHidden, so every other tab
2397+
keeps all its samples. ── -->
2398+
<details id="map-sample-picker">
2399+
<summary>
2400+
<i class="fas fa-map-pin" style="font-size: 0.9em"></i>
2401+
Samples on map
2402+
<span id="map-sample-count" style="color: #789; font-weight: 400"></span>
2403+
</summary>
2404+
<div id="map-sample-picker-body">
2405+
<div class="map-sample-tools">
2406+
<input
2407+
type="search"
2408+
id="map-sample-search"
2409+
placeholder="Find a sample…"
2410+
title="Narrows the list below. The bulk buttons then act on what's listed."
2411+
/>
2412+
<button type="button" data-map-bulk="all" title="Show every sample listed below">Show all</button>
2413+
<button type="button" data-map-bulk="none" title="Hide every sample listed below">
2414+
Hide all
2415+
</button>
2416+
<button
2417+
type="button"
2418+
data-map-bulk="only"
2419+
title="Show only the samples listed below (hide everything else)"
2420+
>
2421+
Only these
2422+
</button>
2423+
<button type="button" data-map-bulk="invert" title="Flip shown / hidden for the listed samples">
2424+
Invert
2425+
</button>
2426+
<button
2427+
type="button"
2428+
data-map-bulk="matches"
2429+
title="Show only the samples matching the active sidebar filters"
2430+
>
2431+
Only filter matches
2432+
</button>
2433+
</div>
2434+
<div id="map-sample-list"></div>
2435+
<p class="map-sample-note">
2436+
Affects this map only — hidden samples stay in every other tab. Use the sidebar to remove a sample
2437+
from the whole report.
2438+
</p>
2439+
</div>
2440+
</details>
23702441
<div id="geo-precise-slot"></div>
23712442
<div
23722443
id="geo-precise-no-data"
@@ -3306,7 +3377,7 @@ <h3>Upload Data</h3>
33063377
</button>
33073378

33083379
<!-- ── Metadata CSV upload ── -->
3309-
<h3 style="margin-top: 1em">Upload Metadata CSV</h3>
3380+
<h3 style="margin-top: 1em">Upload Metadata File</h3>
33103381
<div
33113382
id="meta-upload-zone"
33123383
ondragover="event.preventDefault();this.classList.add('drag-over')"

0 commit comments

Comments
 (0)