From: Peter Amstutz Date: Fri, 9 Dec 2022 04:31:10 +0000 (-0500) Subject: 19783: All done X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/be5e418e1bb0ff54401b71c2cf6865222d182c18 19783: All done Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts index dd56b42870..f6015fbfa0 100644 --- a/src/store/side-panel-tree/side-panel-tree-actions.ts +++ b/src/store/side-panel-tree/side-panel-tree-actions.ts @@ -20,7 +20,7 @@ import { CategoriesListReducer } from 'common/plugintypes'; import { pluginConfig } from 'plugins'; export enum SidePanelTreeCategory { - PROJECTS = 'Projects', + PROJECTS = 'Home Projects', SHARED_WITH_ME = 'Shared with me', PUBLIC_FAVORITES = 'Public Favorites', FAVORITES = 'My Favorites', diff --git a/src/store/tree-picker/tree-picker-actions.ts b/src/store/tree-picker/tree-picker-actions.ts index e6c4e09b72..cabc9f7211 100644 --- a/src/store/tree-picker/tree-picker-actions.ts +++ b/src/store/tree-picker/tree-picker-actions.ts @@ -233,7 +233,7 @@ export const initUserProject = (pickerId: string) => dispatch(receiveTreePickerData({ id: '', pickerId, - data: [{ uuid, name: 'Projects' }], + data: [{ uuid, name: 'Home Projects' }], extractNodeData: value => ({ id: value.uuid, status: TreeNodeStatus.INITIAL, diff --git a/src/views-components/projects-tree-picker/projects-tree-picker.tsx b/src/views-components/projects-tree-picker/projects-tree-picker.tsx index 13f43e8122..de7362d93c 100644 --- a/src/views-components/projects-tree-picker/projects-tree-picker.tsx +++ b/src/views-components/projects-tree-picker/projects-tree-picker.tsx @@ -42,11 +42,14 @@ interface ProjectsTreePickerActionProps { onCollectionFilter: (value: string) => void; } -const mapStateToProps = (state: RootState, props: ToplevelPickerProps): ProjectsTreePickerSearchProps => ({ - projectSearch: state.treePickerSearch.projectSearchValues[props.pickerId], - collectionFilter: state.treePickerSearch.collectionFilterValues[props.pickerId], - ...props -}); +const mapStateToProps = (state: RootState, props: ToplevelPickerProps): ProjectsTreePickerSearchProps => { + const { search } = getProjectsTreePickerIds(props.pickerId); + return { + ...props, + projectSearch: state.treePickerSearch.projectSearchValues[search], + collectionFilter: state.treePickerSearch.collectionFilterValues[search], + }; +}; const mapDispatchToProps = (dispatch: Dispatch, props: ToplevelPickerProps): (ProjectsTreePickerActionProps & DispatchProp) => { const { home, shared, favorites, publicFavorites, search } = getProjectsTreePickerIds(props.pickerId); @@ -74,17 +77,21 @@ const mapDispatchToProps = (dispatch: Dispatch, props: ToplevelPickerProps): (Pr } }; -type CssRules = 'pickerHeight' | 'searchFlex'; +type CssRules = 'pickerHeight' | 'searchFlex' | 'scrolledBox'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ pickerHeight: { - height: "80vh" + height: "70vh" }, searchFlex: { display: "flex", justifyContent: "space-around", paddingBottom: "1em" }, + scrolledBox: { + height: "100%", + overflow: "scroll" + } }); type ProjectsTreePickerCombinedProps = ToplevelPickerProps & ProjectsTreePickerSearchProps & ProjectsTreePickerActionProps & DispatchProp & WithStyles; @@ -128,34 +135,39 @@ export const ProjectsTreePicker = connect(mapStateToProps, mapDispatchToProps)( includeFiles: this.props.includeFiles, showSelection: this.props.showSelection, options: this.props.options, + toggleItemActive: this.props.toggleItemActive, + toggleItemSelection: this.props.toggleItemSelection, relatedTreePickers, disableActivation, }; return
- - + + {this.props.includeCollections && + } - {this.props.projectSearch !== "" ? -
- -
- : - <> -
- -
-
- -
-
- -
-
- +
+ {this.props.projectSearch ? +
+
- } + : + <> +
+ +
+
+ +
+
+ +
+
+ +
+ } +
; } }));