444b1eb7e7ec2938a4a9a6d3ed214179073ab6f7
max
  Wed Sep 9 05:41:23 2026 -0700
Faceted composite: manual row reordering, group-by, saved UI state, and per-facet "only" links

The Fiber-seq compendium put 41 samples times six data types into one
faceted composite, which pushed on the parts of the page that were built
for a flat list of tracks.  Changes here, all in the shared faceted
composite code rather than anything Fiber-seq specific:

Row order.  Track order in the image follows the table, so the table now
lets you set that order by hand.  Vendored DataTables RowReorder 1.5.1
adds a drag handle as the first column after the checkbox, enabled on
the "shown in the browser" tab where reordering means something.  The
dragged order is remembered by sample name rather than by row number, so
it survives a metadata file whose contents have changed.

Group by.  A container of six data types can be read two ways, so the
page offers both: group the image by sample, keeping a sample's six
tracks together, or by data type, putting all the accessibility tracks
next to each other.  cartDump assigns the priorities and just swaps the
nesting of its two loops.  trackDb sets the starting choice with
defaultGroupBy.

Saved state.  Facets, per-column searches, sort column, page length,
which tab was open and the hand-dragged order go to localStorage keyed
by metadata id, so coming back to the page does not mean setting it all
up again.

Facet "only" links.  A small "only" appears on hover behind each facet
value and narrows to just that one, instead of unticking the others by
hand.

Column descriptions.  A metadata column heading can now carry a longer
explanation after a "|", shown behind an info icon on both the column
header and the facet heading.

Also: parseDataTypes() was returning its list reversed, since slPairAdd
prepends and nothing put it back, so the data type checkboxes and the
resulting subtrack order were backwards; the composite lifts itself out
of hide when the user touches anything on the page, which is what they
meant by touching it; the facet sidebar collapses when a table has no
facetable columns; and the label wording throughout says "samples" and
"in the browser" rather than "tracks" and "active".

The Methbase hg38 track gets labels for its three data types, which were
showing as the bare pipeline names hmr, levels and reads.

refs #36210

diff --git src/hg/js/external/makefile src/hg/js/external/makefile
index f8c6beb4ccd..e4787779f0f 100644
--- src/hg/js/external/makefile
+++ src/hg/js/external/makefile
@@ -1,25 +1,26 @@
 kentSrc = ../../..
 include ../../../inc/common.mk
 include ../install.mk
 
 JS_FILES= BackboneExtend.js \
 	bootstrap-3.3.7.min.js \
 	dataTables-1.10.12.min.js \
 	dataTables-1.13.6.min.js \
 	dataTables-2.2.2.min.js \
 	dataTables.buttons-3.2.2.min.js \
+	dataTables.rowReorder-1.5.1.min.js \
 	dataTables.select-1.7.0.min.js \
 	dataTables.select-3.0.0.min.js \
 	es5-sham.4.0.3.min.js es5-shim.4.0.3.min.js \
 	immutable.3.7.4.min.js \
 	jquery.bifrost.1.0.1.min.js \
 	jstree-3.3.7.min.js \
 	lodash.3.10.0.compat.min.js \
 	react-with-addons-0.12.2.min.js \
 	sorttable.js tus.min.js \
 	shepherd.min.js \
 	reveal-5.1.0.js reveal-notes-5.1.0.js
 
 # Don't bother jshint'ing external libs.
 jshint: