[ARVADOS-WORKBENCH2] updated: 1.4.1-345-gd4efd52e

Git user git at public.arvados.org
Wed May 27 23:58:46 UTC 2020


Summary of changes:
 cypress/integration/collection-panel.spec.js    |  3 ++-
 src/views/collection-panel/collection-panel.tsx | 15 ++++++++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

       via  d4efd52e7e68c739dad1095267b6c8f0bf4a40fa (commit)
      from  eac8deef3ffc5d5f63328c3fec23d624d27abbee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit d4efd52e7e68c739dad1095267b6c8f0bf4a40fa
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Wed May 27 20:57:55 2020 -0300

    16118: Shows only the readonly icon by the collection's name.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas at di-pentima.com.ar>

diff --git a/cypress/integration/collection-panel.spec.js b/cypress/integration/collection-panel.spec.js
index ff55e050..6fc2d565 100644
--- a/cypress/integration/collection-panel.spec.js
+++ b/cypress/integration/collection-panel.spec.js
@@ -54,8 +54,9 @@ describe('Collection panel tests', function() {
                     // Check that name & uuid are correct.
                     cy.get('[data-cy=collection-info-panel]')
                         .should('contain', this.testCollection.name)
-                        .and(`${isWritable ? 'not.': ''}contain`, 'Read-only')
                         .and('contain', this.testCollection.uuid);
+                    // Check for the read-only icon
+                    cy.get('[data-cy=read-only-icon]').should(`${isWritable ? 'not.' : ''}exist`);
                     // Check that both read and write operations are available on
                     // the 'More options' menu.
                     cy.get('[data-cy=collection-panel-options-btn]')
diff --git a/src/views/collection-panel/collection-panel.tsx b/src/views/collection-panel/collection-panel.tsx
index aac9b300..36625387 100644
--- a/src/views/collection-panel/collection-panel.tsx
+++ b/src/views/collection-panel/collection-panel.tsx
@@ -5,7 +5,7 @@
 import * as React from 'react';
 import {
     StyleRulesCallback, WithStyles, withStyles, Card,
-    CardHeader, IconButton, CardContent, Grid, Tooltip, Chip
+    CardHeader, IconButton, CardContent, Grid, Tooltip
 } from '@material-ui/core';
 import { connect, DispatchProp } from "react-redux";
 import { RouteComponentProps } from 'react-router';
@@ -29,7 +29,7 @@ import { GroupResource } from '~/models/group';
 import { UserResource } from '~/models/user';
 import { getUserUuid } from '~/common/getuser';
 
-type CssRules = 'card' | 'iconHeader' | 'tag' | 'label' | 'value' | 'link' | 'centeredLabel' | 'readOnlyChip';
+type CssRules = 'card' | 'iconHeader' | 'tag' | 'label' | 'value' | 'link' | 'centeredLabel' | 'readOnlyIcon';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     card: {
@@ -61,8 +61,9 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
             cursor: 'pointer'
         }
     },
-    readOnlyChip: {
-        marginLeft: theme.spacing.unit
+    readOnlyIcon: {
+        marginLeft: theme.spacing.unit,
+        fontSize: 'small',
     }
 });
 
@@ -115,7 +116,11 @@ export const CollectionPanel = withStyles(styles)(
                                     <span>
                                         <IllegalNamingWarning name={item.name}/>
                                         {item.name}
-                                        {isWritable || <Chip variant="outlined" icon={<ReadOnlyIcon className={classes.readOnlyChip}/>} label="Read-only" className={classes.readOnlyChip} />}
+                                        {isWritable ||
+                                        <Tooltip title="Read-only">
+                                            <ReadOnlyIcon data-cy="read-only-icon" className={classes.readOnlyIcon} />
+                                        </Tooltip>
+                                        }
                                     </span>
                                 }
                                 titleTypographyProps={this.titleProps}

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list