36c2daedb6dd44750f70048d2ab309c3c77dffc8 max Fri Sep 18 09:32:02 2026 -0700 hgSession: drop the name/description labels, info icon after the box #Preview2 week - bugs introduced now will need a build patch to fix refs #38311 diff --git src/hg/js/hgSession.js src/hg/js/hgSession.js index cebe09cf706..75ef8ddaff8 100644 --- src/hg/js/hgSession.js +++ src/hg/js/hgSession.js @@ -669,55 +669,55 @@ } function sessSaveCardHtml(C) { if (!C.loggedIn) { return ''; } // Assembly and position separated by a colon (e.g. "hg38: chr7:1-1,000"); assembly is already // the accession for hubs (trackHubSkipHubName on the server). var loc = ''; if (C.db && C.position) { loc = sessEnc(C.db) + ': ' + sessEnc(C.position); } else if (C.db) { loc = sessEnc(C.db); } else if (C.position) { loc = sessEnc(C.position); } if (loc && C.trackCount) { loc += ', ' + sessNum(C.trackCount) + ' track' + (C.trackCount === 1 ? '' : 's') + ' shown'; } var what = loc ? '<span class="sessSaveWhat">' + loc + '</span>' : ''; // Ghost text for the name field is a real generated name, not an explanation of the feature - - // the "Session name" label and its info bubble already say what it is. + // the info bubble already says what it is. var randName = sessEnc(sessRandomShareName()); var nameTip = 'Optional. Leave this blank and your session will be saved under an ' + 'automatically generated random name, like the one shown here. The session name ' + 'becomes part of the session’s URL, e.g. https://genome.ucsc.edu/s/' + sessEnc(C.userName) + '/<sessionName>.'; var descTip = 'Shown when the session is loaded, in the table below on mouseover, and in ' + 'the Public Sessions gallery if this session is made public.'; return '<div class="sessSaveCard">' + '<div class="sessSaveHead"><span class="sessSaveTitle">' + 'Save the current view as a stable session link</span>' + what + '</div>' + '<div class="sessSaveRow">' + - '<div class="sessSaveField"><span class="lab">Session name ' + - '<span class="sessInfo" title="' + nameTip + '">ⓘ</span></span>' + + '<div class="sessSaveField">' + '<input id="sessSaveName" class="sessSaveInput" type="text" maxlength="255" ' + - 'placeholder="' + randName + '"></div>' + + 'placeholder="' + randName + '">' + + '<span class="sessInfo" title="' + nameTip + '">ⓘ</span></div>' + '<label class="sessSaveCheck"><input type="checkbox" id="sessSavePrivate"> ' + 'Private: Session can only be loaded by myself</label>' + '<button type="button" class="gbPill primary" id="sessSaveBtn" ' + 'title="Save your current browser view as a named session">Save session</button>' + '</div>' + - '<div class="sessSaveField"><span class="lab">Description ' + - '<span class="sessInfo" title="' + descTip + '">ⓘ</span></span>' + + '<div class="sessSaveField">' + '<input id="sessSaveDesc" class="sessSaveInput" type="text" maxlength="512" ' + - 'placeholder="Optional"></div>' + + 'placeholder="Optional">' + + '<span class="sessInfo" title="' + descTip + '">ⓘ</span></div>' + '</div>'; } function sessRecentHtml(recent) { // A quick shortcut to re-save the session the user most recently saved, keeping its name and // description. Hidden when there are no saved sessions. The button's own mouseover is easy to // miss, so a visible (i) bubble carries the same text. if (!recent) { return ''; } var tip = 'Overwrite this session with the currently active view; keeps the session name and ' + 'description identical'; return '<div class="sessRecent">Most recently saved session: <b>' + sessEnc(recent.name) + '</b> <span class="sessRecentTime">(' + sessEnc(recent.lastUse) + ')</span> ' + '<button type="button" class="gbPill" id="sessUpdateNow" title="' + tip + '">' + 'Overwrite now</button> <span class="sessInfo" title="' + tip + '">ⓘ</span></div>'; }