ab61f83064c09e9c6a564f59f3d3094abfa7bdf9
max
  Mon Jun 12 04:53:07 2023 -0700
restricting track labels so they do not break the layout, refs #30882

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 72a3f99..f3f5b49 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -7415,46 +7415,38 @@
 void collapseGroup(char *name, boolean doCollapse)
 /* Set cart variable to cause group to collapse */
 {
 cartSetBoolean(cart, collapseGroupVar(name), doCollapse);
 }
 
 void myControlGridStartCell(struct controlGrid *cg, boolean isOpen, char *id)
 /* Start a new cell in control grid; support Javascript open/collapsing by including id's in tr's.
    id is used as id prefix (a counter is added to make id's unique). */
 {
 static int counter = 1;
 if (cg->columnIx == cg->columns)
     controlGridEndRow(cg);
 if (!cg->rowOpen)
     {
-#if 0
-    /* This is unnecessary, b/c we can just use a blank display attribute to show the element rather
-       than figuring out what the browser specific string is to turn on display of the tr;
-       however, we may want to put in browser specific strings in the future, so I'm leaving this
-       code in as a reference. */
-    char *ua = getenv("HTTP_USER_AGENT");
-    char *display = ua && stringIn("MSIE", ua) ? "block" : "table-row";
-#endif
     // use counter to ensure unique tr id's (prefix is used to find tr's in javascript).
     printf("<tr %sid='%s-%d'>", isOpen ? "" : "style='display: none' ", id, counter++);
     cg->rowOpen = TRUE;
     }
 if (cg->align)
-    printf("<td align=%s>", cg->align);
+    printf("<td class='trackLabelTd' align=%s>", cg->align);
 else
-    printf("<td>");
+    printf("<td class='trackLabelTd'>");
 }
 
 static void pruneRedundantCartVis(struct track *trackList)
 /* When the config page or track form has been submitted, there usually
  * are many track visibility cart variables that have not been changed
  * from the default.  To keep down cart bloat, prune those out before we
  * save the cart.  changeTrackVis does this too, but this is for the
  * more common case where track visibilities are tweaked. */
 {
 struct track *track;
 for (track = trackList; track != NULL; track = track->next)
     {
     if (track->parent)  // has super track
         pruneRedundantCartVis(track->parent);