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/js/hgBlat.js src/hg/js/hgBlat.js index 092cbb5bd71..b6c5b57992c 100644 --- src/hg/js/hgBlat.js +++ src/hg/js/hgBlat.js @@ -20,33 +20,38 @@ function blatIdColor(id) { // UCSC identity semantic colors if (id >= 98) { return '#1f7a34'; } if (id >= 95) { return '#4d7c0f'; } if (id >= 90) { return '#b45309'; } return '#b1301f'; } // ---- cell renderers ------------------------------------------------------ function blatPositionCell(hit) { // For alt/fix/random/chrUn sequences show an info icon linking to the FAQ ("What is chr_alt & // chr_fix?"), with the short explanation as its tooltip. (Sits after the position link, not // nested inside it.) + // Drawn as the browser's own info-icon SVG rather than the ⓘ glyph it used to be: the + // glyph is missing from some system fonts (it renders as a tofu box), and an SVG can take the + // red that makes it stand out in the row (Lou, #38086 note-37). currentColor lets .chrNote in + // hgBlat.css own both the resting and the hover colour. var note = hit.chromNote ? ` ⓘ` : ''; + `title="${htmlEncode(hit.chromNote)} Click to learn more in the BLAT FAQ.">` + + `${blatInfoSvg('currentColor')}` : ''; // The position links to the Genome Browser at this match; the new-tab icon right after it opens // the same in a new tab (whitespace between them, no divider). // URLs are htmlEncode'd before going into href="": they can carry the user's query name, so an // unescaped double-quote would otherwise break out of the attribute (XSS). return `${htmlEncode(hit.chrom)}:` + `${blatFmt(hit.tStart)}-${blatFmt(hit.tEnd)}` + ` ${note}`; } function blatActionsCell(hit) { // The "Open" column now holds just the base-by-base alignment link (Browser moved to the Position // column). detailsUrl is htcUserAli on a fresh search, htcBlatAlign on a shared-link reopen; guard // in case a future caller omits it. @@ -488,86 +493,86 @@ // Top banner: note this is the new page, link back to the classic page (fresh searches only, // where the trash files still exist), and invite feedback. The old page also clears the // blatNewPage preference so later searches use the classic page until the user opts back in. var origPage = cfg.canOldPage ? ` You can go back to the original page anytime.` : ''; var bannerHtml = `