61a71c293d9ad89a53d4d8f7729915015a7ab9dd
lrnassar
  Thu Oct 28 09:33:19 2021 -0700
Adding links, updating format, and changing wording for hubConnect page. Refs #28324

diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c
index a1c5b5f..67c511c 100644
--- src/hg/hgHubConnect/hgHubConnect.c
+++ src/hg/hgHubConnect/hgHubConnect.c
@@ -255,43 +255,42 @@
 struct hubConnectStatus *hub, *nextHub;
 
 for(hub = hubList; hub; hub = nextHub)
     {
     nextHub = hub->next;
     // if url is not in publicHash, it's unlisted */
     if (!((publicHash != NULL) && hashLookup(publicHash, hub->hubUrl)))
 	{
 	unlistedHubCount++;
 	slAddHead(&unlistedHubList, hub);
 	}
     }
 
 hubList = NULL;  // hubList no longer valid
 
-puts("<p>If have a new hub URL, you can add it here, then connect/disconnect "
-        " as needed. Other users will not see your hub.</p>"
-    "<p>To share your hub with others, connect it below, then save a session "
-        "from the Genome Browser (\"My Data > My Sessions\"). "
-        " You can put the session link "
-        "into a manuscript or send it to others. This means that you can always update the session later. "
-        "Users who click the session link will lose their own Genome Browser "
-        "configuration, connected hubs and custom tracks.</p>"
-        "<p>If you want to avoid overriding their sessions, construct a link for others with "
-        "the hubUrl argument, like this: "
-        "https://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&hubUrl=URL_TO_HUB"
+puts("<p>Enter hub URLs below to connect hubs. Hubs connected this way are not accessible to "
+        "other users by default.</p><p>If you wish to share your hub you can create a "
+        "<a href=\"/goldenPath/help/hgSessionHelp.html\" style='color:#121E9A' target=_blank>session link</a>. "
+        "First, connect the hub and configure the tracks image as desired, then navigate to "
+        "<a href=\"/cgi-bin/hgSession\" style='color:#121E9A' target=_blank>My Sessions</a> (<b>My Data</b> > <b>My Sessions</b>). "
+        "The resulting stable link can be added to publications and shared freely. You, as the author, "
+        "also have the power to update the session contents freely.</p>"
+        "<p>Alternatively, you may <a href=\"http://genome.ucsc.edu/goldenPath/help/hgTrackHubHelp.html#Sharing\" "
+        "style='color:#121E9A' target=_blank>build a link with the hub URL</a> to allow users to retain their browser "
+        "configuration, connected hubs, and custom tracks.</p>"
         "</p>"
-        "<p><a href=\"../contacts.html\">Contact us</A> if you want to add a hub to the list of public hubs.</p>\n"
+        "<p><a href=\"../contacts.html\" style='color:#121E9A'>Contact us</A> if you wish to submit a hub to the list of public hubs.</p>\n"
         );
 
 if (unlistedHubCount == 0)
     {
     // nothing to see here
     printf("<tr><td>No Unlisted Track Hubs</td></tr>");
     printf("</thead></table>");
     puts("</FORM>");      // return from within DIV and FROM is probably not a good idea
     puts("</div></div>"); // tabSection and .unlistedHubs
     return;
     }
 
 // time to output the big table.  First the header
 puts(
     "<tr> "
@@ -401,51 +400,53 @@
  * hubCheck utility on a hub and load a hub with the udcTimeout and measureTiming
  * variables turned on */
 {
 // put out the top of our page
 char *hubUrl = cartOptionalString(cart, "validateHubUrl");
 
 // the outer div for all the elements in the tab
 puts("<div id=\"hubDeveloper\" class=\"hubList\">");
 
 char *hubUrlVal = "";
 if (hubUrl != NULL)
     hubUrlVal = catThreeStrings(" value='", hubUrl, "'");
 
 puts("<div class='tabSection'>");
 puts("<h4>Create your own hub</h4>");
-puts("For information on making track hubs, please see the following pages: \n "
+puts("For information on making track hubs, see the following pages: \n "
     "<ul>\n"
-    "<li><a href=\"../goldenPath/help/hgTrackHubHelp.html\" TARGET=_blank>Track Hub Users Guide</a></li>\n"
-    "<li><a href='../goldenPath/help/hubQuickStart.html' target=_blank>Quick Start</a></li>\n"
-    "<li><a href=\"../goldenPath/help/trackDb/trackDbHub.html\" target=_blank>Track Hub Settings Reference</a></li>\n"
-    "<li><a href=\"../goldenPath/help/hgTrackHubHelp#Hosting\" target=_blank>Where to host your track hub</a></li>\n"
-    "<li><a href='../contacts.html'>Contact us</a> if you have trouble</li>\n"
+    "<li><a href='../goldenPath/help/hubQuickStart.html' style='color:#121E9A' target=_blank>Quick Start Guide</a></li>\n"
+    "<li><a href=\"../goldenPath/help/hgTrackHubHelp.html\" style='color:#121E9A' TARGET=_blank>Track Hub User's Guide</a></li>\n"
+    "<li><a href=\"../goldenPath/help/hgTrackHubHelp#Hosting\" style='color:#121E9A' target=_blank>Where to host your track hub</a></li>\n"
+    "<li><a href=\"../goldenPath/help/trackDb/trackDbHub.html\" style='color:#121E9A' target=_blank>Track Hub Settings Reference</a></li>\n"
     "</ul>\n"
-    "Example hub URL: http://genome.ucsc.edu/goldenPath/help/examples/hubDirectory/hub.txt");
+    "<BR>You may also <a href='../contacts.html' style='color:#121E9A'>contact us</a> if you have any "
+    "issues or questions on hub development.");
 puts("</div>"); // .tabSection
 
 puts("<div class='tabSection'>");
 puts("<h4>Check a hub for errors</h4>");
 printf("<label for=\"validateHubUrl\"><b>Hub URL:</b></label>");
-printf("<input id='validateHubUrl' name='validateHubUrl' class='hubField' type='text' size='65'%s>\n", hubUrlVal);
+printf("<input id='validateHubUrl' name='validateHubUrl' class='hubField' "
+       "placeholder='e.g. https://genome.ucsc.edu/goldenPath/help/examples/hubDirectory/hub.txt' "
+       "type='text' size='65'%s>\n", hubUrlVal);
 printf("<button type='button' id='hubValidateButton'>Check</button>\n");
 
-puts("<div class='help'>When debugging a hub, it is sometimes helpful to check it for errors. "
-        "With the button above, you can validate the hub's configuration files, including hub.txt, "
+puts("<div class='help'>Use the URL bar above to check a hub for errors. This will "
+        "validate the hub's configuration files, including hub.txt, "
         "genomes.txt and trackDb.txt. "
-    "A hierarchical tree of tracks is presented with any errors in red. A hub "
+    "It will also present a  hierarchical tree of tracks with any errors in red. A hub "
     "with no errors still shows the tree which can be used to explore the track hierarchy. "
     "Hub error checking will always refresh the files and never use our remote file cache (see below)."
     "</div>\n "
 );
 puts("</div>"); // .tabSection
 
 puts("<div class='tabSection'>");
 puts("<h4>Enable Genome Browser debugging modes</h4>");
 puts("<div class='help'>These apply to all connected hubs. By default, caching is activated and track load times are not shown, but you can change these settings when debugging your hub.</div>");
 puts("<div style='margin-left: 15px'>");
 puts("<FORM ACTION='hgHubConnect#hubDeveloper' METHOD='POST' NAME='debugForm'>");
 
 // output the udcTimeout button
 char *noCacheLabel = "Deactivate (Always refresh)";
 char *timeout = "5";
@@ -488,41 +489,41 @@
 
 jsOnEventById("click", "hubValidateButton", "makeIframe(event)");
 }
 
 void printSearchAndFilterBoxes(int searchEnabled, char *hubSearchTerms, char *dbFilter)
 /* Create the text boxes for search and database filtering along with the required
  * javscript */
 {
 printf("<FORM ACTION=\"%s\" NAME=\"searchHubForm\">\n",  "../cgi-bin/hgHubConnect");
 if (searchEnabled)
     {
     cgiMakeHiddenVar(hgHubDoSearch, "on");
     cgiMakeHiddenVar(hgHubDbFilter, "");
     cartSaveSession(cart);
 
-    printf("The list below can be filtered on words in the description pages or assemblies.<BR>"
+    printf("The list below can be filtered on words in the hub description pages or by assemblies.<BR>"
             "Search terms: "
             "<input name=\"hubSearchTerms\" id=\"hubSearchTerms\" class=\"hubField\" "
             "placeholder='e.g. methylation' type=\"text\" size=\"50\" value=\"%s\"> \n",
             hubSearchTerms!=NULL?hubSearchTerms:"");
     printf("\n");
     }
 
 printf("Assembly: "
         "<input name=\"%s\" id=\"hubDbFilter\" class=\"hubField\" "
-        "type=\"text\" size=\"15\" value=\"%s\" placeholder='empty or e.g. hg38'> \n"
+        "type=\"text\" size=\"15\" value=\"%s\" placeholder='e.g. hg38'> \n"
         "<input name=\"hubSearchButton\" id='hubSearchButton' "
         "class=\"hubField\" type=\"submit\" value=\"Search Public Hubs\">\n",
         hgHubDbFilter, dbFilter!=NULL?dbFilter:"");
 puts("</FORM>");
 }
 
 
 void printSearchTerms(char *hubSearchTerms)
 /* Write out a reminder about the current search terms and a note about
  * how to navigate detailed search results */
 {
 printf("Displayed list <B>restricted by search terms:</B> %s\n", hubSearchTerms);
 puts("<input name=\"hubDeleteSearchButton\" id='hubDeleteSearchButton' "
         "class=\"hubField\" type=\"button\" value=\"Show All Hubs\">\n");
 
@@ -1219,39 +1220,38 @@
 addPublicHubsToHubStatus(cart, conn, publicTable, statusTable);
 if (measureTiming)
     printf("Time of addPublicHubsToHubStatus: %ld <br>", (clock1000()-lastTime));
 
 
 // build full public hub lookup hash, taking each URL to struct hubEntry * for that hub
 struct hash *hubLookup = buildPublicLookupHash(conn, publicTable, statusTable, pHash);
 
 puts("<div id=\"publicHubs\" class=\"hubList\">");
 
 puts("<div class='tabSection' style='border-bottom:none'>");
 
 printf(
     "<P>"
     "Track data hubs are collections of external tracks that can be added to the UCSC Genome Browser. "
-    "Click \"Connect\" below to show the \"Genomes\" page with all assemblies covered by a hub. "
-    "Hub tracks then show up under the hub's own blue bar track group under the browser graphic, "
-    "as well as under \"Genome Browser > Configure\". See the "
+    "Click <B>Connect</B> to attach a hub and redirect to the assembly gateway page. "
+    "Hub tracks will then show up in the hub's own blue bar track group under the browser graphic. "
+    "See the "
     "<A HREF=\"../goldenPath/help/hgTrackHubHelp.html\" TARGET=_blank style='color:#121E9A'>"
-    "User's Guide</A>. "
+    "User's Guide</A> for more. "
     "</P>"
     "<P>Track Hubs are created and maintained by external sources."
-    " The public hubs below were submitted to us, we have performed "
-    " basic quality checks. UCSC is not responsible for their content.</P>"
+    " UCSC is not responsible for their content.<BR></P>"
 );
 
 char *hubSearchTableName = hubSearchTextTableName();
 int searchEnabled = sqlTableExists(conn, hubSearchTableName);
 
 printSearchAndFilterBoxes(searchEnabled, hubSearchTerms, dbFilter);
 
 struct hash *searchResultHash = NULL;
 struct slName *hubsToPrint = NULL;
 if (searchEnabled && !isEmpty(hubSearchTerms))
     {
     printSearchTerms(hubSearchTerms);
     // Forcing checkDescriptions to TRUE right now, but we might want to add this as a
     // checkbox option for users in the near future.
     bool checkDescriptions = TRUE;
@@ -1515,31 +1515,31 @@
         "<span class='ui-icon ui-icon-closethick'>close</span></a></div>");
 
     puts("<div id='content' style='margin:10px; padding: 2px'>");
     if (isEmpty(hubUrl))
         printf("Please wait, loading and checking hub, this can take 15 seconds to several minutes.");
     else
         {
         puts("<p><button id='reloadButton'>Check again</button>");
         puts("&nbsp;&nbsp;<button id='closeButton'>Close this window</button></p>");
         jsOnEventByIdF("click", "reloadButton", "reloadIframe()");
         jsOnEventByIdF("click", "closeButton", "closeIframe()");
         jsOnEventByIdF("click", "windowX", "closeIframe()");
 
         printf("<div>Finished checking %s</div>", hubUrl);
         doValidateNewHub(hubUrl);
-        puts("<p>Our command line tool <a href='https://hgdownload.soe.ucsc.edu/downloads.html#utilities_downloads'>hubCheck</a> "
+        puts("<p>Our command line tool <a target=_blank href='https://hgdownload.soe.ucsc.edu/downloads.html#utilities_downloads'>hubCheck</a> "
                 "can be used to obtain the same output from a Unix command line.</p>");
         }
     puts("</div>"); // margin 10px
     puts("</div>"); // ui-dialog-titlebar
     puts("</div>"); // ui-dialog
     cartWebEnd();
     return;
     }
 
 cartWebStart(cart, NULL, "%s", pageTitle);
 
 printIncludes();
 
 if (cartVarExists(cart, hgHubDoHubCheck))
     {