16073: Add tooltip hints to collection/keep links
authorStephen Smith <stephen@curii.com>
Wed, 14 Sep 2022 23:22:27 +0000 (19:22 -0400)
committerStephen Smith <stephen@curii.com>
Wed, 14 Sep 2022 23:22:27 +0000 (19:22 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/views/process-panel/process-io-card.tsx

index 1f5d6aa6607f02c751caa34135f807388a1d3083..340d1298881bef04e2e8ece9cf60428567114cfd 100644 (file)
@@ -442,7 +442,7 @@ const KeepUrlBase = withStyles(styles)(({auth, res, pdh, classes}: KeepUrlProps
     // Passing a pdh always returns a relative wb2 collection url
     const pdhWbPath = getNavUrl(pdhUrl.replace('keep:', ''), auth);
     return pdhUrl && pdhWbPath ?
-        <RouterLink to={pdhWbPath} className={classes.keepLink}>{pdhUrl}</RouterLink> :
+        <Tooltip title={"View collection in Workbench"}><RouterLink to={pdhWbPath} className={classes.keepLink}>{pdhUrl}</RouterLink></Tooltip> :
         <></>;
 });
 
@@ -453,8 +453,9 @@ const KeepUrlPath = withStyles(styles)(({auth, res, pdh, classes}: KeepUrlProps
 
     const keepUrlPathNav = getKeepNavUrl(auth, res, pdh);
     return keepUrlPath && keepUrlPathNav ?
-        <MuiLink className={classes.keepLink} onClick={() => handleClick(keepUrlPathNav)}>{keepUrlPath}</MuiLink> :
-        <></>;
+        <Tooltip title={"View in keep-web"}><MuiLink className={classes.keepLink} onClick={() => handleClick(keepUrlPathNav)}>{keepUrlPath}</MuiLink></Tooltip> :
+        // Show No value for root collection io that lacks path part
+        <EmptyValue />;
 });
 
 const getKeepNavUrl = (auth: AuthState, file: File | Directory, pdh?: string): string => {