From: Janicki Artur Date: Tue, 6 Nov 2018 13:48:16 +0000 (+0100) Subject: fix height for columns - change style for buttons, sort options for items in menu X-Git-Tag: 1.3.0~35^2~2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/2fe0b9581f05dc2f74ad1d2fea169e40df29eb9e fix height for columns - change style for buttons, sort options for items in menu Feature #14315_fix_columns_height_and_sort_more_options_for_items Arvados-DCO-1.1-Signed-off-by: Janicki Artur --- diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx index e808351b..fcb10aff 100644 --- a/src/components/data-explorer/data-explorer.tsx +++ b/src/components/data-explorer/data-explorer.tsx @@ -12,7 +12,7 @@ import { DataTableFilterItem } from '../data-table-filters/data-table-filters'; import { SearchInput } from '../search-input/search-input'; import { ArvadosTheme } from "~/common/custom-theme"; -type CssRules = 'searchBox' | "toolbar" | "footer" | "root"; +type CssRules = 'searchBox' | "toolbar" | "footer" | "root" | 'moreOptionsButton'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ searchBox: { @@ -26,6 +26,9 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, root: { height: '100%' + }, + moreOptionsButton: { + padding: 0 } }); @@ -121,9 +124,9 @@ export const DataExplorer = withStyles(styles)( } renderContextMenuTrigger = (item: T) => - + - this.props.onContextMenu(event, item)}> + this.props.onContextMenu(event, item)}> diff --git a/src/views-components/context-menu/action-sets/collection-action-set.ts b/src/views-components/context-menu/action-sets/collection-action-set.ts index 07e15024..a33f78d1 100644 --- a/src/views-components/context-menu/action-sets/collection-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-action-set.ts @@ -31,11 +31,6 @@ export const collectionActionSet: ContextMenuActionSet = [[ dispatch(openSharingDialog(uuid)); } }, - { - icon: MoveToIcon, - name: "Move to", - execute: (dispatch, resource) => dispatch(openMoveCollectionDialog(resource)) - }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { @@ -50,6 +45,11 @@ export const collectionActionSet: ContextMenuActionSet = [[ dispatch(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)); } }, + { + icon: MoveToIcon, + name: "Move to", + execute: (dispatch, resource) => dispatch(openMoveCollectionDialog(resource)) + }, { icon: CopyIcon, name: "Copy to project", @@ -65,25 +65,25 @@ export const collectionActionSet: ContextMenuActionSet = [[ dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); } }, - { - icon: ProvenanceGraphIcon, - name: "Provenance graph", - execute: (dispatch, resource) => { - // add code - } - }, + // { + // icon: ProvenanceGraphIcon, + // name: "Provenance graph", + // execute: (dispatch, resource) => { + // // add code + // } + // }, { icon: AdvancedIcon, name: "Advanced", execute: (dispatch, resource) => { dispatch(openAdvancedTabDialog(resource.uuid)); } - }, - { - icon: RemoveIcon, - name: "Remove", - execute: (dispatch, resource) => { - // add code - } } + // { + // icon: RemoveIcon, + // name: "Remove", + // execute: (dispatch, resource) => { + // // add code + // } + // } ]]; diff --git a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts index 30ef4e79..1e2ac04c 100644 --- a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts +++ b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts @@ -30,13 +30,6 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[ dispatch(openSharingDialog(uuid)); } }, - { - icon: MoveToIcon, - name: "Move to", - execute: (dispatch, resource) => { - dispatch(openMoveCollectionDialog(resource)); - } - }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { @@ -51,6 +44,13 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[ dispatch(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!)); } }, + { + icon: MoveToIcon, + name: "Move to", + execute: (dispatch, resource) => { + dispatch(openMoveCollectionDialog(resource)); + } + }, { icon: CopyIcon, name: "Copy to project", @@ -64,12 +64,12 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[ execute: dispatch => { dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); } - }, - { - icon: RemoveIcon, - name: "Remove", - execute: (dispatch, resource) => { - // add code - } } + // { + // icon: RemoveIcon, + // name: "Remove", + // execute: (dispatch, resource) => { + // // add code + // } + // } ]]; diff --git a/src/views-components/context-menu/action-sets/process-action-set.ts b/src/views-components/context-menu/action-sets/process-action-set.ts index 4ad68597..f1b21bf4 100644 --- a/src/views-components/context-menu/action-sets/process-action-set.ts +++ b/src/views-components/context-menu/action-sets/process-action-set.ts @@ -34,13 +34,6 @@ export const processActionSet: ContextMenuActionSet = [[ dispatch(openSharingDialog(uuid)); } }, - { - icon: MoveToIcon, - name: "Move to", - execute: (dispatch, resource) => { - dispatch(openMoveProcessDialog(resource)); - } - }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { @@ -49,6 +42,13 @@ export const processActionSet: ContextMenuActionSet = [[ }); } }, + { + icon: MoveToIcon, + name: "Move to", + execute: (dispatch, resource) => { + dispatch(openMoveProcessDialog(resource)); + } + }, { icon: CopyIcon, name: "Copy to project", @@ -84,13 +84,6 @@ export const processActionSet: ContextMenuActionSet = [[ dispatch(openProcessCommandDialog(resource.uuid)); } }, - { - icon: DetailsIcon, - name: "View details", - execute: dispatch => { - dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); - } - }, { icon: LogIcon, name: "Log", @@ -99,24 +92,31 @@ export const processActionSet: ContextMenuActionSet = [[ } }, { - icon: ProvenanceGraphIcon, - name: "Provenance graph", - execute: (dispatch, resource) => { - // add code + icon: DetailsIcon, + name: "View details", + execute: dispatch => { + dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); } }, + // { + // icon: ProvenanceGraphIcon, + // name: "Provenance graph", + // execute: (dispatch, resource) => { + // // add code + // } + // }, { icon: AdvancedIcon, name: "Advanced", execute: (dispatch, resource) => { dispatch(openAdvancedTabDialog(resource.uuid)); } - }, - { - icon: RemoveIcon, - name: "Remove", - execute: (dispatch, resource) => { - // add code - } } + // { + // icon: RemoveIcon, + // name: "Remove", + // execute: (dispatch, resource) => { + // // add code + // } + // } ]]; diff --git a/src/views-components/context-menu/action-sets/process-resource-action-set.ts b/src/views-components/context-menu/action-sets/process-resource-action-set.ts index cf8aba59..4a0a83b9 100644 --- a/src/views-components/context-menu/action-sets/process-resource-action-set.ts +++ b/src/views-components/context-menu/action-sets/process-resource-action-set.ts @@ -28,13 +28,6 @@ export const processResourceActionSet: ContextMenuActionSet = [[ dispatch(openSharingDialog(uuid)); } }, - { - icon: MoveToIcon, - name: "Move to", - execute: (dispatch, resource) => { - dispatch(openMoveProcessDialog(resource)); - } - }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { @@ -43,6 +36,13 @@ export const processResourceActionSet: ContextMenuActionSet = [[ }); } }, + { + icon: MoveToIcon, + name: "Move to", + execute: (dispatch, resource) => { + dispatch(openMoveProcessDialog(resource)); + } + }, { icon: CopyIcon, name: "Copy to project", @@ -56,12 +56,12 @@ export const processResourceActionSet: ContextMenuActionSet = [[ execute: dispatch => { dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL()); } - }, - { - icon: RemoveIcon, - name: "Remove", - execute: (dispatch, resource) => { - // add code - } } + // { + // icon: RemoveIcon, + // name: "Remove", + // execute: (dispatch, resource) => { + // // add code + // } + // } ]]; diff --git a/src/views/trash-panel/trash-panel.tsx b/src/views/trash-panel/trash-panel.tsx index 4d5df5cd..a0cf3e4f 100644 --- a/src/views/trash-panel/trash-panel.tsx +++ b/src/views/trash-panel/trash-panel.tsx @@ -64,7 +64,7 @@ export const ResourceRestore = return { resource, dispatch: props.dispatch }; })((props: { resource?: TrashableResource, dispatch?: Dispatch }) => - { + { if (props.resource && props.dispatch) { props.dispatch(toggleTrashed( props.resource.kind, @@ -72,8 +72,8 @@ export const ResourceRestore = props.resource.ownerUuid, props.resource.isTrashed )); - } - }}> + }}} + >