fcb6dc8dfa166136193177c895ca181200850e4d
max
  Mon Jan 19 06:02:31 2026 -0800
changing superTrack TrackUi quite a bit. Removing dropdowns and
replacing them with buttons. Also adding buttons for setting all tracks
or all visible tracks to a visibility. While at it, making a change
to the js-query-library function (inversed the order of arguments) which was requested months ago by
Brian, but I forgot to make the change after code review. Also
shortening the "source data version" label to just "version". refs #36917.

I changed the library function
hTvDropDownClassVisOnlyAndExtra() rather than copying the code. This was
because I was hesitant to copy/paste all this code into a second
function, which would have been the only alternative, as the function
cannot be reused as-is. So I modified the function to return the list of
visibilities. It's never clear whether it's better to modify
functions or copy/paste code.
here, not breaking the function into smaller parts, so copy/pasting it, would risk
requiring more future copy/pasted code. But the risk is to break existing
tracks.

diff --git src/hg/inc/hui.h src/hg/inc/hui.h
index feb25910676..c7374d4c789 100644
--- src/hg/inc/hui.h
+++ src/hg/inc/hui.h
@@ -214,30 +214,34 @@
 char *hStringFromTv(enum trackVisibility vis);
 /* Given enum representation convert to string. */
 
 /* Standard width for visibility dropdowns */
 #define TV_DROPDOWN_STYLE "width: 70px"
 
 void hTvDropDownClassVisOnlyAndExtra(char *varName, enum trackVisibility vis,
                                      boolean canPack, char *class, char *visOnly, struct slPair *events);
 /* Make track visibility drop down for varName with style class,
 	and potentially limited to visOnly */
 #define hTvDropDownClassVisOnly(varName,vis,canPack,class,visOnly) \
         hTvDropDownClassVisOnlyAndExtra(varName,vis,canPack,class,visOnly,NULL)
 
 void hTvDropDownClassWithJavascript(char *varName, char *id, enum trackVisibility vis, boolean canPack,
                                     char *class, struct slPair *events);
+
+/* return a NULL-terminated array of char* with possible track visibilities */
+char** hTvGetVizArr(enum trackVisibility vis, boolean canPack, char* visOnly);
+
 /* Make track visibility drop down for varName with style class and javascript */
 #define hTvDropDownClass(varName,vis,canPack,class) \
         hTvDropDownClassWithJavascript((varName),NULL,(vis),(canPack),(class),NULL)
 #define hTvDropDownWithJavascript(varName,vis,canPack,javascript) \
         hTvDropDownClassWithJavascript((varName),NULL,(vis),(canPack),"normalText",(javascript))
 #define hTvDropDown(varName,vis,canPack) \
         hTvDropDownClassWithJavascript((varName),NULL,(vis),(canPack),"normalText",NULL)
 
 #define SUPERTRACK_DEFAULT_VIS  "hide"
 
 void hideShowDropDownWithClassAndExtra(char *varName, char *id, boolean show, char *class, struct slPair *events);
 #define hideShowDropDown(varName,show,class) \
         hideShowDropDownWithClassAndExtra(varName,NULL,show,class,NULL)
 /* Make hide/show dropdown for varName */