From: Lucas Di Pentima Date: Tue, 20 Oct 2020 14:39:35 +0000 (-0300) Subject: 16719: Enhances collection panel. X-Git-Tag: 2.1.1~7^2~7 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/8df7e312b38b8e01bfac8c719b0f883cf866c2c8 16719: Enhances collection panel. * 'More options' menu renamed to 'Actions' and moved to the top. * 'This is an old version' warning moved to the bottom. * Condensed layout makes the main panel to take less vertical space. * Added attributes: version, created_at, modified_at. * Reworded some attribute labels on past versions. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/src/components/details-attribute/details-attribute.tsx b/src/components/details-attribute/details-attribute.tsx index 8f470858..18d0d8b7 100644 --- a/src/components/details-attribute/details-attribute.tsx +++ b/src/components/details-attribute/details-attribute.tsx @@ -21,8 +21,7 @@ type CssRules = 'attribute' | 'label' | 'value' | 'lowercaseValue' | 'link' | 'c const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ attribute: { display: 'flex', - alignItems: 'flex-start', - marginBottom: theme.spacing.unit + alignItems: 'flex-start' }, label: { boxSizing: 'border-box', diff --git a/src/views/collection-panel/collection-panel.tsx b/src/views/collection-panel/collection-panel.tsx index a21d70ed..6e0b8609 100644 --- a/src/views/collection-panel/collection-panel.tsx +++ b/src/views/collection-panel/collection-panel.tsx @@ -21,7 +21,7 @@ import { deleteCollectionTag, navigateToProcess, collectionPanelActions } from ' import { getResource } from '~/store/resources/resources'; import { openContextMenu } from '~/store/context-menu/context-menu-actions'; import { ContextMenuKind } from '~/views-components/context-menu/context-menu'; -import { formatFileSize } from "~/common/formatters"; +import { formatDate, formatFileSize } from "~/common/formatters"; import { openDetailsPanel } from '~/store/details-panel/details-panel-action'; import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions'; import { getPropertyChip } from '~/views-components/resource-properties-form/property-chip'; @@ -70,8 +70,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ textAlign: 'center' }, warningLabel: { - fontStyle: 'italic', - fontWeight: 'bold' + fontStyle: 'italic' }, collectionName: { flexDirection: 'column', @@ -132,45 +131,56 @@ export const CollectionPanel = withStyles(styles)( ?
}> - - - { isOldVersion - ? - : } - - - - {item.name} - {isWritable || - - + + + + { isOldVersion + ? + : } + + + + {item.name} + {isWritable || + + + + } + + + + + + + - } - {isOldVersion && - - This is an old version. Copy it as a new one if you need to make changes. Go to the current version if you need to share it. - - } - - + + - + {item.description} {isOldVersion && } + + + } - - - - - - - + {isOldVersion && + + This is an old version. Copy it as a new one if you need to make changes. Go to the current version if you need to share it. + + } @@ -260,6 +265,8 @@ export const CollectionPanel = withStyles(styles)( : ContextMenuKind.COLLECTION : ContextMenuKind.READONLY_COLLECTION }; + // Avoid expanding/collapsing the panel + event.stopPropagation(); this.props.dispatch(openContextMenu(event, resource)); }