16073: Add min width to process io preview label column
authorStephen Smith <stephen@curii.com>
Fri, 30 Sep 2022 14:41:55 +0000 (10:41 -0400)
committerStephen Smith <stephen@curii.com>
Fri, 30 Sep 2022 14:41:55 +0000 (10:41 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

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

index 7284159ebf7193310e41c9836c140b4c37af0fb5..84a9ca6d4c53cd6b345bae17b40e820dce186b5a 100644 (file)
@@ -82,7 +82,8 @@ type CssRules =
   | "halfRow"
   | "symmetricTabs"
   | "imagePlaceholder"
-  | "rowWithPreview";
+  | "rowWithPreview"
+  | "labelColumn";
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     card: {
@@ -183,7 +184,10 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     },
     rowWithPreview: {
         verticalAlign: 'bottom',
-    }
+    },
+    labelColumn: {
+        minWidth: '120px',
+    },
 });
 
 export enum ProcessIOCardType {
@@ -328,7 +332,7 @@ const ProcessIOPreview = withStyles(styles)(
             <TableHead>
                 <TableRow>
                     <TableCell>Name</TableCell>
-                    {showLabel && <TableCell>Label</TableCell>}
+                    {showLabel && <TableCell className={classes.labelColumn}>Label</TableCell>}
                     <TableCell>Value</TableCell>
                     <TableCell>Collection</TableCell>
                 </TableRow>
@@ -390,11 +394,6 @@ const ProcessValuePreview = withStyles(styles)(
         </Typography>
 )
 
-const handleClick = (url) => {
-    window.open(url, '_blank');
-}
-
-
 interface ProcessIORawDataProps {
     data: ProcessIOParameter[];
 }
@@ -591,7 +590,7 @@ const KeepUrlPath = withStyles(styles)(({auth, res, pdh, classes}: KeepUrlProps
 
     const keepUrlPathNav = getKeepNavUrl(auth, res, pdh);
     return keepUrlPath && keepUrlPathNav ?
-        <Tooltip title={"View in keep-web"}><a className={classes.keepLink} href={keepUrlPathNav} target="_blank">{keepUrlPath}</a></Tooltip> :
+        <Tooltip title={"View in keep-web"}><a className={classes.keepLink} href={keepUrlPathNav} target="_blank" rel="noopener noreferrer">{keepUrlPath}</a></Tooltip> :
         // Show No value for root collection io that lacks path part
         <EmptyValue />;
 });