42b33234bee213325c2b6eede35edbb4fb2e566c max Thu Sep 3 06:40:30 2026 -0700 hgBlat: spinner while a search runs, shorter example, left-justified result columns Four items from Lou's note-37 on #38086. The search is a plain form POST, so nothing on screen changed between Submit and the arrival of the results - on an assembly served by a dynamic BLAT server that is a ten second wait with no sign that anything is happening. A busy overlay now covers the form: a generic .gbBusyBg/.gbSpinner in gbModern.css (CSS-drawn, since the page is already navigating away when it appears), put up by blatFormBusyWire() 350 ms after submit so a sub-second hg38 search does not flash a scrim, and swapping its text after 8 s to say that an index is probably being loaded on demand. Skipped for Clear and for an empty query; a pageshow handler takes it down again after a Back navigation. The example sequence goes from 13.8 kb of the SOD1 locus to 2.5 kb of PTP4A3, hg38 chr8:141,424,501-141,427,000. That window is carried by both chr8_KI270819v1_alt and chr8_MU273363v1_fix, so the example now demonstrates the alt and fix rows and their FAQ icons instead of returning one plain hit, and it covers two PTP4A3 exons so the result track is named after the gene. Every column of the results table is left-justified; the numeric ones keep tabular figures, and the score value gets a fixed width so its bars stay in a straight line. The alt/fix explanation icon is red rather than faint grey, and is drawn as the browser's own info-icon SVG rather than the U+24D8 glyph, which some system fonts do not have. refs #38086 diff --git src/hg/hgBlat/hgBlat.c src/hg/hgBlat/hgBlat.c index 5f12175762f..ec5c178f7f3 100644 --- src/hg/hgBlat/hgBlat.c +++ src/hg/hgBlat/hgBlat.c @@ -2773,35 +2773,37 @@ /* Sort and output have no dropdown on this page - hgBlat.js submits them as hidden fields, so the * request is unchanged. They are pinned to the defaults rather than read from the cart: with no * control to change them, a stale cart value (say output=psl left over from the classic form) would * otherwise be stuck for the rest of the session with no way for the user to get back. */ jsonWriteString(jw, "sort", pslSortList[0]); /* "query,score" */ jsonWriteString(jw, "output", outputList[0]); /* "hyperlink" */ jsonWriteBoolean(jw, "allResults", allResults); jsonWriteBoolean(jw, "autoRearr", autoRearr); jsonWriteBoolean(jw, "allGenomes", allGenomes); /* "Keep results" only means something on a machine configured to clear earlier BLAT result tracks. * With blatOldTracks at its "keep" default, or at "hide", there is nothing to opt out of, so the * checkbox is not shown at all. hgc.c (buildBigPsl) is what acts on blatKeepResults. */ jsonWriteBoolean(jw, "showKeepResults", sameString(cfgOptionDefault("blatOldTracks", "keep"), "delete")); jsonWriteBoolean(jw, "keepResults", cartUsualBoolean(cart, "blatKeepResults", FALSE)); -/* The example is fetched on demand rather than inlined: it is a realistic ~14 kb sequence, which - * would otherwise be embedded in every page load of the form just to serve the few users who click - * "Load example". */ +/* The example is fetched on demand rather than inlined: it is a real 2.5 kb sequence, which would + * otherwise be embedded in every page load of the form just to serve the few users who click + * "Load example". The sequence is a window over two PTP4A3 exons that is also carried by an alt + * haplotype and a fix patch of chr8, so the results table shows the alt/fix rows and their + * explanatory icons rather than a single boring hit. */ jsonWriteString(jw, "exampleUrl", "../goldenPath/help/blatExample.fa"); -jsonWriteString(jw, "exampleLabel", "Load example - human SOD1 locus"); +jsonWriteString(jw, "exampleLabel", "Load example - human PTP4A3 gene"); /* Same "similar tools" links the classic page offered, so the sidebar isn't a set of dead links. * These carry $DB$ rather than a baked-in db: picking a genome no longer reloads the page, so * blatFormSetDb() re-expands them against the newly chosen assembly. * * Deliberately NOT gated on hgPcrOk() the way the classic form was. That test can only be made for * the assembly the page happened to load with, so on a page where the genome can be changed without * a round trip it goes stale immediately: loading on an assembly without a PCR server would hide * these links for the rest of the session, even after switching to hg38. hgPcr reports an * unsupported assembly perfectly well itself, so an occasionally-unsupported link beats a link that * silently disappears. */ jsonWriteString(jw, "pcrUrlTpl", "../cgi-bin/hgPcr?db=$DB$"); jsonWriteStringf(jw, "oligoMatchUrlTpl", "hgTrackUi?%s=%s&db=$DB$&g=oligoMatch&oligoMatch=pack", cartSessionVarName(), cartSessionId(cart)); /* Link back to the classic form. blatNewForm is a cart variable (defaulting to the hg.conf * setting), so this is a per-user opt-out rather than a machine-wide switch. */