47ea57080b515e5dad5f658c58feb8944a7e7d61
chmalee
  Thu Jan 29 15:30:26 2026 -0800
Replace clade/assembly dropdowns with a search bar on most CGIs. Add a recents list to hgGateway and to the species bar and to the 'Genomes' dropdown menu. Track recently selected species in localStorage. Add toGenome and fromGenome arguemnts to hubApi/liftOver in order to find appropriate liftover assemblies, refs #36232

diff --git src/hg/inc/web.h src/hg/inc/web.h
index 139fa54a73e..0e8e29b58fe 100644
--- src/hg/inc/web.h
+++ src/hg/inc/web.h
@@ -228,43 +228,58 @@
  *             If NULL, no default selection.
  *  param allowInactive - if set, print all assemblies for this genome,
  *                        even if they're inactive or have no database
  */
 
 void printSomeAssemblyListHtmlParm(char *db, struct dbDb *dbList,
                                         char *dbCgi, char *event, char *javascript);
 /* Find all the assemblies from the list that are active.
 Prints to stdout the HTML to render a dropdown list containing the list
 of the possible assemblies to choose from.
 
 param db - The default assembly (the database name) to choose as selected.
                 If NULL, no default selection.
  */
 
-void printOrgAssemblyListAxtInfo(char *dbCgi, char *javascript);
-/* Find all the organisms/assemblies that are referenced in axtInfo,
- * and print the dropdown list. */
-
 void printBlatAssemblyListHtml(char *curDb);
 /*
 Prints to stdout the HTML to render a dropdown list containing a list of the possible
 assemblies to choose from that have blat servers available.
 
 param curDb - The assembly (the database name) to choose as selected.
 If NULL, no default selection.
  */
 
+char *getCurrentGenomeLabel(char *db);
+/* Construct a label from dbDb (or dbDb related for an assembly hub) for the currently
+ * selected genome */
+
+void printGenomeSearchBar(char *id, char *placeholder, char *classStr, boolean withSearchButton, char *labelText, char *labelClassStr);
+/* Prints an input text box that can be used to search for any genome.
+ * param withSearchButton - controls if there is a button next to the bar
+ *     to manually fire the search
+ * param classStr - if desired, a custom class name or string can be used
+ *     otherwise the default styling of 'genomeSearchBarDefault' is applied via HGStyle.css
+ * param labelText - If not empty, put up a <label> for the search bar, use labelClassStr to
+ *     style it
+ * param labelClassStr - if not empty and labelText not empty, apply this class to the label
+ *
+ * There is a default class in HGStyle.css that is used
+ *
+ * The caller CGI needs to include  jquery-ui.js and utils.js to turn this into a
+ * useable search bar with autocomplete */
+
 void getDbGenomeClade(struct cart *cart, char **retDb, char **retGenome,
 		      char **retClade, struct hash *oldVars);
 /* Examine CGI and cart variables to determine which db, genome, or clade
    has been selected, and then adjust as necessary so that all three are
    consistent.  Detect changes and reset db-specific cart variables.
    Save db, genome and clade in the cart so it will be consistent hereafter.
   The order of preference here is as follows:
 If we got a request that explicitly names the db, that takes
 highest priority, and we synch the organism to that db.
 If we get a cgi request for a specific organism then we use that
 organism to choose the DB.  If just clade, go from there.
 
 In the cart only, we use the same order of preference.
 If someone requests an organism we try to give them the same db as
 was in their cart, unless the organism doesn't match.