[ARVADOS-WORKBENCH2] updated: 1.2.0-890-ged5c052
Git user
git at public.curoverse.com
Fri Nov 16 05:49:26 EST 2018
Summary of changes:
src/store/tree-picker/picker-id.tsx | 6 +++++-
.../dialog-copy/dialog-collection-partial-copy.tsx | 3 ++-
src/views-components/dialog-copy/dialog-copy.tsx | 3 ++-
src/views-components/dialog-move/dialog-move-to.tsx | 3 ++-
src/views-components/project-tree-picker/project-tree-picker.tsx | 7 +++----
5 files changed, 14 insertions(+), 8 deletions(-)
via ed5c052b271d357da4b85a10db33edd10d43685d (commit)
via 2636921500b01485584eb43263815957b867122a (commit)
from fcda82dca52aa45926f8e656c45baf892acdc634 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit ed5c052b271d357da4b85a10db33edd10d43685d
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Fri Nov 16 11:49:11 2018 +0100
Delete toggle behaviour from ProjectTreePickerField change handler
Feature #14470
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/views-components/project-tree-picker/project-tree-picker.tsx b/src/views-components/project-tree-picker/project-tree-picker.tsx
index a20fb88..bae5d59 100644
--- a/src/views-components/project-tree-picker/project-tree-picker.tsx
+++ b/src/views-components/project-tree-picker/project-tree-picker.tsx
@@ -103,6 +103,4 @@ export const ProjectTreePickerField = (props: WrappedFieldProps & PickerIdProp)
const handleChange = (props: WrappedFieldProps) =>
(_: any, { id }: TreeItem<ProjectsTreePickerItem>) =>
- props.input.value === id
- ? props.input.onChange('')
- : props.input.onChange(id);
+ props.input.onChange(id);
commit 2636921500b01485584eb43263815957b867122a
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Fri Nov 16 11:46:50 2018 +0100
Extract PickerIdProps interface
Feature #14470
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/store/tree-picker/picker-id.tsx b/src/store/tree-picker/picker-id.tsx
index 5621954..3907ba8 100644
--- a/src/store/tree-picker/picker-id.tsx
+++ b/src/store/tree-picker/picker-id.tsx
@@ -4,9 +4,13 @@
import * as React from 'react';
+export interface PickerIdProp {
+ pickerId: string;
+}
+
export const pickerId =
(id: string) =>
- <P extends { pickerId: string }>(Component: React.ComponentType<P>) =>
+ <P extends PickerIdProp>(Component: React.ComponentType<P>) =>
(props: P) =>
<Component {...props} pickerId={id} />;
\ No newline at end of file
diff --git a/src/views-components/dialog-copy/dialog-collection-partial-copy.tsx b/src/views-components/dialog-copy/dialog-collection-partial-copy.tsx
index a56ecca..095c2b9 100644
--- a/src/views-components/dialog-copy/dialog-collection-partial-copy.tsx
+++ b/src/views-components/dialog-copy/dialog-collection-partial-copy.tsx
@@ -9,10 +9,11 @@ import { CollectionNameField, CollectionDescriptionField, CollectionProjectPicke
import { WithDialogProps } from '~/store/dialog/with-dialog';
import { InjectedFormProps } from 'redux-form';
import { CollectionPartialCopyFormData } from '~/store/collections/collection-partial-copy-actions';
+import { PickerIdProp } from "~/store/tree-picker/picker-id";
type DialogCollectionPartialCopyProps = WithDialogProps<string> & InjectedFormProps<CollectionPartialCopyFormData>;
-export const DialogCollectionPartialCopy = (props: DialogCollectionPartialCopyProps & { pickerId: string }) =>
+export const DialogCollectionPartialCopy = (props: DialogCollectionPartialCopyProps & PickerIdProp) =>
<FormDialog
dialogTitle='Create a collection'
formFields={CollectionPartialCopyFields(props.pickerId)}
diff --git a/src/views-components/dialog-copy/dialog-copy.tsx b/src/views-components/dialog-copy/dialog-copy.tsx
index 24e91da..de8a321 100644
--- a/src/views-components/dialog-copy/dialog-copy.tsx
+++ b/src/views-components/dialog-copy/dialog-copy.tsx
@@ -11,10 +11,11 @@ import { ProjectTreePickerField } from '~/views-components/project-tree-picker/p
import { COPY_NAME_VALIDATION, COPY_FILE_VALIDATION } from '~/validators/validators';
import { TextField } from "~/components/text-field/text-field";
import { CopyFormDialogData } from '~/store/copy-dialog/copy-dialog';
+import { PickerIdProp } from '~/store/tree-picker/picker-id';
type CopyFormDialogProps = WithDialogProps<string> & InjectedFormProps<CopyFormDialogData>;
-export const DialogCopy = (props: CopyFormDialogProps & { pickerId: string }) =>
+export const DialogCopy = (props: CopyFormDialogProps & PickerIdProp) =>
<FormDialog
dialogTitle='Make a copy'
formFields={CopyDialogFields(props.pickerId)}
diff --git a/src/views-components/dialog-move/dialog-move-to.tsx b/src/views-components/dialog-move/dialog-move-to.tsx
index 129c59f..c962522 100644
--- a/src/views-components/dialog-move/dialog-move-to.tsx
+++ b/src/views-components/dialog-move/dialog-move-to.tsx
@@ -10,8 +10,9 @@ import { FormDialog } from '~/components/form-dialog/form-dialog';
import { ProjectTreePickerField } from '~/views-components/project-tree-picker/project-tree-picker';
import { MOVE_TO_VALIDATION } from '~/validators/validators';
import { MoveToFormDialogData } from '~/store/move-to-dialog/move-to-dialog';
+import { PickerIdProp } from "~/store/tree-picker/picker-id";
-export const DialogMoveTo = (props: WithDialogProps<string> & InjectedFormProps<MoveToFormDialogData> & { pickerId: string }) =>
+export const DialogMoveTo = (props: WithDialogProps<string> & InjectedFormProps<MoveToFormDialogData> & PickerIdProp) =>
<FormDialog
dialogTitle='Move to'
formFields={MoveToDialogFields(props.pickerId)}
diff --git a/src/views-components/project-tree-picker/project-tree-picker.tsx b/src/views-components/project-tree-picker/project-tree-picker.tsx
index 101fca0..a20fb88 100644
--- a/src/views-components/project-tree-picker/project-tree-picker.tsx
+++ b/src/views-components/project-tree-picker/project-tree-picker.tsx
@@ -18,6 +18,7 @@ import { WrappedFieldProps } from 'redux-form';
import { TreePickerId } from '~/models/tree';
import { ProjectsTreePicker } from '~/views-components/projects-tree-picker/projects-tree-picker';
import { ProjectsTreePickerItem } from '~/views-components/projects-tree-picker/generic-projects-tree-picker';
+import { PickerIdProp } from '~/store/tree-picker/picker-id';
type ProjectTreePickerProps = Pick<TreePickerProps<ProjectResource>, 'onContextMenu' | 'toggleItemActive' | 'toggleItemOpen' | 'toggleItemSelection'>;
@@ -89,7 +90,7 @@ const renderTreeItem = (item: TreeItem<ProjectResource>) =>
isActive={item.active}
hasMargin={true} />;
-export const ProjectTreePickerField = (props: WrappedFieldProps & { pickerId: string }) =>
+export const ProjectTreePickerField = (props: WrappedFieldProps & PickerIdProp) =>
<div style={{ height: '200px', display: 'flex', flexDirection: 'column' }}>
<ProjectsTreePicker
pickerId={props.pickerId}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list