From: Lucas Di Pentima Date: Wed, 20 Oct 2021 19:24:39 +0000 (-0300) Subject: 18128: Improves collection's view different panels layout. X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/fa64be63023b0b06ba616db56c6cef8d62e8a5c1?hp=892d0e98eeb20624cf49ca408af6156b4d3b0f55 18128: Improves collection's view different panels layout. There's additional work to be done here, specially with the file browser that doesn't seem to behave correctly when trying to make it occupy all the available vertical space. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/src/components/collection-panel-files/collection-panel-files.tsx b/src/components/collection-panel-files/collection-panel-files.tsx index a7001a61ac..e33b7df0dc 100644 --- a/src/components/collection-panel-files/collection-panel-files.tsx +++ b/src/components/collection-panel-files/collection-panel-files.tsx @@ -48,7 +48,6 @@ const styles: StyleRulesCallback = (theme: Theme) => ({ wrapper: { display: 'flex', minHeight: '600px', - marginBottom: '1rem', color: 'rgba(0, 0, 0, 0.87)', fontSize: '0.875rem', fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif', @@ -490,7 +489,7 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState data-parent-path={name} className={classNames(classes.row, getActiveClass(name))} key={id}> - {getItemIcon(type, getActiveClass(name))} + {getItemIcon(type, getActiveClass(name))}
{name}
diff --git a/src/views/collection-panel/collection-panel.tsx b/src/views/collection-panel/collection-panel.tsx index bcf72edc34..17fe099229 100644 --- a/src/views/collection-panel/collection-panel.tsx +++ b/src/views/collection-panel/collection-panel.tsx @@ -4,15 +4,20 @@ import React from 'react'; import { - StyleRulesCallback, WithStyles, withStyles, - IconButton, Grid, Tooltip, Typography, ExpansionPanel, - ExpansionPanelSummary, ExpansionPanelDetails + StyleRulesCallback, + WithStyles, + withStyles, + IconButton, + Grid, + Tooltip, + Typography, + Card, CardHeader, CardContent, } from '@material-ui/core'; import { connect, DispatchProp } from "react-redux"; import { RouteComponentProps } from 'react-router'; import { ArvadosTheme } from 'common/custom-theme'; import { RootState } from 'store/store'; -import { MoreOptionsIcon, CollectionIcon, ReadOnlyIcon, ExpandIcon, CollectionOldVersionIcon } from 'components/icon/icon'; +import { MoreOptionsIcon, CollectionIcon, ReadOnlyIcon, CollectionOldVersionIcon } from 'components/icon/icon'; import { DetailsAttribute } from 'components/details-attribute/details-attribute'; import { CollectionResource, getCollectionUrl } from 'models/collection'; import { CollectionPanelFiles } from 'views-components/collection-panel-files/collection-panel-files'; @@ -37,6 +42,8 @@ import { MPVContainer, MPVPanelContent, MPVPanelState } from 'components/multi-p type CssRules = 'root' | 'button' + | 'infoCard' + | 'propertiesCard' | 'filesCard' | 'iconHeader' | 'tag' @@ -55,9 +62,16 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ button: { cursor: 'pointer' }, + infoCard: { + paddingLeft: theme.spacing.unit * 2, + paddingRight: theme.spacing.unit * 2, + paddingBottom: theme.spacing.unit * 2, + }, + propertiesCard: { + padding: 0, + }, filesCard: { - marginBottom: theme.spacing.unit * 2, - flex: 1, + padding: 0, }, iconHeader: { fontSize: '1.875rem', @@ -139,8 +153,8 @@ export const CollectionPanel = withStyles(styles)( ]; return item ? - - }> + + @@ -169,8 +183,6 @@ export const CollectionPanel = withStyles(styles)( - - @@ -189,15 +201,12 @@ export const CollectionPanel = withStyles(styles)( } - - - - - }> - {"Properties"} - - - + + + + + + {isWritable && } @@ -222,19 +231,21 @@ export const CollectionPanel = withStyles(styles)( :
No properties set on this collection.
}
- - -
- - { - dispatch(collectionPanelActions.LOAD_BIG_COLLECTIONS(true)); - dispatch(loadCollectionFiles(this.props.item.uuid)); - } - } /> + + + + + + { + dispatch(collectionPanelActions.LOAD_BIG_COLLECTIONS(true)); + dispatch(loadCollectionFiles(this.props.item.uuid)); + } + } /> +
: null;