9f8d33c8b2b6bc61f6d02d781c4e02836f7099f9 max Fri Aug 21 02:05:42 2026 -0700 hgSession: new opt-in JavaScript "My Sessions" page; share gbModern.css with hgBlat. refs #38157 Applies the hgBlat facelift strategy (#37996) to hgSession: an opt-in, client-rendered "My Sessions" page gated by the sessionNewPage / sessionNewPageBanner hg.conf flags (mirroring blatNewForm / blatNewFormBanner), with a banner linking between the classic and new pages so neither is a one-way door. sessionNewPage also flips the site default. hgSession.c stays the data/action backend: it emits the session list and page config as an inline JSON global (hgSessionData) into an empty #sessionApp container, and the new hgSession.js builds the UI - a save-current-view card (name + optional description + "only I can load it"; empty name saves under a random share_ name), a "most recently saved session" one-click Update, a searchable/sortable/paged DataTable of sessions (assembly + position, created with last-used on hover, views, a lock icon on private sessions), inline Share (copy link / email / gallery), Edit (rename + description + private), Overwrite and Delete, and a bulk Select -> Delete-all-selected mode. The mutating actions POST to new JSON endpoints (hgS_doDeleteJson / doShareJson / doGalleryJson / doOverwriteJson / doDescribeJson) that run the same SQL as the classic full-page handlers and return JSON, so the table updates in place; loads, file up/downloads and custom-track backup stay as ordinary form submits/links. The Advanced panel keeps feature parity with the classic page (load another user's session, load from URL/file, save to file, back up custom tracks, reset), minus the login/ change-password links that now live in the top menu. Shared UCSC house-style components (design tokens, .gbPill, .gbCard, .gbStrip, .gbSection, .gbShareBox, .gbBanner, the .gbModal* dialog and a .gbTable) are factored into a new gbModern.css. hgBlat is migrated onto it: its generic .blat* classes are renamed to the shared .gb* names in hgBlat.css / hgBlat.js and the #blatResults / #blatFormBox containers get class="gbApp"; verified pixel-clean against the previous search form and results pages, including the rename modal. hgSession.css holds only session-specific layout. diff --git src/hg/js/makefile src/hg/js/makefile index 449f04bdac8..108b1d20323 100644 --- src/hg/js/makefile +++ src/hg/js/makefile @@ -1,63 +1,63 @@ kentSrc = ../.. include ../../inc/common.mk include install.mk SUBDIRS= external model react tutorials include subdirs.mk # UCSC js files must pass jshint UCSC_JS_FILES=ajax.js alleles.js assemblySearch.js autocomplete.js \ autocompleteCat.js edwPersona.js facetedComposite.js \ - gar.js hgBlat.js hgCustom.js hgCollection.js hgGateway.js hgGtexTrackSettings.js \ + gar.js hgBlat.js hgSession.js hgCustom.js hgCollection.js hgGateway.js hgGtexTrackSettings.js \ hgHubConnect.js hgTracks.js hgc.js hgMyData.js hgPhyloPlace.js \ hgVai.js hui.js jsHelper.js utils.js ddcl.js subCfg.js \ encodeProject.js encodeDataSummary.js encodeDataMatrix.js encodeChipMatrix.js encodeMatrix.js d3.dendrograms.js \ cdwSummaryJs.js spectrum.min.js hgSearch.js lorax.js liftRequest.js \ myVariantsBlocks.js topLinks.js # ES6 module files loaded via dynamic import() on hgc details pages MODULE_FILES=hgc.histogram.js # STATIC files must pass jshint STATIC_FILES=staticDoc.js dbDbTaxonomy.js analytics.js # JQUERY files and other third pary files which have NOT BEEN TOUCHED by UCSC JQUERY_FILES_UNTOUCHED= \ d3pie.min.js \ jquery.js jquery.imgareaselect.js jquery-ui.js jquery.contextmenu.js \ jquery.cookie.js jquery.watermark.js jquery.watermarkinput.js jquery.ui.colorPicker.js \ jquery.floatheader.js jquery.rotateTableCellContent.js jquery.plugins.js \ jquery.validate.min.js jquery.history.js jquery.treetable.js mousetrap.min.js dagre-d3.js \ igv.min.js igvFileHelper.js # JQUERY or other third pary files which HAVE BEEN MODIFIED by UCSC JQUERY_FILES_MODIFIED=jquery.tablednd.js ui.dropdownchecklist.js JQUERY_FILES=${JQUERY_FILES_UNTOUCHED} ${JQUERY_FILES_MODIFIED} # SYMLINKED files are include in CGIs via a version or timestamped symlink # to force client side updates SYMLINKED_FILES=${UCSC_JS_FILES} ${JQUERY_FILES} ifdef LOWELAB # LOWE lab files should be forced through jshint (but currently aren't) SYMLINKED_FILES += lowetooltip.js loweautocomplete.js endif jshintTop: ${JSHINT} ${UCSC_JS_FILES} ${STATIC_FILES} doInstallTop: jshintTop @mkdir -p ${DEST}/ ../utils/cpAndLinkToResourceFiles.pl ${extra} -exclude='makefile' \ -versionFile=../inc/versionInfo.h -destDir=${DEST} ${SYMLINKED_FILES} rsync -a ${STATIC_FILES} ${DEST}/ rsync -a ${MODULE_FILES} ${DEST}/ tags: ctags ${UCSC_JS_FILES} model/*/*.js clean: rm -f tags doInstall: doInstallTop ${SUBDIRS:%=%.doInstall}