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/lib/web.c src/hg/lib/web.c index 0a9b9bc4562..969cd5b5c5a 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -904,30 +904,74 @@ } void printBlatAssemblyListHtml(char *db) { /* Find all the assemblies that pertain to the selected genome Prints to stdout the HTML to render a dropdown list containing a list of the possible assemblies to choose from. param curDb - The assembly (the database name) to choose as selected. If NULL, no default selection. */ struct dbDb *dbList = hGetBlatIndexedDatabases(); printSomeAssemblyListHtml(db, dbList, NULL, NULL); } +char *getCurrentGenomeLabel(char *db) +/* Construct a label from dbDb (or dbDb related for an assembly hub) for the currently + * selected genome */ +{ +// TODO: what if 'db' is a reference to an assembly hub or genark? +struct dbDb *info = hDbDb(db); +if (info) + return cloneString(info->description); +else + return cloneString(db); +} + +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