2bc6a4a8c77bc5ea8fec9a1661e9526b5f1735d7 braney Mon Aug 3 14:54:39 2026 -0700 Keep hgConvert's "Hide all default tracks on the target" checked by default across a target assembly change. The checkbox is disabled by JS while QuickLift is off, which is the default state. A disabled checkbox is not submitted but its boolshad shadow variable still is, so changing the target genome or assembly resubmitted the form and stored hideTracksOnConvert=0 in the cart, leaving the box unchecked on redraw. Disable the shadow along with the checkbox so the default survives. diff --git src/hg/hgConvert/hgConvert.c src/hg/hgConvert/hgConvert.c index fc08a9198da..a5dc8d44f05 100644 --- src/hg/hgConvert/hgConvert.c +++ src/hg/hgConvert/hgConvert.c @@ -150,32 +150,37 @@ cgiMakeCheckBoxWithId("doQuickLift", quickLift, "doQuickLift"); puts(" <label for='doQuickLift' title='Display tracks from the source assembly mapped onto the target assembly'>QuickLift tracks</label>\n"); puts("</div>\n"); puts("<div class='fieldRow' id='hideTracksOnConvertRow' style='margin-top: 8px;'>\n"); cgiMakeCheckBoxWithId("hideTracksOnConvert", hideOtherTracks, "hideTracksOnConvert"); puts(" <label for='hideTracksOnConvert' title='Hide all of the target assembly default tracks, showing only the QuickLifted tracks'>Hide all default tracks on the target</label>\n"); puts("</div>\n"); /* The hide option only applies when QuickLift is on; gray it out otherwise. */ jsInline( "function hgcUpdateHideTracks() {\n" " let ql = document.getElementById('doQuickLift');\n" " let hideBox = document.getElementById('hideTracksOnConvert');\n" " let hideRow = document.getElementById('hideTracksOnConvertRow');\n" + " let hideShadow = document.getElementById('boolshad.hideTracksOnConvert');\n" " if (!ql || !hideBox || !hideRow) return;\n" " hideBox.disabled = !ql.checked;\n" + " // A disabled checkbox is not submitted but its shadow variable is, which\n" + " // would store an unchecked value in the cart when the target assembly\n" + " // changes. Disable the shadow too so the setting survives the reload.\n" + " if (hideShadow) hideShadow.disabled = !ql.checked;\n" " hideRow.style.opacity = ql.checked ? '1' : '0.5';\n" "}\n" "document.addEventListener('DOMContentLoaded', function() {\n" " let ql = document.getElementById('doQuickLift');\n" " if (ql) ql.addEventListener('change', hgcUpdateHideTracks);\n" " hgcUpdateHideTracks();\n" "});\n"); } /* The assembly list only offers targets that already have a chain from this source, so * this is where a user finds out theirs is missing. Point them at the request page. */ if (cfgOptionBooleanDefault("showLiftRequest", FALSE)) { puts("<div class='fieldRow' style='margin-top: 15px;'>\n"); puts("Target assembly not listed? "