projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
16118: Adds test checking writable/readonly collection UI changes.
[arvados-workbench2.git]
/
src
/
views
/
collection-panel
/
collection-panel.tsx
diff --git
a/src/views/collection-panel/collection-panel.tsx
b/src/views/collection-panel/collection-panel.tsx
index be2afc721bf7238135522dee01f23c708fd947ac..defe73b9e6cdb95235d46870b59fbcab42523518 100644
(file)
--- a/
src/views/collection-panel/collection-panel.tsx
+++ b/
src/views/collection-panel/collection-panel.tsx
@@
-29,7
+29,7
@@
import { GroupResource } from '~/models/group';
import { UserResource } from '~/models/user';
import { getUserUuid } from '~/common/getuser';
import { UserResource } from '~/models/user';
import { getUserUuid } from '~/common/getuser';
-type CssRules = 'card' | 'iconHeader' | 'tag' | 'label' | 'value' | 'link' | 'centeredLabel';
+type CssRules = 'card' | 'iconHeader' | 'tag' | 'label' | 'value' | 'link' | 'centeredLabel'
| 'readOnlyChip'
;
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
card: {
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
card: {
@@
-60,6
+60,9
@@
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
'&:hover': {
cursor: 'pointer'
}
'&:hover': {
cursor: 'pointer'
}
+ },
+ readOnlyChip: {
+ marginLeft: theme.spacing.unit
}
});
}
});
@@
-101,6
+104,7
@@
export const CollectionPanel = withStyles(styles)(
action={
<Tooltip title="More options" disableFocusListener>
<IconButton
action={
<Tooltip title="More options" disableFocusListener>
<IconButton
+ data-cy='collection-panel-options-btn'
aria-label="More options"
onClick={this.handleContextMenu}>
<MoreOptionsIcon />
aria-label="More options"
onClick={this.handleContextMenu}>
<MoreOptionsIcon />
@@
-111,7
+115,7
@@
export const CollectionPanel = withStyles(styles)(
<span>
<IllegalNamingWarning name={item.name}/>
{item.name}
<span>
<IllegalNamingWarning name={item.name}/>
{item.name}
- {isWritable || <Chip variant="outlined" icon={<ReadOnlyIcon />} label="Read-only"/>}
+ {isWritable || <Chip variant="outlined" icon={<ReadOnlyIcon />} label="Read-only"
className={classes.readOnlyChip}
/>}
</span>
}
titleTypographyProps={this.titleProps}
</span>
}
titleTypographyProps={this.titleProps}
@@
-142,7
+146,7
@@
export const CollectionPanel = withStyles(styles)(
</CardContent>
</Card>
</CardContent>
</Card>
- <Card className={classes.card}>
+ <Card
data-cy='collection-properties-panel'
className={classes.card}>
<CardHeader title="Properties" />
<CardContent>
<Grid container direction="column">
<CardHeader title="Properties" />
<CardContent>
<Grid container direction="column">
@@
-173,7
+177,7
@@
export const CollectionPanel = withStyles(styles)(
</Grid>
</CardContent>
</Card>
</Grid>
</CardContent>
</Card>
- <div className={classes.card}
data-cy="collection-files-panel"
>
+ <div className={classes.card}>
<CollectionPanelFiles isWritable={isWritable} />
</div>
</>
<CollectionPanelFiles isWritable={isWritable} />
</div>
</>