From 0c34482b9f513152d9210a2c6322ea7c0583c2ad Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Tue, 11 May 2021 21:11:18 -0700 Subject: [PATCH 01/37] fix(helm): Improve compatiblity with EKS 1.19 Simplify storage setup to re-use existing volumes. --- helm/README.md | 5 ++ helm/manual-old-indexer | 36 ++++++++++ helm/openneuro/Chart.yaml | 2 +- helm/openneuro/templates/api-deployment.yaml | 2 +- .../dataset-worker-stateful-set.yaml | 4 +- helm/openneuro/templates/ingress.yaml | 65 ++++++++++++------ .../templates/openebs-pool-statefulset.yaml | 68 ------------------- .../templates/openebs-pool-storageclass.yaml | 15 ---- .../openebs-volume-storageclass.yaml | 2 +- 9 files changed, 93 insertions(+), 106 deletions(-) create mode 100644 helm/manual-old-indexer delete mode 100644 helm/openneuro/templates/openebs-pool-statefulset.yaml delete mode 100644 helm/openneuro/templates/openebs-pool-storageclass.yaml diff --git a/helm/README.md b/helm/README.md index aa0a7553a4..6fec62a654 100644 --- a/helm/README.md +++ b/helm/README.md @@ -122,6 +122,11 @@ Other values which can be overriden are found in the chart version of [values.ya Installing a chart deploys it to a cluster. This creates an initial release by generating the configuration templates and applying them to the cluster. +```bash +# Add an ssh key for GitHub remotes +kubectl create secret generic openneuro-my-dev-ssh-key --from-file=datalad-key=datalad-key +``` + ```bash # Make sure you're in the helm directory and run helm install -f values.yaml -f secrets.yaml openneuro-my-dev openneuro/ diff --git a/helm/manual-old-indexer b/helm/manual-old-indexer new file mode 100644 index 0000000000..0e5efd177b --- /dev/null +++ b/helm/manual-old-indexer @@ -0,0 +1,36 @@ +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + cronjob.kubernetes.io/instantiate: manual + name: openneuro-prod-indexer-manual-1 + namespace: default +spec: + backoffLimit: 6 + completions: 1 + parallelism: 1 + template: + spec: + containers: + - envFrom: + - configMapRef: + name: openneuro-prod-configmap + - secretRef: + name: openneuro-prod-secret + image: openneuro/indexer:v3.31.1 + imagePullPolicy: IfNotPresent + name: openneuro-indexer + resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 100m + memory: 256Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + restartPolicy: OnFailure + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 diff --git a/helm/openneuro/Chart.yaml b/helm/openneuro/Chart.yaml index 11ed391551..93b2e2c8eb 100644 --- a/helm/openneuro/Chart.yaml +++ b/helm/openneuro/Chart.yaml @@ -5,7 +5,7 @@ description: OpenNeuro production deployment chart home: https://openneuro.org sources: - https://github.com/openNeuroOrg/openneuro -appVersion: 3.32.4 +appVersion: 3.33.0 dependencies: - name: redis version: 10.6.17 diff --git a/helm/openneuro/templates/api-deployment.yaml b/helm/openneuro/templates/api-deployment.yaml index 6342494249..5ad69619c3 100644 --- a/helm/openneuro/templates/api-deployment.yaml +++ b/helm/openneuro/templates/api-deployment.yaml @@ -28,7 +28,7 @@ spec: cpu: "1.2" memory: "2Gi" requests: - cpu: ".5" + cpu: ".3" memory: "768Mi" ports: - containerPort: 8111 diff --git a/helm/openneuro/templates/dataset-worker-stateful-set.yaml b/helm/openneuro/templates/dataset-worker-stateful-set.yaml index 8e898f127a..e2166302e4 100644 --- a/helm/openneuro/templates/dataset-worker-stateful-set.yaml +++ b/helm/openneuro/templates/dataset-worker-stateful-set.yaml @@ -30,6 +30,8 @@ spec: - key: "storage" operator: "Exists" effect: "NoSchedule" + nodeSelector: + role: storage volumes: - name: ssh-key secret: @@ -47,7 +49,7 @@ spec: cpu: "2" memory: "8Gi" requests: - cpu: "0.5" + cpu: "0.3" memory: "1Gi" ports: - containerPort: 80 diff --git a/helm/openneuro/templates/ingress.yaml b/helm/openneuro/templates/ingress.yaml index c0bc3cfa65..a19cc21f32 100644 --- a/helm/openneuro/templates/ingress.yaml +++ b/helm/openneuro/templates/ingress.yaml @@ -1,4 +1,4 @@ -apiVersion: extensions/v1beta1 +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ .Release.Name }} @@ -18,47 +18,74 @@ spec: http: paths: - path: /* + pathType: ImplementationSpecific backend: - serviceName: www-redirect - servicePort: use-annotation + service: + name: www-redirect + port: + name: use-annotation - host: {{ .Values.hostname }} http: paths: - path: /* + pathType: ImplementationSpecific backend: - serviceName: ssl-redirect - servicePort: use-annotation + service: + name: ssl-redirect + port: + name: use-annotation - path: /graphql-subscriptions + pathType: ImplementationSpecific backend: - serviceName: {{ .Release.Name }}-api - servicePort: 8111 + service: + name: {{ .Release.Name }}-api + port: + number: 8111 - path: /crn/* + pathType: ImplementationSpecific backend: - serviceName: {{ .Release.Name }}-api - servicePort: 8111 + service: + name: {{ .Release.Name }}-api + port: + number: 8111 - path: /sitemap.xml + pathType: ImplementationSpecific backend: - serviceName: {{ .Release.Name }}-api - servicePort: 8111 + service: + name: {{ .Release.Name }}-api + port: + number: 8111 {{- $relname := .Release.Name -}} {{- range until ( .Values.dataladWorkers | int ) }} - path: /uploads/{{ . }}/* + pathType: ImplementationSpecific backend: - serviceName: {{ $relname }}-dataset-worker-{{ . }} - servicePort: 80 + service: + name: {{ $relname }}-dataset-worker-{{ . }} + port: + number: 80 {{- end }} {{- $relname := .Release.Name -}} {{- range until ( .Values.dataladWorkers | int ) }} - path: /git/{{ . }}/* + pathType: ImplementationSpecific backend: - serviceName: {{ $relname }}-dataset-worker-{{ . }} - servicePort: 80 + service: + name: {{ $relname }}-dataset-worker-{{ . }} + port: + number: 80 {{- end }} - path: /intake/* + pathType: ImplementationSpecific backend: - serviceName: {{ .Release.Name }}-apm-server - servicePort: 8200 + service: + name: {{ .Release.Name }}-apm-server + port: + number: 8200 - path: /* + pathType: ImplementationSpecific backend: - serviceName: {{ .Release.Name }}-web - servicePort: 80 \ No newline at end of file + service: + name: {{ .Release.Name }}-web + port: + number: 80 \ No newline at end of file diff --git a/helm/openneuro/templates/openebs-pool-statefulset.yaml b/helm/openneuro/templates/openebs-pool-statefulset.yaml deleted file mode 100644 index 2c17e73a74..0000000000 --- a/helm/openneuro/templates/openebs-pool-statefulset.yaml +++ /dev/null @@ -1,68 +0,0 @@ -{{- $relname := .Release.Name -}} -{{- $stripesize := int .Values.storagePools.stripeSize }} -{{- range .Values.storagePools.pools }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ $relname }}-storage-pool-{{ .name }} -spec: - replicas: {{ add (div (int .size) $stripesize) 1 }} - selector: - matchLabels: - app: {{ $relname }}-storage-pool-{{ .name }} - serviceName: {{ $relname }}-storage-pool-{{ .name }} - template: - metadata: - labels: - app: {{ $relname }}-storage-pool-{{ .name }} - spec: - tolerations: - - key: "storage" - operator: "Exists" - effect: "NoSchedule" - nodeSelector: - alpha.eksctl.io/nodegroup-name: storage - affinity: - podAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: "app" - operator: In - values: - - {{ $relname }}-storage-pool-{{ .name }} - topologyKey: "kubernetes.io/hostname" - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: "app" - operator: NotIn - values: - - {{ $relname }}-storage-pool-{{ .name }} - topologyKey: "kubernetes.io/hostname" - containers: - - name: init-storage-pool - image: alpine - command: - - /bin/sh - args: - - "-c" - - "sleep infinity" - volumeDevices: - - name: storage-pool - devicePath: /dev/pool - volumeClaimTemplates: - - metadata: - name: storage-pool - spec: - accessModes: ["ReadWriteOnce"] - storageClassName: "openebs-pool-block" - volumeMode: Block - resources: - requests: - storage: {{ $stripesize }} ---- -{{- end }} diff --git a/helm/openneuro/templates/openebs-pool-storageclass.yaml b/helm/openneuro/templates/openebs-pool-storageclass.yaml deleted file mode 100644 index 2470273896..0000000000 --- a/helm/openneuro/templates/openebs-pool-storageclass.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: openebs-pool-block -parameters: - type: gp2 -reclaimPolicy: Retain -allowVolumeExpansion: true -provisioner: kubernetes.io/aws-ebs -volumeBindingMode: WaitForFirstConsumer -allowedTopologies: - - matchLabelExpressions: - - key: alpha.eksctl.io/nodegroup-name - values: - - storage diff --git a/helm/openneuro/templates/openebs-volume-storageclass.yaml b/helm/openneuro/templates/openebs-volume-storageclass.yaml index 6cb6f45039..2c69f208c2 100644 --- a/helm/openneuro/templates/openebs-volume-storageclass.yaml +++ b/helm/openneuro/templates/openebs-volume-storageclass.yaml @@ -12,6 +12,6 @@ allowVolumeExpansion: true provisioner: zfs.csi.openebs.io allowedTopologies: - matchLabelExpressions: - - key: alpha.eksctl.io/nodegroup-name + - key: role values: - storage From 403ed7cf51f7654a716b464ce3c5eb1b770c6625 Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Tue, 18 May 2021 15:39:19 -0700 Subject: [PATCH 02/37] fix(helm): Correct zfs-localpv volume balancing --- helm/openneuro/templates/openebs-volume-storageclass.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm/openneuro/templates/openebs-volume-storageclass.yaml b/helm/openneuro/templates/openebs-volume-storageclass.yaml index 2c69f208c2..415d4b5d50 100644 --- a/helm/openneuro/templates/openebs-volume-storageclass.yaml +++ b/helm/openneuro/templates/openebs-volume-storageclass.yaml @@ -3,11 +3,13 @@ kind: StorageClass metadata: name: {{ .Release.Name }}-datasets parameters: + scheduler: "VolumeWeighted" fstype: 'zfs' poolname: 'zfspv-pool' compression: 'lz4' recordsize: '16k' reclaimPolicy: Retain +volumeBindingMode: WaitForFirstConsumer allowVolumeExpansion: true provisioner: zfs.csi.openebs.io allowedTopologies: From 33dcddab8453e0ddcb41930e5d8b251acab9f31e Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Tue, 25 May 2021 13:44:13 -0700 Subject: [PATCH 03/37] updates to landing header and facet refactor --- .../src/accordion/AccordionTab.tsx | 7 +- .../src/accordion/accordion.scss | 11 +++ .../src/count-toggle/CountToggle.tsx | 76 +++++++++++++++ .../src/facets/Facet.stories.tsx | 43 ++++++--- .../src/facets/FacetListWrap.tsx | 94 +++++++++++-------- .../src/facets/facet.scss | 2 + .../src/header/LandingExpandedHeader.tsx | 23 ++++- .../src/header/header.scss | 37 ++++++++ .../src/select/Select.stories.tsx | 8 ++ .../src/select/select.scss | 3 +- 10 files changed, 249 insertions(+), 55 deletions(-) create mode 100644 packages/openneuro-components/src/count-toggle/CountToggle.tsx diff --git a/packages/openneuro-components/src/accordion/AccordionTab.tsx b/packages/openneuro-components/src/accordion/AccordionTab.tsx index 0f1cdcef5d..91b51be82e 100644 --- a/packages/openneuro-components/src/accordion/AccordionTab.tsx +++ b/packages/openneuro-components/src/accordion/AccordionTab.tsx @@ -11,6 +11,7 @@ export interface AccordionTabProps { label: string plainStyle: boolean startOpen: boolean + dropdown: boolean accordionStyle: 'plain' | 'file-tree' | 'bids-wrappper' } @@ -24,6 +25,7 @@ export const AccordionTab: React.FC = ({ className, accordionStyle, startOpen, + dropdown, }) => { const [isOpen, setOpen] = React.useState(startOpen) const fileTreeIcon = accordionStyle == 'file-tree' && ( @@ -41,7 +43,10 @@ export const AccordionTab: React.FC = ({ onClick={() => setOpen(!isOpen)}> {fileTreeIcon} {label} -
+
{children}
diff --git a/packages/openneuro-components/src/accordion/accordion.scss b/packages/openneuro-components/src/accordion/accordion.scss index 58cca28e97..b304678872 100644 --- a/packages/openneuro-components/src/accordion/accordion.scss +++ b/packages/openneuro-components/src/accordion/accordion.scss @@ -1,6 +1,8 @@ /* Accordion styles */ .on-accordion-wrapper { + background-color: #fff; + position: relative; .accordion-item { overflow: hidden; transition: max-height 0.3s cubic-bezier(1, 0, 1, 0); @@ -12,6 +14,15 @@ max-height: 0; transition: max-height 0.35s cubic-bezier(0, 1, 0, 1); } + .accordion-item.dropdown-style { + position: absolute; + background-color: #fff; + left: 0; + right: 0; + .accordion-content { + padding: 10px; + } + } .accordion-title { cursor: pointer; diff --git a/packages/openneuro-components/src/count-toggle/CountToggle.tsx b/packages/openneuro-components/src/count-toggle/CountToggle.tsx new file mode 100644 index 0000000000..34c336f562 --- /dev/null +++ b/packages/openneuro-components/src/count-toggle/CountToggle.tsx @@ -0,0 +1,76 @@ +import React from 'react' +import './count-toggle.scss' +import { Tooltip } from '../tooltip/Tooltip' +import { Button } from '../button/Button' +import { Modal } from '../modal/Modal' +import { UserModalInner } from '../modal/UserModalInner' + +export interface CountToggleProps { + label?: string + icon?: string + disabled?: boolean + tooltip?: string + onClick?: () => void + lock?: boolean + displayOptions: boolean + setDisplayOptions: (boolean) => void + count: number +} +export const CountToggle = ({ + label, + icon, + disabled, + tooltip, + onClick, + displayOptions, + setDisplayOptions, + count, +}: CountToggleProps) => { + const toggleClick = () => { + onClick() + setDisplayOptions(!displayOptions) + } + const [isOpen, setIsOpen] = React.useState(false) + const toggleLoginModal = () => setIsOpen(!isOpen) + const toggleButton = ( + + + + ) + const disabledToggleButton = ( + + + + ) + + return ( + <> +
+ {tooltip ? ( + + {disabled ? disabledToggleButton : toggleButton} + + ) : disabled ? ( + disabledToggleButton + ) : ( + toggleButton + )} +
+ + + + + ) +} diff --git a/packages/openneuro-components/src/facets/Facet.stories.tsx b/packages/openneuro-components/src/facets/Facet.stories.tsx index 64d32e5956..85a4bf24be 100644 --- a/packages/openneuro-components/src/facets/Facet.stories.tsx +++ b/packages/openneuro-components/src/facets/Facet.stories.tsx @@ -11,23 +11,26 @@ export default { component: FacetListWrap, } as Meta -const FacetListWrapTemplate: Story = ({ items }) => { +const FacetListWrapTemplate: Story = ({ + items, + startOpen, + label, + accordionStyle, + dropdown, +}) => { const [selected, setSelected] = React.useState() return ( -
- - - - - +
+
) } @@ -74,4 +77,16 @@ const modalities = [ export const FacetExample = FacetListWrapTemplate.bind({}) FacetExample.args = { items: modalities, + accordionStyle: 'plain', + label: 'Modalities', + startOpen: true, +} + +export const FrontFacetExample = FacetListWrapTemplate.bind({}) +FrontFacetExample.args = { + items: modalities, + accordionStyle: 'plain', + label: 'Browse by Modalities', + startOpen: false, + dropdown: true, } diff --git a/packages/openneuro-components/src/facets/FacetListWrap.tsx b/packages/openneuro-components/src/facets/FacetListWrap.tsx index 03b19d7c9f..d446916852 100644 --- a/packages/openneuro-components/src/facets/FacetListWrap.tsx +++ b/packages/openneuro-components/src/facets/FacetListWrap.tsx @@ -1,4 +1,6 @@ import React from 'react' +import { AccordionTab } from '../accordion/AccordionTab' +import { AccordionWrap } from '../accordion/AccordionWrap' import './facet.scss' export interface FacetListWrapProps { @@ -10,6 +12,10 @@ export interface FacetListWrapProps { children }, ] + accordionStyle: string + startOpen: boolean + label: string + dropdown: boolean selected: { label: string value: string @@ -23,49 +29,61 @@ export const FacetListWrap = ({ items, selected, setSelected, + startOpen, + label, + accordionStyle, + dropdown, }: FacetListWrapProps) => { const setSetter = (e, item) => { e.stopPropagation() // Stop this click event to trigger click on parent onClick() setSelected(item) } return ( -
-
    - {items.map((item, index) => ( -
  • setSetter(e, item)} - className={ - selected && selected.value == item.value - ? 'selected-facet facet' - : 'facet' - }> - - {item.label} - {item.count && ({item.count})} - - {item.children && ( -
      - {item.children.map((item, index) => ( -
    • setSetter(e, item)} - className={ - selected && selected.value == item.value - ? 'selected-facet facet' - : 'facet' - }> - - {item.label} - {item.count && ({item.count})} - -
    • - ))} -
    - )} -
  • - ))} -
-
+ + +
+
    + {items.map((item, index) => ( +
  • setSetter(e, item)} + className={ + selected && selected.value == item.value + ? 'selected-facet facet' + : 'facet' + }> + + {item.label} + {item.count && ({item.count})} + + {item.children && ( +
      + {item.children.map((item, index) => ( +
    • setSetter(e, item)} + className={ + selected && selected.value == item.value + ? 'selected-facet facet' + : 'facet' + }> + + {item.label} + {item.count && ({item.count})} + +
    • + ))} +
    + )} +
  • + ))} +
+
+
+
) } diff --git a/packages/openneuro-components/src/facets/facet.scss b/packages/openneuro-components/src/facets/facet.scss index 188171a6bd..e00dc63dc4 100644 --- a/packages/openneuro-components/src/facets/facet.scss +++ b/packages/openneuro-components/src/facets/facet.scss @@ -37,6 +37,7 @@ .facet-accordion.on-accordion-wrapper { padding: 0 15px; border-bottom: 1px solid #aaa; + .accordion-title { font-size: 14px; font-weight: 400; @@ -49,6 +50,7 @@ color: #000; } } + .facet-list { ul { margin: 0; diff --git a/packages/openneuro-components/src/header/LandingExpandedHeader.tsx b/packages/openneuro-components/src/header/LandingExpandedHeader.tsx index 4008346330..93da6de19b 100644 --- a/packages/openneuro-components/src/header/LandingExpandedHeader.tsx +++ b/packages/openneuro-components/src/header/LandingExpandedHeader.tsx @@ -1,12 +1,14 @@ -import React, { useEffect, useRef } from 'react' +import React from 'react' import { Button } from '../button/Button' import { ModalityCube } from '../modality-cube/ModalityCube' +import { Input } from '../input/Input' import { cubeData } from '../mock-content/modality-cube-content.jsx' import orcidIcon from '../assets/orcid_24x24.png' import { AggregateCount } from '../aggregate-count/AggregateCount' import { frontPage } from '../mock-content/front-page-content.jsx' +import { FrontFacetExample } from '../facets/Facet.stories' export interface LandingExpandedHeaderProps { user?: {} @@ -45,6 +47,25 @@ export const LandingExpandedHeader: React.FC = ({
+
+ +
+ Or +
+
+ +
+ +
+
+
+ {!user ? (
diff --git a/packages/openneuro-components/src/header/header.scss b/packages/openneuro-components/src/header/header.scss index 35e54948e8..57a5c433c0 100644 --- a/packages/openneuro-components/src/header/header.scss +++ b/packages/openneuro-components/src/header/header.scss @@ -186,3 +186,40 @@ header { } } } + +.header-input-wrap { + width: 90%; + margin: 20px 0; + display: flex; + justify-content: space-between; + .header-input { + flex-grow: 1; + input { + width: 100%; + padding: 16px; + } + } + .header-input-button { + width: 55px; + margin-left: 15px; + button.on-button--primary { + background-color: $on-light-aqua; + max-width: 100%; + padding: 17px; + } + } +} + +.header-or-text { + color: #fff; + font-size: 18px; + font-weight: 600; +} + +.header-modality-wrap { + width: 90%; + margin: 60px 0 20px; + .facet-accordion.on-accordion-wrapper .accordion-title { + padding: 15px 0; + } +} diff --git a/packages/openneuro-components/src/select/Select.stories.tsx b/packages/openneuro-components/src/select/Select.stories.tsx index 1a448626dc..8b24203bf3 100644 --- a/packages/openneuro-components/src/select/Select.stories.tsx +++ b/packages/openneuro-components/src/select/Select.stories.tsx @@ -16,6 +16,14 @@ const SelectContent = [ { label: 'Option-4', value: 'option4' }, ] +const SelectFrontContent = [ + { label: '--Select a modality--', value: '' }, + { label: 'Option-1', value: 'option1' }, + { label: 'Option-2', value: 'option2' }, + { label: 'Option-3', value: 'option3' }, + { label: 'Option-4', value: 'option4' }, +] + const SelectTemplate: Story = ({ options, id, diff --git a/packages/openneuro-components/src/select/select.scss b/packages/openneuro-components/src/select/select.scss index e03f3f9ff3..3e739128ca 100644 --- a/packages/openneuro-components/src/select/select.scss +++ b/packages/openneuro-components/src/select/select.scss @@ -8,9 +8,10 @@ } select { padding: 20px; + background-color: #fff; background: linear-gradient(45deg, transparent 50%, #333 50%), linear-gradient(135deg, #333 50%, transparent 50%), - linear-gradient(to right, transparent, transparent); + linear-gradient(to right, #fff, #fff); background-position: calc(100% - 21px) calc(1em + 2px), calc(100% - 16px) calc(1em + 2px), 100% 0; background-size: 5px 5px, 5px 5px, 2.5em 2.5em; From 61f0d57b2c472cbf117703bdbee6e0d945cf37d7 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Tue, 25 May 2021 13:46:04 -0700 Subject: [PATCH 04/37] pixel adjustment for hex bg --- .../openneuro-components/src/modality-cube/modality-cube.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openneuro-components/src/modality-cube/modality-cube.scss b/packages/openneuro-components/src/modality-cube/modality-cube.scss index a8b65960a5..eb2c4c0b46 100644 --- a/packages/openneuro-components/src/modality-cube/modality-cube.scss +++ b/packages/openneuro-components/src/modality-cube/modality-cube.scss @@ -9,7 +9,7 @@ position: absolute; width: 180px; height: 103.92px; - margin: -8px 0 0; + margin: -7px 0 0; background-size: auto 207.8461px; background-position: center; } From db72edb43c8f6fa20007e770ecf128e72e6be516 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Tue, 25 May 2021 14:19:53 -0700 Subject: [PATCH 05/37] front hero cube adjustments --- .../src/modality-cube/modality-cube.scss | 71 ++++++++++--------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/packages/openneuro-components/src/modality-cube/modality-cube.scss b/packages/openneuro-components/src/modality-cube/modality-cube.scss index eb2c4c0b46..7c0f35bae3 100644 --- a/packages/openneuro-components/src/modality-cube/modality-cube.scss +++ b/packages/openneuro-components/src/modality-cube/modality-cube.scss @@ -1,31 +1,31 @@ .modality-cube-wrap { // perspective: 2000px; // perspective-origin: 50% 50%; - margin-top: 60px; - width: 183px; - height: 160px; + margin-top: 40px; + width: 153px; + height: 130px; position: relative; .hexagon { position: absolute; - width: 180px; - height: 103.92px; + width: 170px; + height: 98.15px; margin: -7px 0 0; - background-size: auto 207.8461px; - background-position: center; + background-size: auto 197.2991px; + background-position: center 53%; } .hexTop, .hexBottom { position: absolute; z-index: 1; - width: 127.28px; - height: 127.28px; + width: 120.21px; + height: 120.21px; overflow: hidden; -webkit-transform: scaleY(0.5774) rotate(-45deg); -ms-transform: scaleY(0.5774) rotate(-45deg); transform: scaleY(0.5774) rotate(-45deg); background: inherit; - left: 26.36px; + left: 24.9px; } /*counter transform the bg image on the caps*/ @@ -33,8 +33,8 @@ .hexBottom:after { content: ''; position: absolute; - width: 180px; - height: 103.92304845413264px; + width: 170px; + height: 98.14954576223639px; -webkit-transform: rotate(45deg) scaleY(1.7321) translateY(-51.9615px); -ms-transform: rotate(45deg) scaleY(1.7321) translateY(-51.9615px); transform: rotate(45deg) scaleY(1.7321) translateY(-51.9615px); @@ -45,7 +45,7 @@ } .hexTop { - top: -63.6396px; + top: -60.1041px; } .hexTop:after { @@ -53,7 +53,7 @@ } .hexBottom { - bottom: -63.6396px; + bottom: -60.1041px; } .hexBottom:after { @@ -65,8 +65,8 @@ position: absolute; top: 0px; left: 0; - width: 180px; - height: 103.923px; + width: 170px; + height: 98.1495px; z-index: 2; background: inherit; } @@ -89,7 +89,7 @@ transition: transform 0.4s, opacity 0.4s; transition-delay: 0s; transform: translateY(45px); - + margin-top: -20px; opacity: 0; font-weight: 600; font-size: 19px; @@ -109,8 +109,8 @@ .modality-cube { margin: 0; position: relative; - height: 123px; - width: 122px; + height: 115px; + width: 115px; transform-style: preserve-3d; transform: scale3d(1.05, 1.04, 1.04) rotateX(-36deg) rotateY(-45deg) rotateZ(0deg) translate3d(0px, 0px, 0px) skew(0deg, 0deg); @@ -125,7 +125,7 @@ color: #000; font-weight: bold; &.front { - transform: translateZ(23px); + transform: translateZ(22px); display: flex; flex-direction: column; justify-content: center; @@ -137,12 +137,12 @@ } } &.top { - transform: rotateX(-270deg) translateY(-100px); + transform: rotateX(-270deg) translateY(-93px); transform-origin: top center; background-color: rgba(0, 0, 0, 0.4); } &.right { - transform: rotateY(-270deg) translateX(100px); + transform: rotateY(-270deg) translateX(94px); transform-origin: top right; background-color: rgba(0, 0, 0, 0.2); } @@ -176,44 +176,45 @@ justify-content: space-between; .cube-block { + width: 170px; height: 240px; position: relative; &:nth-child(3n + 2) { - margin: 0 50px; + margin: 0 30px; } &:first-child { - left: -55px; + left: -5px; top: 30px; position: relative; } &:nth-child(2) { - left: -25px; + left: -5px; top: -5px; } &:nth-child(3) { top: 60px; - left: -15px; + left: 5px; } &:nth-child(4) { - left: 40px; - top: -5px; + left: 80px; + top: -25px; } &:nth-child(5) { - left: 30px; - top: -5px; + left: 55px; + top: -35px; } &:nth-child(6) { - left: 25px; + left: 5px; top: 80px; } &:nth-child(7) { - left: 0px; - top: -15px; + left: 160px; + top: -85px; } &:last-child { - left: 75px; - top: 0; + left: 155px; + top: -30px; margin-right: auto; } @media (max-width: 1400px) { From 3777f10f26eee90158e1d3663d6a37db0b2170b3 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Tue, 25 May 2021 14:50:41 -0700 Subject: [PATCH 06/37] speed up modal exit/hide --- packages/openneuro-components/src/modal/modal.scss | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/openneuro-components/src/modal/modal.scss b/packages/openneuro-components/src/modal/modal.scss index 6c87662f2e..b566fe0336 100644 --- a/packages/openneuro-components/src/modal/modal.scss +++ b/packages/openneuro-components/src/modal/modal.scss @@ -9,14 +9,13 @@ display: flex; justify-content: center; align-items: flex-start; - transition: opacity 0.5s; + transition: opacity 0.3s; z-index: 9000; .modal { background-color: #fff; min-width: 500px; max-width: 90%; transition: transform 0.3s; - transition-delay: 0.2s; } .modal-close-x { @@ -41,8 +40,8 @@ &.hide-modal { opacity: 0; - transition-delay: 0.6s; - animation: hideModal 1.6s 1; + transition-delay: 0.3s; + animation: hideModal 0.6s 1; animation-fill-mode: forwards; .modal { transform: translateY(-100vh); From 28c6c65991033c3fa878bb809a0db667e0d59f01 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Tue, 25 May 2021 14:53:14 -0700 Subject: [PATCH 07/37] speed up modal exit/hide --- packages/openneuro-components/src/modal/modal.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/openneuro-components/src/modal/modal.scss b/packages/openneuro-components/src/modal/modal.scss index b566fe0336..3b565ddd39 100644 --- a/packages/openneuro-components/src/modal/modal.scss +++ b/packages/openneuro-components/src/modal/modal.scss @@ -40,8 +40,8 @@ &.hide-modal { opacity: 0; - transition-delay: 0.3s; - animation: hideModal 0.6s 1; + transition-delay: 0; + animation: hideModal 0.4s 1; animation-fill-mode: forwards; .modal { transform: translateY(-100vh); From a5cb1ef9ed6a7f6cd307782c16baa133560cd623 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Wed, 26 May 2021 12:56:21 -0700 Subject: [PATCH 08/37] adding some placeholder search itmes --- .../src/search-page/SearchPage.tsx | 14 ++++++++++++-- .../src/search-page/search-page.scss | 9 +++++++++ .../src/search-page/search-sort.scss | 1 + 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/packages/openneuro-components/src/search-page/SearchPage.tsx b/packages/openneuro-components/src/search-page/SearchPage.tsx index ae3d5d1290..ebec2a33c3 100644 --- a/packages/openneuro-components/src/search-page/SearchPage.tsx +++ b/packages/openneuro-components/src/search-page/SearchPage.tsx @@ -1,6 +1,9 @@ import React from 'react' import { ModalityHeader } from './ModalityHeader' import { CommunitySwoop } from './CommunitySwoop' + +import { FacetExample } from '../facets/Facet.stories' +import { SortBy } from './SearchSort.stories' import './search-page.scss' export interface SearchPageProps { @@ -41,8 +44,15 @@ export const SearchPage = ({ portalContent }: SearchPageProps) => {
-
facets Todo
-
results todo
+
+ +
+
+
+ +
+ results todo +
diff --git a/packages/openneuro-components/src/search-page/search-page.scss b/packages/openneuro-components/src/search-page/search-page.scss index 9ce1e30b55..48ff682d6f 100644 --- a/packages/openneuro-components/src/search-page/search-page.scss +++ b/packages/openneuro-components/src/search-page/search-page.scss @@ -172,3 +172,12 @@ } } } + +.search { + padding: 50px 0; +} + +.search-sort { + display: flex; + justify-content: flex-end; +} diff --git a/packages/openneuro-components/src/search-page/search-sort.scss b/packages/openneuro-components/src/search-page/search-sort.scss index da23b4e91e..3446033f1b 100644 --- a/packages/openneuro-components/src/search-page/search-sort.scss +++ b/packages/openneuro-components/src/search-page/search-sort.scss @@ -31,6 +31,7 @@ border-radius: 6px; max-width: 400px; min-width: 150px; + background-color: #fff; li { cursor: pointer; From d32399e3dcb74119f33da06e4eba09e21cf29f14 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Wed, 26 May 2021 14:15:18 -0700 Subject: [PATCH 09/37] update to modal timing --- packages/openneuro-components/src/modal/modal.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openneuro-components/src/modal/modal.scss b/packages/openneuro-components/src/modal/modal.scss index 370f174c6d..82094669d1 100644 --- a/packages/openneuro-components/src/modal/modal.scss +++ b/packages/openneuro-components/src/modal/modal.scss @@ -42,7 +42,7 @@ &.hide-modal { opacity: 0; transition-delay: 0.2s; - animation: hideModal 0.6s 1; + animation: hideModal 0.4s 1; animation-fill-mode: forwards; .modal { transform: translateY(-100vh); From 0597e3a5ddff6beec889b9a056d01f83965e8160 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Wed, 26 May 2021 16:06:58 -0700 Subject: [PATCH 10/37] update to search and merge master --- .../src/accordion/AccordionTab.tsx | 7 +- .../src/accordion/accordion.scss | 11 +++ .../src/count-toggle/CountToggle.tsx | 76 +++++++++++++++ .../src/facets/Facet.stories.tsx | 43 ++++++--- .../src/facets/FacetListWrap.tsx | 94 +++++++++++-------- .../src/facets/facet.scss | 2 + .../src/header/LandingExpandedHeader.tsx | 23 ++++- .../src/header/header.scss | 37 ++++++++ .../src/select/Select.stories.tsx | 8 ++ .../src/select/select.scss | 3 +- 10 files changed, 249 insertions(+), 55 deletions(-) create mode 100644 packages/openneuro-components/src/count-toggle/CountToggle.tsx diff --git a/packages/openneuro-components/src/accordion/AccordionTab.tsx b/packages/openneuro-components/src/accordion/AccordionTab.tsx index 0f1cdcef5d..91b51be82e 100644 --- a/packages/openneuro-components/src/accordion/AccordionTab.tsx +++ b/packages/openneuro-components/src/accordion/AccordionTab.tsx @@ -11,6 +11,7 @@ export interface AccordionTabProps { label: string plainStyle: boolean startOpen: boolean + dropdown: boolean accordionStyle: 'plain' | 'file-tree' | 'bids-wrappper' } @@ -24,6 +25,7 @@ export const AccordionTab: React.FC = ({ className, accordionStyle, startOpen, + dropdown, }) => { const [isOpen, setOpen] = React.useState(startOpen) const fileTreeIcon = accordionStyle == 'file-tree' && ( @@ -41,7 +43,10 @@ export const AccordionTab: React.FC = ({ onClick={() => setOpen(!isOpen)}> {fileTreeIcon} {label}
-
+
{children}
diff --git a/packages/openneuro-components/src/accordion/accordion.scss b/packages/openneuro-components/src/accordion/accordion.scss index 58cca28e97..b304678872 100644 --- a/packages/openneuro-components/src/accordion/accordion.scss +++ b/packages/openneuro-components/src/accordion/accordion.scss @@ -1,6 +1,8 @@ /* Accordion styles */ .on-accordion-wrapper { + background-color: #fff; + position: relative; .accordion-item { overflow: hidden; transition: max-height 0.3s cubic-bezier(1, 0, 1, 0); @@ -12,6 +14,15 @@ max-height: 0; transition: max-height 0.35s cubic-bezier(0, 1, 0, 1); } + .accordion-item.dropdown-style { + position: absolute; + background-color: #fff; + left: 0; + right: 0; + .accordion-content { + padding: 10px; + } + } .accordion-title { cursor: pointer; diff --git a/packages/openneuro-components/src/count-toggle/CountToggle.tsx b/packages/openneuro-components/src/count-toggle/CountToggle.tsx new file mode 100644 index 0000000000..34c336f562 --- /dev/null +++ b/packages/openneuro-components/src/count-toggle/CountToggle.tsx @@ -0,0 +1,76 @@ +import React from 'react' +import './count-toggle.scss' +import { Tooltip } from '../tooltip/Tooltip' +import { Button } from '../button/Button' +import { Modal } from '../modal/Modal' +import { UserModalInner } from '../modal/UserModalInner' + +export interface CountToggleProps { + label?: string + icon?: string + disabled?: boolean + tooltip?: string + onClick?: () => void + lock?: boolean + displayOptions: boolean + setDisplayOptions: (boolean) => void + count: number +} +export const CountToggle = ({ + label, + icon, + disabled, + tooltip, + onClick, + displayOptions, + setDisplayOptions, + count, +}: CountToggleProps) => { + const toggleClick = () => { + onClick() + setDisplayOptions(!displayOptions) + } + const [isOpen, setIsOpen] = React.useState(false) + const toggleLoginModal = () => setIsOpen(!isOpen) + const toggleButton = ( + + + + ) + const disabledToggleButton = ( + + + + ) + + return ( + <> +
+ {tooltip ? ( + + {disabled ? disabledToggleButton : toggleButton} + + ) : disabled ? ( + disabledToggleButton + ) : ( + toggleButton + )} +
+ + + + + ) +} diff --git a/packages/openneuro-components/src/facets/Facet.stories.tsx b/packages/openneuro-components/src/facets/Facet.stories.tsx index 64d32e5956..85a4bf24be 100644 --- a/packages/openneuro-components/src/facets/Facet.stories.tsx +++ b/packages/openneuro-components/src/facets/Facet.stories.tsx @@ -11,23 +11,26 @@ export default { component: FacetListWrap, } as Meta -const FacetListWrapTemplate: Story = ({ items }) => { +const FacetListWrapTemplate: Story = ({ + items, + startOpen, + label, + accordionStyle, + dropdown, +}) => { const [selected, setSelected] = React.useState() return ( -
- - - - - +
+
) } @@ -74,4 +77,16 @@ const modalities = [ export const FacetExample = FacetListWrapTemplate.bind({}) FacetExample.args = { items: modalities, + accordionStyle: 'plain', + label: 'Modalities', + startOpen: true, +} + +export const FrontFacetExample = FacetListWrapTemplate.bind({}) +FrontFacetExample.args = { + items: modalities, + accordionStyle: 'plain', + label: 'Browse by Modalities', + startOpen: false, + dropdown: true, } diff --git a/packages/openneuro-components/src/facets/FacetListWrap.tsx b/packages/openneuro-components/src/facets/FacetListWrap.tsx index 03b19d7c9f..d446916852 100644 --- a/packages/openneuro-components/src/facets/FacetListWrap.tsx +++ b/packages/openneuro-components/src/facets/FacetListWrap.tsx @@ -1,4 +1,6 @@ import React from 'react' +import { AccordionTab } from '../accordion/AccordionTab' +import { AccordionWrap } from '../accordion/AccordionWrap' import './facet.scss' export interface FacetListWrapProps { @@ -10,6 +12,10 @@ export interface FacetListWrapProps { children }, ] + accordionStyle: string + startOpen: boolean + label: string + dropdown: boolean selected: { label: string value: string @@ -23,49 +29,61 @@ export const FacetListWrap = ({ items, selected, setSelected, + startOpen, + label, + accordionStyle, + dropdown, }: FacetListWrapProps) => { const setSetter = (e, item) => { e.stopPropagation() // Stop this click event to trigger click on parent onClick() setSelected(item) } return ( -
-
    - {items.map((item, index) => ( -
  • setSetter(e, item)} - className={ - selected && selected.value == item.value - ? 'selected-facet facet' - : 'facet' - }> - - {item.label} - {item.count && ({item.count})} - - {item.children && ( -
      - {item.children.map((item, index) => ( -
    • setSetter(e, item)} - className={ - selected && selected.value == item.value - ? 'selected-facet facet' - : 'facet' - }> - - {item.label} - {item.count && ({item.count})} - -
    • - ))} -
    - )} -
  • - ))} -
-
+ + +
+
    + {items.map((item, index) => ( +
  • setSetter(e, item)} + className={ + selected && selected.value == item.value + ? 'selected-facet facet' + : 'facet' + }> + + {item.label} + {item.count && ({item.count})} + + {item.children && ( +
      + {item.children.map((item, index) => ( +
    • setSetter(e, item)} + className={ + selected && selected.value == item.value + ? 'selected-facet facet' + : 'facet' + }> + + {item.label} + {item.count && ({item.count})} + +
    • + ))} +
    + )} +
  • + ))} +
+
+
+
) } diff --git a/packages/openneuro-components/src/facets/facet.scss b/packages/openneuro-components/src/facets/facet.scss index 188171a6bd..e00dc63dc4 100644 --- a/packages/openneuro-components/src/facets/facet.scss +++ b/packages/openneuro-components/src/facets/facet.scss @@ -37,6 +37,7 @@ .facet-accordion.on-accordion-wrapper { padding: 0 15px; border-bottom: 1px solid #aaa; + .accordion-title { font-size: 14px; font-weight: 400; @@ -49,6 +50,7 @@ color: #000; } } + .facet-list { ul { margin: 0; diff --git a/packages/openneuro-components/src/header/LandingExpandedHeader.tsx b/packages/openneuro-components/src/header/LandingExpandedHeader.tsx index 4008346330..93da6de19b 100644 --- a/packages/openneuro-components/src/header/LandingExpandedHeader.tsx +++ b/packages/openneuro-components/src/header/LandingExpandedHeader.tsx @@ -1,12 +1,14 @@ -import React, { useEffect, useRef } from 'react' +import React from 'react' import { Button } from '../button/Button' import { ModalityCube } from '../modality-cube/ModalityCube' +import { Input } from '../input/Input' import { cubeData } from '../mock-content/modality-cube-content.jsx' import orcidIcon from '../assets/orcid_24x24.png' import { AggregateCount } from '../aggregate-count/AggregateCount' import { frontPage } from '../mock-content/front-page-content.jsx' +import { FrontFacetExample } from '../facets/Facet.stories' export interface LandingExpandedHeaderProps { user?: {} @@ -45,6 +47,25 @@ export const LandingExpandedHeader: React.FC = ({
+
+ +
+ Or +
+
+ +
+ +
+
+
+ {!user ? (
diff --git a/packages/openneuro-components/src/header/header.scss b/packages/openneuro-components/src/header/header.scss index 35e54948e8..57a5c433c0 100644 --- a/packages/openneuro-components/src/header/header.scss +++ b/packages/openneuro-components/src/header/header.scss @@ -186,3 +186,40 @@ header { } } } + +.header-input-wrap { + width: 90%; + margin: 20px 0; + display: flex; + justify-content: space-between; + .header-input { + flex-grow: 1; + input { + width: 100%; + padding: 16px; + } + } + .header-input-button { + width: 55px; + margin-left: 15px; + button.on-button--primary { + background-color: $on-light-aqua; + max-width: 100%; + padding: 17px; + } + } +} + +.header-or-text { + color: #fff; + font-size: 18px; + font-weight: 600; +} + +.header-modality-wrap { + width: 90%; + margin: 60px 0 20px; + .facet-accordion.on-accordion-wrapper .accordion-title { + padding: 15px 0; + } +} diff --git a/packages/openneuro-components/src/select/Select.stories.tsx b/packages/openneuro-components/src/select/Select.stories.tsx index 1a448626dc..8b24203bf3 100644 --- a/packages/openneuro-components/src/select/Select.stories.tsx +++ b/packages/openneuro-components/src/select/Select.stories.tsx @@ -16,6 +16,14 @@ const SelectContent = [ { label: 'Option-4', value: 'option4' }, ] +const SelectFrontContent = [ + { label: '--Select a modality--', value: '' }, + { label: 'Option-1', value: 'option1' }, + { label: 'Option-2', value: 'option2' }, + { label: 'Option-3', value: 'option3' }, + { label: 'Option-4', value: 'option4' }, +] + const SelectTemplate: Story = ({ options, id, diff --git a/packages/openneuro-components/src/select/select.scss b/packages/openneuro-components/src/select/select.scss index e03f3f9ff3..3e739128ca 100644 --- a/packages/openneuro-components/src/select/select.scss +++ b/packages/openneuro-components/src/select/select.scss @@ -8,9 +8,10 @@ } select { padding: 20px; + background-color: #fff; background: linear-gradient(45deg, transparent 50%, #333 50%), linear-gradient(135deg, #333 50%, transparent 50%), - linear-gradient(to right, transparent, transparent); + linear-gradient(to right, #fff, #fff); background-position: calc(100% - 21px) calc(1em + 2px), calc(100% - 16px) calc(1em + 2px), 100% 0; background-size: 5px 5px, 5px 5px, 2.5em 2.5em; From 433fe93c3aa9cb26ca4bb4ec17b5321622c7fd93 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Wed, 26 May 2021 16:28:44 -0700 Subject: [PATCH 11/37] refactor to landing page header --- .../src/count-toggle/CountToggle.tsx | 8 +++----- .../src/facets/FacetListWrap.tsx | 8 ++++---- packages/openneuro-components/src/facets/facet.scss | 13 +++++++++++++ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/openneuro-components/src/count-toggle/CountToggle.tsx b/packages/openneuro-components/src/count-toggle/CountToggle.tsx index 0f4449493a..a00a357434 100644 --- a/packages/openneuro-components/src/count-toggle/CountToggle.tsx +++ b/packages/openneuro-components/src/count-toggle/CountToggle.tsx @@ -54,18 +54,16 @@ export const CountToggle = ({ ) - + const button = disabled ? disabledToggleButton : toggleButton return ( <>
{tooltip ? ( - {disabled ? disabledToggleButton : toggleButton} + {button} - ) : disabled ? ( - disabledToggleButton ) : ( - toggleButton + button )}
diff --git a/packages/openneuro-components/src/facets/FacetListWrap.tsx b/packages/openneuro-components/src/facets/FacetListWrap.tsx index 755f056cac..110edf94b9 100644 --- a/packages/openneuro-components/src/facets/FacetListWrap.tsx +++ b/packages/openneuro-components/src/facets/FacetListWrap.tsx @@ -34,8 +34,8 @@ export const FacetListWrap = ({ accordionStyle, dropdown, }: FacetListWrapProps) => { - const setSetter = (e, item) => { - e.stopPropagation() // Stop this click event to trigger click on parent onClick() + const setSelectorNoPropagation = (e, item) => { + e.stopPropagation() setSelected(item) } return ( @@ -50,7 +50,7 @@ export const FacetListWrap = ({ {items.map((item, index) => (
  • setSetter(e, item)} + onClick={e => setSelectorNoPropagation(e, item)} className={ selected && selected.value == item.value ? 'selected-facet facet' @@ -65,7 +65,7 @@ export const FacetListWrap = ({ {item.children.map((item, index) => (
  • setSetter(e, item)} + onClick={e => setSelectorNoPropagation(e, item)} className={ selected && selected.value == item.value ? 'selected-facet facet' diff --git a/packages/openneuro-components/src/facets/facet.scss b/packages/openneuro-components/src/facets/facet.scss index 71aefd7018..2b078967aa 100644 --- a/packages/openneuro-components/src/facets/facet.scss +++ b/packages/openneuro-components/src/facets/facet.scss @@ -59,4 +59,17 @@ } } } + + .facet-list ul li { + > .label { + font-weight: 500; + } + &.selected-facet > .label { + color: $on-light-aqua; + + span { + color: $on-light-aqua; + } + } + } } From 4a9dfaae6e6eb593ced3d94c85f8ff5a21bc8e31 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Wed, 26 May 2021 16:48:59 -0700 Subject: [PATCH 12/37] update toggleClick --- .../src/count-toggle/CountToggle.stories.tsx | 11 +++++---- .../src/count-toggle/CountToggle.tsx | 23 ++++++++----------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/packages/openneuro-components/src/count-toggle/CountToggle.stories.tsx b/packages/openneuro-components/src/count-toggle/CountToggle.stories.tsx index c1aa27411a..7587538cb2 100644 --- a/packages/openneuro-components/src/count-toggle/CountToggle.stories.tsx +++ b/packages/openneuro-components/src/count-toggle/CountToggle.stories.tsx @@ -13,11 +13,12 @@ const CountToggleTemplate: Story = ({ disabled, tooltip, }) => { - const [displayOptions, setDisplayOptions] = React.useState(false) + const [clicked, showClicked] = React.useState(false) const [count, setCount] = React.useState(1) - const onClick = () => { + const toggleClick = () => { setCount(count === 1 ? 2 : 1) + showClicked(!clicked) } return ( @@ -25,10 +26,10 @@ const CountToggleTemplate: Story = ({ label={label} icon={icon} disabled={disabled} - onClick={onClick} + toggleClick={toggleClick} tooltip={tooltip} - displayOptions={displayOptions} - setDisplayOptions={setDisplayOptions} + clicked={clicked} + showClicked={showClicked} count={count} /> ) diff --git a/packages/openneuro-components/src/count-toggle/CountToggle.tsx b/packages/openneuro-components/src/count-toggle/CountToggle.tsx index a00a357434..ef9ffdc851 100644 --- a/packages/openneuro-components/src/count-toggle/CountToggle.tsx +++ b/packages/openneuro-components/src/count-toggle/CountToggle.tsx @@ -10,10 +10,10 @@ export interface CountToggleProps { icon?: string disabled?: boolean tooltip?: string - onClick?: () => void + toggleClick?: () => void lock?: boolean - displayOptions: boolean - setDisplayOptions: (boolean) => void + clicked: boolean + showClicked: (boolean) => void count: number } export const CountToggle = ({ @@ -21,24 +21,19 @@ export const CountToggle = ({ icon, disabled, tooltip, - onClick, - displayOptions, - setDisplayOptions, + toggleClick, + clicked, count, }: CountToggleProps) => { - const toggleClick = () => { - onClick() - setDisplayOptions(!displayOptions) - } const [isOpen, setIsOpen] = React.useState(false) const toggleLogin = () => setIsOpen(!isOpen) const toggleButton = ( @@ -46,10 +41,10 @@ export const CountToggle = ({ const disabledToggleButton = ( From b83d259f1d1b207647e88aabc15086982a68f4bd Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Thu, 27 May 2021 12:56:56 -0700 Subject: [PATCH 13/37] fix(helm): Production configuration fixes for eks 1.19 update --- helm/openneuro/Chart.yaml | 2 +- helm/openneuro/templates/dataset-worker-stateful-set.yaml | 6 +++--- helm/openneuro/values-production.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/helm/openneuro/Chart.yaml b/helm/openneuro/Chart.yaml index 93b2e2c8eb..e486d362f5 100644 --- a/helm/openneuro/Chart.yaml +++ b/helm/openneuro/Chart.yaml @@ -5,7 +5,7 @@ description: OpenNeuro production deployment chart home: https://openneuro.org sources: - https://github.com/openNeuroOrg/openneuro -appVersion: 3.33.0 +appVersion: 3.33.5 dependencies: - name: redis version: 10.6.17 diff --git a/helm/openneuro/templates/dataset-worker-stateful-set.yaml b/helm/openneuro/templates/dataset-worker-stateful-set.yaml index e2166302e4..dd99018add 100644 --- a/helm/openneuro/templates/dataset-worker-stateful-set.yaml +++ b/helm/openneuro/templates/dataset-worker-stateful-set.yaml @@ -43,11 +43,11 @@ spec: containers: - name: {{ .Release.Name }}-dataset-worker image: 'openneuro/datalad-service:v{{ .Chart.AppVersion }}' - command: ["gunicorn", "--bind", "0.0.0.0:80", "--reload", "datalad_service.app:create_app('/datasets')", "--workers", "8", "--worker-class", "gevent", "--timeout", "60", "--keep-alive", "30"] + command: ["gunicorn", "--bind", "0.0.0.0:80", "--reload", "datalad_service.app:create_app('/datasets')", "--workers", "4", "--worker-class", "gevent", "--timeout", "60", "--keep-alive", "30"] resources: limits: - cpu: "2" - memory: "8Gi" + cpu: "1.6" + memory: "10Gi" requests: cpu: "0.3" memory: "1Gi" diff --git a/helm/openneuro/values-production.yaml b/helm/openneuro/values-production.yaml index ffe2a210d9..04634bfa5c 100644 --- a/helm/openneuro/values-production.yaml +++ b/helm/openneuro/values-production.yaml @@ -59,7 +59,7 @@ efs-provisioner: aws-alb-ingress-controller: awsRegion: us-west-2 autoDiscoverAwsVpcID: true - clusterName: openneuro-prod + clusterName: openneuro-prod-2021 # Disable Redis password for testing redis: From fc68e1de52bb02391bd2ce054814defa642799e9 Mon Sep 17 00:00:00 2001 From: David Nishikawa Date: Thu, 27 May 2021 14:16:47 -0700 Subject: [PATCH 14/37] Add endpoints for enabling/disabling features. --- .pnp.js | 87 +------------------ .../src/handlers/feature-flags.js | 14 +++ yarn.lock | 63 +------------- 3 files changed, 16 insertions(+), 148 deletions(-) create mode 100644 packages/openneuro-server/src/handlers/feature-flags.js diff --git a/.pnp.js b/.pnp.js index fd556db99b..e6969db92f 100755 --- a/.pnp.js +++ b/.pnp.js @@ -117,13 +117,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ], "linkType": "SOFT", }], - ["npm:3.3.19", { - "packageLocation": "./.yarn/cache/@apollo-client-npm-3.3.19-39baf9f99e-a7266cfdff.zip/node_modules/@apollo/client/", - "packageDependencies": [ - ["@apollo/client", "npm:3.3.19"] - ], - "linkType": "SOFT", - }], ["virtual:4112afb9dad10978c159910bf10db9840b981b1333117623c8a4a8cf77481344a0a24735a5506e2920c18e3cfa2cc179489824b6a56c988bb070f4f60da40974#npm:3.3.14", { "packageLocation": "./.yarn/$$virtual/@apollo-client-virtual-01c7b6c19d/0/cache/@apollo-client-npm-3.3.14-1ebea52b4f-a08163a998.zip/node_modules/@apollo/client/", "packageDependencies": [ @@ -293,40 +286,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "subscriptions-transport-ws" ], "linkType": "HARD", - }], - ["virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:3.3.19", { - "packageLocation": "./.yarn/$$virtual/@apollo-client-virtual-c2be05e84b/0/cache/@apollo-client-npm-3.3.19-39baf9f99e-a7266cfdff.zip/node_modules/@apollo/client/", - "packageDependencies": [ - ["@apollo/client", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:3.3.19"], - ["@graphql-typed-document-node/core", "virtual:51e032042460c5acb2fee2f0f33950a409d321b7c2d7932ec5edd2d65c6eef219caf38d6fbd40ae889377bab601157a449b02b052ebb0cf87371875d317dc909#npm:3.1.0"], - ["@types/graphql", null], - ["@types/react", null], - ["@types/subscriptions-transport-ws", null], - ["@types/zen-observable", "npm:0.8.2"], - ["@wry/context", "npm:0.6.0"], - ["@wry/equality", "npm:0.4.0"], - ["fast-json-stable-stringify", "npm:2.1.0"], - ["graphql", null], - ["graphql-tag", "virtual:51e032042460c5acb2fee2f0f33950a409d321b7c2d7932ec5edd2d65c6eef219caf38d6fbd40ae889377bab601157a449b02b052ebb0cf87371875d317dc909#npm:2.12.4"], - ["hoist-non-react-statics", "npm:3.3.2"], - ["optimism", "npm:0.16.1"], - ["prop-types", "npm:15.7.2"], - ["react", "npm:17.0.2"], - ["subscriptions-transport-ws", null], - ["symbol-observable", "npm:2.0.3"], - ["ts-invariant", "npm:0.7.3"], - ["tslib", "npm:1.14.1"], - ["zen-observable", "npm:0.8.15"] - ], - "packagePeers": [ - "@types/graphql", - "@types/react", - "@types/subscriptions-transport-ws", - "graphql", - "react", - "subscriptions-transport-ws" - ], - "linkType": "HARD", }] ]], ["@apollo/protobufjs", [ @@ -9424,7 +9383,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./packages/openneuro-components/", "packageDependencies": [ ["@openneuro/components", "workspace:packages/openneuro-components"], - ["@apollo/client", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:3.3.19"], ["@mdx-js/react", "virtual:0f7d3aee8f4ba1ddd800f44d0aa4455a1e4b9ae1a24c9eda9668f886bc29f684a49cc3e1c10c4481252ea0f7eec58c4be3167e18e5c332f257a51ab3e50e4f7a#npm:1.6.22"], ["@storybook/addon-a11y", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:6.2.9"], ["@storybook/addon-actions", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:6.2.9"], @@ -9443,7 +9401,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/slick-carousel", "npm:1.6.34"], ["css-loader", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.2.4"], ["date-fns", "npm:2.21.3"], - ["graphql-hooks", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.1.1"], ["rc-slider", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:9.7.2"], ["react", "npm:17.0.2"], ["react-router-dom", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.2.0"], @@ -20224,15 +20181,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD", }] ]], - ["dequal", [ - ["npm:2.0.2", { - "packageLocation": "./.yarn/cache/dequal-npm-2.0.2-370927eb6c-3b5b019a87.zip/node_modules/dequal/", - "packageDependencies": [ - ["dequal", "npm:2.0.2"] - ], - "linkType": "HARD", - }] - ]], ["des.js", [ ["npm:1.0.1", { "packageLocation": "./.yarn/cache/des.js-npm-1.0.1-9f155eddb6-74cd0aa0c5.zip/node_modules/des.js/", @@ -25291,7 +25239,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ]], ["git-win", [ ["npm:2.3.0", { - "packageLocation": "./.yarn/cache/git-win-npm-2.3.0-b98f2b7122-a273c79c22.zip/node_modules/git-win/", + "packageLocation": "./.yarn/unplugged/git-win-npm-2.3.0-b98f2b7122/node_modules/git-win/", "packageDependencies": [ ["git-win", "npm:2.3.0"], ["@babel/runtime", "npm:7.14.0"], @@ -25831,30 +25779,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD", }] ]], - ["graphql-hooks", [ - ["npm:5.1.1", { - "packageLocation": "./.yarn/cache/graphql-hooks-npm-5.1.1-b58943726d-4d615236e2.zip/node_modules/graphql-hooks/", - "packageDependencies": [ - ["graphql-hooks", "npm:5.1.1"] - ], - "linkType": "SOFT", - }], - ["virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.1.1", { - "packageLocation": "./.yarn/$$virtual/graphql-hooks-virtual-e19fdcc460/0/cache/graphql-hooks-npm-5.1.1-b58943726d-4d615236e2.zip/node_modules/graphql-hooks/", - "packageDependencies": [ - ["graphql-hooks", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.1.1"], - ["@types/react", null], - ["dequal", "npm:2.0.2"], - ["extract-files", "npm:9.0.0"], - ["react", "npm:17.0.2"] - ], - "packagePeers": [ - "@types/react", - "react" - ], - "linkType": "HARD", - }] - ]], ["graphql-iso-date", [ ["npm:3.6.1", { "packageLocation": "./.yarn/cache/graphql-iso-date-npm-3.6.1-bbab129ea7-d33245ccab.zip/node_modules/graphql-iso-date/", @@ -33869,15 +33793,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@wry/trie", "npm:0.3.0"] ], "linkType": "HARD", - }], - ["npm:0.16.1", { - "packageLocation": "./.yarn/cache/optimism-npm-0.16.1-b6a027d092-760b129552.zip/node_modules/optimism/", - "packageDependencies": [ - ["optimism", "npm:0.16.1"], - ["@wry/context", "npm:0.6.0"], - ["@wry/trie", "npm:0.3.0"] - ], - "linkType": "HARD", }] ]], ["optimize-css-assets-webpack-plugin", [ diff --git a/packages/openneuro-server/src/handlers/feature-flags.js b/packages/openneuro-server/src/handlers/feature-flags.js new file mode 100644 index 0000000000..6293da3eca --- /dev/null +++ b/packages/openneuro-server/src/handlers/feature-flags.js @@ -0,0 +1,14 @@ +const feature = { + REDESIGN_2021: 'redesign_2021', +} + +export const setFlagRedesign2021 = (req, res) => { + res + .cookie(feature.REDESIGN_2021, true) + .send(`You have enabled feature ${feature.REDESIGN_2021}.`) +} + +export const unsetFlagRedesign2021 = (req, res) => { + res.clearCookie(feature.REDESIGN_2021) + res.send(`You have disabled feature ${feature.REDESIGN_2021}.`) +} diff --git a/yarn.lock b/yarn.lock index 155997f077..8e3a71bc05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,36 +35,6 @@ __metadata: languageName: node linkType: hard -"@apollo/client@npm:^3.3.19": - version: 3.3.19 - resolution: "@apollo/client@npm:3.3.19" - dependencies: - "@graphql-typed-document-node/core": ^3.0.0 - "@types/zen-observable": ^0.8.0 - "@wry/context": ^0.6.0 - "@wry/equality": ^0.4.0 - fast-json-stable-stringify: ^2.0.0 - graphql-tag: ^2.12.0 - hoist-non-react-statics: ^3.3.2 - optimism: ^0.16.0 - prop-types: ^15.7.2 - symbol-observable: ^2.0.0 - ts-invariant: ^0.7.0 - tslib: ^1.10.0 - zen-observable: ^0.8.14 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - react: ^16.8.0 || ^17.0.0 - subscriptions-transport-ws: ^0.9.0 - peerDependenciesMeta: - react: - optional: true - subscriptions-transport-ws: - optional: true - checksum: a7266cfdff900ef71adece4d24c853fc6179dfe3d3b89905b468b0a487959a435ef84219fb1266c86e2edb0747ff0e52b6ac49dba72bdac7cdbc55e1d0a2e357 - languageName: node - linkType: hard - "@apollo/protobufjs@npm:1.2.2, @apollo/protobufjs@npm:^1.0.3": version: 1.2.2 resolution: "@apollo/protobufjs@npm:1.2.2" @@ -4880,7 +4850,6 @@ __metadata: version: 0.0.0-use.local resolution: "@openneuro/components@workspace:packages/openneuro-components" dependencies: - "@apollo/client": ^3.3.19 "@mdx-js/react": ^1.6.22 "@storybook/addon-a11y": ^6.2.8 "@storybook/addon-actions": ^6.2.8 @@ -4899,7 +4868,6 @@ __metadata: "@types/slick-carousel": ^1 css-loader: ^5.2.1 date-fns: ^2.21.1 - graphql-hooks: ^5.1.1 rc-slider: ^9.7.2 react: ^17.0.1 react-router-dom: ^5.2.0 @@ -13355,13 +13323,6 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.0": - version: 2.0.2 - resolution: "dequal@npm:2.0.2" - checksum: 3b5b019a873da282a25512c632c077e5e8e2a019e71c5b6968836443b861e44176ee3934facfecdc14994d553c1ff4a6c7232278d6aef87baf65e2413d41760c - languageName: node - linkType: hard - "des.js@npm:^1.0.0": version: 1.0.1 resolution: "des.js@npm:1.0.1" @@ -15644,7 +15605,7 @@ __metadata: languageName: node linkType: hard -"extract-files@npm:9.0.0, extract-files@npm:^9.0.0": +"extract-files@npm:9.0.0": version: 9.0.0 resolution: "extract-files@npm:9.0.0" checksum: 021b10787718a2f81847e58bd5eea3b09d636e8bb3cf281dad2aeeafc439c32f9e7d2353b2b4b30f6a7febf93be9d1edd76706ea56cff6850b3f39e1594e5bb3 @@ -17957,18 +17918,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"graphql-hooks@npm:^5.1.1": - version: 5.1.1 - resolution: "graphql-hooks@npm:5.1.1" - dependencies: - dequal: ^2.0.0 - extract-files: ^9.0.0 - peerDependencies: - react: ^17.0.0 - checksum: 4d615236e206e70d6f334e513243385c10c9524d50542e6ca9eee85c843c0effea7d07fa5ff84b8b15619598c46a93a5cf7d6ec979c95118147473414525e1e9 - languageName: node - linkType: hard - "graphql-iso-date@npm:^3.6.1": version: 3.6.1 resolution: "graphql-iso-date@npm:3.6.1" @@ -25038,16 +24987,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"optimism@npm:^0.16.0": - version: 0.16.1 - resolution: "optimism@npm:0.16.1" - dependencies: - "@wry/context": ^0.6.0 - "@wry/trie": ^0.3.0 - checksum: 760b1295525ba86592edf245736ed704670330a8997d91144c1b45bc9f76e392b53c170fb1eb3b265f67584a4f7e205bc777d0c8ed97774326dba9fbfe899e27 - languageName: node - linkType: hard - "optimize-css-assets-webpack-plugin@npm:^5.0.3": version: 5.0.6 resolution: "optimize-css-assets-webpack-plugin@npm:5.0.6" From 17d9f7a6daed04e5146416274df73b5c53ce1b32 Mon Sep 17 00:00:00 2001 From: David Nishikawa Date: Thu, 27 May 2021 14:17:35 -0700 Subject: [PATCH 15/37] Enable toggle for feature `redesign_2021`. --- .../src/scripts/components/feature-toggle.tsx | 18 +++++++++++++++ packages/openneuro-app/src/scripts/index.jsx | 23 ++++++++++++------- packages/openneuro-server/src/routes.js | 15 ++++++++++++ 3 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 packages/openneuro-app/src/scripts/components/feature-toggle.tsx diff --git a/packages/openneuro-app/src/scripts/components/feature-toggle.tsx b/packages/openneuro-app/src/scripts/components/feature-toggle.tsx new file mode 100644 index 0000000000..1e620add65 --- /dev/null +++ b/packages/openneuro-app/src/scripts/components/feature-toggle.tsx @@ -0,0 +1,18 @@ +import React, { FC, ReactNode } from 'react' +import { useCookies } from 'react-cookie' + +interface FeatureToggleProps { + renderOnEnabled(): ReactNode + renderOnDisabled(): ReactNode +} + +const FeatureToggle: FC = ({ + feature, + renderOnEnabled, + renderOnDisabled, +}) => { + const [cookies] = useCookies() + return cookies[feature] ? renderOnEnabled() : renderOnDisabled() +} + +export default FeatureToggle diff --git a/packages/openneuro-app/src/scripts/index.jsx b/packages/openneuro-app/src/scripts/index.jsx index 331de16ba6..dfee761d8a 100644 --- a/packages/openneuro-app/src/scripts/index.jsx +++ b/packages/openneuro-app/src/scripts/index.jsx @@ -4,17 +4,24 @@ import React from 'react' import Navbar from './nav/navbar.jsx' import Routes from './routes.jsx' import Uploader from './uploader/uploader.jsx' +import FeatureToggle from './components/feature-toggle' const Index = () => { return ( - -
    -
    - - -
    -
    -
    +

    Redesign 2021

    } + renderOnDisabled={() => ( + +
    +
    + + +
    +
    +
    + )} + /> ) } diff --git a/packages/openneuro-server/src/routes.js b/packages/openneuro-server/src/routes.js index 11f0319f6f..c0f3f32fb0 100644 --- a/packages/openneuro-server/src/routes.js +++ b/packages/openneuro-server/src/routes.js @@ -6,6 +6,10 @@ import * as datalad from './handlers/datalad' import * as comments from './handlers/comments' import { clientConfig } from './handlers/config.js' import * as subscriptions from './handlers/subscriptions' +import { + setFlagRedesign2021, + unsetFlagRedesign2021, +} from './handlers/feature-flags' import verifyUser from './libs/authentication/verifyUser.js' import * as google from './libs/authentication/google.js' import * as orcid from './libs/authentication/orcid.js' @@ -156,6 +160,17 @@ const routes = [ url: '/sitemap', handler: sitemapHandler, }, + // feature flag setters and unsetters + { + method: 'get', + url: '/feature-flag/redesign-2021/enable', + handler: setFlagRedesign2021, + }, + { + method: 'get', + url: '/feature-flag/redesign-2021/disable', + handler: unsetFlagRedesign2021, + }, ] // initialize routes ------------------------------- From eb198f9a1e0121427bd814a03556f87e8fa3cd76 Mon Sep 17 00:00:00 2001 From: David Nishikawa Date: Thu, 27 May 2021 14:26:00 -0700 Subject: [PATCH 16/37] Make feature consistent with enable/disable urls. --- packages/openneuro-app/src/scripts/index.jsx | 2 +- packages/openneuro-server/src/handlers/feature-flags.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/openneuro-app/src/scripts/index.jsx b/packages/openneuro-app/src/scripts/index.jsx index dfee761d8a..6c1e2f260a 100644 --- a/packages/openneuro-app/src/scripts/index.jsx +++ b/packages/openneuro-app/src/scripts/index.jsx @@ -9,7 +9,7 @@ import FeatureToggle from './components/feature-toggle' const Index = () => { return (

    Redesign 2021

    } renderOnDisabled={() => ( diff --git a/packages/openneuro-server/src/handlers/feature-flags.js b/packages/openneuro-server/src/handlers/feature-flags.js index 6293da3eca..f0ea87747b 100644 --- a/packages/openneuro-server/src/handlers/feature-flags.js +++ b/packages/openneuro-server/src/handlers/feature-flags.js @@ -1,5 +1,5 @@ const feature = { - REDESIGN_2021: 'redesign_2021', + REDESIGN_2021: 'redesign-2021', } export const setFlagRedesign2021 = (req, res) => { From 2311e932ef9e6277a7d8518e93a75fa07bd78c1f Mon Sep 17 00:00:00 2001 From: David Nishikawa Date: Thu, 27 May 2021 14:42:23 -0700 Subject: [PATCH 17/37] Simplify enable/disable urls. --- packages/openneuro-server/src/routes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/openneuro-server/src/routes.js b/packages/openneuro-server/src/routes.js index c0f3f32fb0..d284c052de 100644 --- a/packages/openneuro-server/src/routes.js +++ b/packages/openneuro-server/src/routes.js @@ -163,12 +163,12 @@ const routes = [ // feature flag setters and unsetters { method: 'get', - url: '/feature-flag/redesign-2021/enable', + url: '/feature/redesign-2021/enable', handler: setFlagRedesign2021, }, { method: 'get', - url: '/feature-flag/redesign-2021/disable', + url: '/feature/redesign-2021/disable', handler: unsetFlagRedesign2021, }, ] From 75b55081caaab1ebe2789fa0e4c75a8c796f1822 Mon Sep 17 00:00:00 2001 From: David Nishikawa Date: Thu, 27 May 2021 15:11:05 -0700 Subject: [PATCH 18/37] Redesign endpoints redirect to homepage. --- .pnp.js | 2 +- packages/openneuro-server/src/handlers/feature-flags.js | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.pnp.js b/.pnp.js index e6969db92f..df4733318d 100755 --- a/.pnp.js +++ b/.pnp.js @@ -25239,7 +25239,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ]], ["git-win", [ ["npm:2.3.0", { - "packageLocation": "./.yarn/unplugged/git-win-npm-2.3.0-b98f2b7122/node_modules/git-win/", + "packageLocation": "./.yarn/cache/git-win-npm-2.3.0-b98f2b7122-a273c79c22.zip/node_modules/git-win/", "packageDependencies": [ ["git-win", "npm:2.3.0"], ["@babel/runtime", "npm:7.14.0"], diff --git a/packages/openneuro-server/src/handlers/feature-flags.js b/packages/openneuro-server/src/handlers/feature-flags.js index f0ea87747b..345c50fd72 100644 --- a/packages/openneuro-server/src/handlers/feature-flags.js +++ b/packages/openneuro-server/src/handlers/feature-flags.js @@ -3,12 +3,10 @@ const feature = { } export const setFlagRedesign2021 = (req, res) => { - res - .cookie(feature.REDESIGN_2021, true) - .send(`You have enabled feature ${feature.REDESIGN_2021}.`) + res.cookie(feature.REDESIGN_2021, true).redirect('/') } export const unsetFlagRedesign2021 = (req, res) => { res.clearCookie(feature.REDESIGN_2021) - res.send(`You have disabled feature ${feature.REDESIGN_2021}.`) + res.redirect('/') } From 03a60fd77bd8b035e953e74a0110af56ff83eb24 Mon Sep 17 00:00:00 2001 From: David Nishikawa Date: Fri, 28 May 2021 09:04:24 -0700 Subject: [PATCH 19/37] add feature to FeatureToggleProps --- packages/openneuro-app/src/scripts/components/feature-toggle.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/openneuro-app/src/scripts/components/feature-toggle.tsx b/packages/openneuro-app/src/scripts/components/feature-toggle.tsx index 1e620add65..35fb7e6998 100644 --- a/packages/openneuro-app/src/scripts/components/feature-toggle.tsx +++ b/packages/openneuro-app/src/scripts/components/feature-toggle.tsx @@ -2,6 +2,7 @@ import React, { FC, ReactNode } from 'react' import { useCookies } from 'react-cookie' interface FeatureToggleProps { + feature: string renderOnEnabled(): ReactNode renderOnDisabled(): ReactNode } From 1d802896a0155b47d8d05ee48b3fe71801b785c1 Mon Sep 17 00:00:00 2001 From: David Nishikawa Date: Fri, 28 May 2021 09:18:18 -0700 Subject: [PATCH 20/37] Have FeatureToggle return jsx. --- .../openneuro-app/src/scripts/components/feature-toggle.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openneuro-app/src/scripts/components/feature-toggle.tsx b/packages/openneuro-app/src/scripts/components/feature-toggle.tsx index 35fb7e6998..de3a78cc78 100644 --- a/packages/openneuro-app/src/scripts/components/feature-toggle.tsx +++ b/packages/openneuro-app/src/scripts/components/feature-toggle.tsx @@ -13,7 +13,7 @@ const FeatureToggle: FC = ({ renderOnDisabled, }) => { const [cookies] = useCookies() - return cookies[feature] ? renderOnEnabled() : renderOnDisabled() + return <>{cookies[feature] ? renderOnEnabled() : renderOnDisabled()} } export default FeatureToggle From dcf03129f2a5121f5f962f8234ce82b1d01c51fe Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Fri, 28 May 2021 10:40:41 -0700 Subject: [PATCH 21/37] fix(helm): Raise CPU limit for dataset worker container --- helm/eksctl-cluster-prod.yaml | 5 +++-- helm/openneuro/templates/dataset-worker-stateful-set.yaml | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/helm/eksctl-cluster-prod.yaml b/helm/eksctl-cluster-prod.yaml index 86189eaeac..f74db9d5dc 100644 --- a/helm/eksctl-cluster-prod.yaml +++ b/helm/eksctl-cluster-prod.yaml @@ -34,10 +34,11 @@ nodeGroups: preBootstrapCommands: - apt update - apt install -y nfs-common zfsutils-linux - - name: storage + - name: storage-m5 amiFamily: Ubuntu2004 - instanceType: r5ad.large + instanceType: m5ad.2xlarge desiredCapacity: 2 + labels: { role: storage } availabilityZones: - us-west-2b - us-west-2c diff --git a/helm/openneuro/templates/dataset-worker-stateful-set.yaml b/helm/openneuro/templates/dataset-worker-stateful-set.yaml index dd99018add..46a3a1187d 100644 --- a/helm/openneuro/templates/dataset-worker-stateful-set.yaml +++ b/helm/openneuro/templates/dataset-worker-stateful-set.yaml @@ -43,14 +43,14 @@ spec: containers: - name: {{ .Release.Name }}-dataset-worker image: 'openneuro/datalad-service:v{{ .Chart.AppVersion }}' - command: ["gunicorn", "--bind", "0.0.0.0:80", "--reload", "datalad_service.app:create_app('/datasets')", "--workers", "4", "--worker-class", "gevent", "--timeout", "60", "--keep-alive", "30"] + command: ["gunicorn", "--bind", "0.0.0.0:80", "--reload", "datalad_service.app:create_app('/datasets')", "--workers", "8", "--worker-class", "gevent", "--timeout", "60", "--keep-alive", "30"] resources: limits: - cpu: "1.6" + cpu: "3" memory: "10Gi" requests: - cpu: "0.3" - memory: "1Gi" + cpu: "1" + memory: "4Gi" ports: - containerPort: 80 envFrom: From d68b7de26e5f7375be83cc3bb900b538a626d40e Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Fri, 28 May 2021 16:47:14 -0700 Subject: [PATCH 22/37] adding search page and results --- .pnp.js | 97 +- packages/openneuro-components/package.json | 3 + .../src/facets/Facet.stories.tsx | 74 +- .../src/header/Header.tsx | 4 +- .../src/header/header.scss | 3 +- .../openneuro-components/src/icon/icon.scss | 4 + .../mock-content/bimodal-search-results.jsx | 562 -- .../src/mock-content/mri-search-results.jsx | 8548 +++++++++++++++++ .../src/search-page/CommunitySwoop.tsx | 3 - .../src/search-page/ModalityHeader.tsx | 17 +- .../src/search-page/SearchPage.tsx | 45 +- .../src/search-page/SearchResult.stories.tsx | 17 +- .../src/search-page/SearchResult.tsx | 287 +- .../src/search-page/SearchResults.stories.tsx | 26 + .../src/search-page/search-page.scss | 67 +- .../src/search-page/search-result.scss | 78 + .../src/tooltip/Tooltip.tsx | 14 +- yarn.lock | 75 +- 18 files changed, 9115 insertions(+), 809 deletions(-) delete mode 100644 packages/openneuro-components/src/mock-content/bimodal-search-results.jsx create mode 100644 packages/openneuro-components/src/mock-content/mri-search-results.jsx create mode 100644 packages/openneuro-components/src/search-page/SearchResults.stories.tsx diff --git a/.pnp.js b/.pnp.js index fd556db99b..7fad324d23 100755 --- a/.pnp.js +++ b/.pnp.js @@ -117,13 +117,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ], "linkType": "SOFT", }], - ["npm:3.3.19", { - "packageLocation": "./.yarn/cache/@apollo-client-npm-3.3.19-39baf9f99e-a7266cfdff.zip/node_modules/@apollo/client/", - "packageDependencies": [ - ["@apollo/client", "npm:3.3.19"] - ], - "linkType": "SOFT", - }], ["virtual:4112afb9dad10978c159910bf10db9840b981b1333117623c8a4a8cf77481344a0a24735a5506e2920c18e3cfa2cc179489824b6a56c988bb070f4f60da40974#npm:3.3.14", { "packageLocation": "./.yarn/$$virtual/@apollo-client-virtual-01c7b6c19d/0/cache/@apollo-client-npm-3.3.14-1ebea52b4f-a08163a998.zip/node_modules/@apollo/client/", "packageDependencies": [ @@ -293,40 +286,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "subscriptions-transport-ws" ], "linkType": "HARD", - }], - ["virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:3.3.19", { - "packageLocation": "./.yarn/$$virtual/@apollo-client-virtual-c2be05e84b/0/cache/@apollo-client-npm-3.3.19-39baf9f99e-a7266cfdff.zip/node_modules/@apollo/client/", - "packageDependencies": [ - ["@apollo/client", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:3.3.19"], - ["@graphql-typed-document-node/core", "virtual:51e032042460c5acb2fee2f0f33950a409d321b7c2d7932ec5edd2d65c6eef219caf38d6fbd40ae889377bab601157a449b02b052ebb0cf87371875d317dc909#npm:3.1.0"], - ["@types/graphql", null], - ["@types/react", null], - ["@types/subscriptions-transport-ws", null], - ["@types/zen-observable", "npm:0.8.2"], - ["@wry/context", "npm:0.6.0"], - ["@wry/equality", "npm:0.4.0"], - ["fast-json-stable-stringify", "npm:2.1.0"], - ["graphql", null], - ["graphql-tag", "virtual:51e032042460c5acb2fee2f0f33950a409d321b7c2d7932ec5edd2d65c6eef219caf38d6fbd40ae889377bab601157a449b02b052ebb0cf87371875d317dc909#npm:2.12.4"], - ["hoist-non-react-statics", "npm:3.3.2"], - ["optimism", "npm:0.16.1"], - ["prop-types", "npm:15.7.2"], - ["react", "npm:17.0.2"], - ["subscriptions-transport-ws", null], - ["symbol-observable", "npm:2.0.3"], - ["ts-invariant", "npm:0.7.3"], - ["tslib", "npm:1.14.1"], - ["zen-observable", "npm:0.8.15"] - ], - "packagePeers": [ - "@types/graphql", - "@types/react", - "@types/subscriptions-transport-ws", - "graphql", - "react", - "subscriptions-transport-ws" - ], - "linkType": "HARD", }] ]], ["@apollo/protobufjs", [ @@ -9424,7 +9383,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./packages/openneuro-components/", "packageDependencies": [ ["@openneuro/components", "workspace:packages/openneuro-components"], - ["@apollo/client", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:3.3.19"], ["@mdx-js/react", "virtual:0f7d3aee8f4ba1ddd800f44d0aa4455a1e4b9ae1a24c9eda9668f886bc29f684a49cc3e1c10c4481252ea0f7eec58c4be3167e18e5c332f257a51ab3e50e4f7a#npm:1.6.22"], ["@storybook/addon-a11y", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:6.2.9"], ["@storybook/addon-actions", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:6.2.9"], @@ -9437,13 +9395,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@storybook/theming", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:6.2.9"], ["@testing-library/jest-dom", "npm:5.12.0"], ["@testing-library/react", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:11.2.7"], + ["@types/bytes", "npm:3.1.0"], ["@types/mdx-js__react", "npm:1.5.3"], ["@types/react-router-dom", "npm:5.1.7"], ["@types/react-slick", "npm:0.23.4"], ["@types/slick-carousel", "npm:1.6.34"], + ["bytes", "npm:3.1.0"], ["css-loader", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.2.4"], ["date-fns", "npm:2.21.3"], - ["graphql-hooks", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.1.1"], + ["pluralize", "npm:8.0.0"], ["rc-slider", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:9.7.2"], ["react", "npm:17.0.2"], ["react-router-dom", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.2.0"], @@ -11855,6 +11815,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD", }] ]], + ["@types/bytes", [ + ["npm:3.1.0", { + "packageLocation": "./.yarn/cache/@types-bytes-npm-3.1.0-81383ade8b-184b848178.zip/node_modules/@types/bytes/", + "packageDependencies": [ + ["@types/bytes", "npm:3.1.0"] + ], + "linkType": "HARD", + }] + ]], ["@types/cheerio", [ ["npm:0.22.28", { "packageLocation": "./.yarn/cache/@types-cheerio-npm-0.22.28-da80c0e8f2-a3164dcf1f.zip/node_modules/@types/cheerio/", @@ -20224,15 +20193,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD", }] ]], - ["dequal", [ - ["npm:2.0.2", { - "packageLocation": "./.yarn/cache/dequal-npm-2.0.2-370927eb6c-3b5b019a87.zip/node_modules/dequal/", - "packageDependencies": [ - ["dequal", "npm:2.0.2"] - ], - "linkType": "HARD", - }] - ]], ["des.js", [ ["npm:1.0.1", { "packageLocation": "./.yarn/cache/des.js-npm-1.0.1-9f155eddb6-74cd0aa0c5.zip/node_modules/des.js/", @@ -25831,30 +25791,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD", }] ]], - ["graphql-hooks", [ - ["npm:5.1.1", { - "packageLocation": "./.yarn/cache/graphql-hooks-npm-5.1.1-b58943726d-4d615236e2.zip/node_modules/graphql-hooks/", - "packageDependencies": [ - ["graphql-hooks", "npm:5.1.1"] - ], - "linkType": "SOFT", - }], - ["virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.1.1", { - "packageLocation": "./.yarn/$$virtual/graphql-hooks-virtual-e19fdcc460/0/cache/graphql-hooks-npm-5.1.1-b58943726d-4d615236e2.zip/node_modules/graphql-hooks/", - "packageDependencies": [ - ["graphql-hooks", "virtual:bb4ed02b339ed801b02d2ec15b42a5aa7b1afdaf44119aefaab128a59d6e16cc6018880c169f24bf2107550e914562ee9e1780db01a12e1bc3c492ad0a049c36#npm:5.1.1"], - ["@types/react", null], - ["dequal", "npm:2.0.2"], - ["extract-files", "npm:9.0.0"], - ["react", "npm:17.0.2"] - ], - "packagePeers": [ - "@types/react", - "react" - ], - "linkType": "HARD", - }] - ]], ["graphql-iso-date", [ ["npm:3.6.1", { "packageLocation": "./.yarn/cache/graphql-iso-date-npm-3.6.1-bbab129ea7-d33245ccab.zip/node_modules/graphql-iso-date/", @@ -33869,15 +33805,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@wry/trie", "npm:0.3.0"] ], "linkType": "HARD", - }], - ["npm:0.16.1", { - "packageLocation": "./.yarn/cache/optimism-npm-0.16.1-b6a027d092-760b129552.zip/node_modules/optimism/", - "packageDependencies": [ - ["optimism", "npm:0.16.1"], - ["@wry/context", "npm:0.6.0"], - ["@wry/trie", "npm:0.3.0"] - ], - "linkType": "HARD", }] ]], ["optimize-css-assets-webpack-plugin", [ diff --git a/packages/openneuro-components/package.json b/packages/openneuro-components/package.json index eed1637854..e59cc4e920 100644 --- a/packages/openneuro-components/package.json +++ b/packages/openneuro-components/package.json @@ -8,7 +8,9 @@ "license": "MIT", "dependencies": { "@mdx-js/react": "^1.6.22", + "bytes": "^3.1.0", "date-fns": "^2.21.1", + "pluralize": "^8.0.0", "rc-slider": "^9.7.2", "react": "^17.0.1", "react-router-dom": "^5.2.0", @@ -27,6 +29,7 @@ "@storybook/theming": "^6.2.8", "@testing-library/jest-dom": "^5.11.4", "@testing-library/react": "^11.1.0", + "@types/bytes": "^3", "@types/mdx-js__react": "^1", "@types/react-router-dom": "^5", "@types/react-slick": "^0", diff --git a/packages/openneuro-components/src/facets/Facet.stories.tsx b/packages/openneuro-components/src/facets/Facet.stories.tsx index 85a4bf24be..a41b7d07de 100644 --- a/packages/openneuro-components/src/facets/Facet.stories.tsx +++ b/packages/openneuro-components/src/facets/Facet.stories.tsx @@ -1,9 +1,6 @@ import React from 'react' import { Story, Meta } from '@storybook/react' -import { AccordionTab } from '../accordion/AccordionTab' -import { AccordionWrap } from '../accordion/AccordionWrap' - import { FacetListWrap, FacetListWrapProps } from './FacetListWrap' export default { @@ -21,7 +18,7 @@ const FacetListWrapTemplate: Story = ({ const [selected, setSelected] = React.useState() return ( -
    +
    = ({ const modalities = [ { label: 'MRI', - value: 'mri', - count: 30, + value: 'MRI', + count: 3000, children: [ + { + label: 'Functional', + value: 'Functional', + count: 300, + }, { label: 'Structural', - value: 'structural', - count: 30, + value: 'Structural', + count: 200, }, { - label: 'Diffusional', - value: 'diffusional', - count: 30, + label: 'Diffusion', + value: 'Diffusion', + count: 300, + }, + { + label: 'Perfusion', + value: 'Perfusion', + count: 150, }, ], }, { - label: 'PET', - value: 'pet', - count: 30, - }, - { - label: 'ASL', - value: 'asl', - count: 30, + label: 'EEG', + value: 'EEG', + count: 303, + children: [ + { + label: 'ECoG', + value: 'ECoG', + count: 300, + }, + { + label: 'SEEG', + value: 'SEEG', + count: 200, + }, + ], }, { - label: 'EEG', - value: 'eeg', - count: 30, + label: 'MEG', + value: 'MEG', + count: 330, }, { - label: 'ECoG', - value: 'ecog', + label: 'PET', + value: 'PET', count: 30, + children: [ + { + label: 'Static', + value: 'Static', + count: 300, + }, + { + label: 'Dynamic', + value: 'Dynamic', + count: 200, + }, + ], }, ] export const FacetExample = FacetListWrapTemplate.bind({}) diff --git a/packages/openneuro-components/src/header/Header.tsx b/packages/openneuro-components/src/header/Header.tsx index c9172d4a78..e07efd3527 100644 --- a/packages/openneuro-components/src/header/Header.tsx +++ b/packages/openneuro-components/src/header/Header.tsx @@ -82,12 +82,12 @@ export const Header: React.FC = ({
    {expanded ? : null}
    -
    + {/*
    {' '}
    -
    +
    */} {!profile ? ( diff --git a/packages/openneuro-components/src/header/header.scss b/packages/openneuro-components/src/header/header.scss index 39cec6d102..5895d868bb 100644 --- a/packages/openneuro-components/src/header/header.scss +++ b/packages/openneuro-components/src/header/header.scss @@ -1,7 +1,6 @@ @import '../scss/variables'; header { position: relative; - padding-bottom: 100px; } .header-upload-btn { @@ -21,7 +20,7 @@ header { display: flex; flex-wrap: wrap; justify-content: space-between; - padding: 10px 25px 0; + padding: 10px 25px; align-items: center; background-color: $primary; diff --git a/packages/openneuro-components/src/icon/icon.scss b/packages/openneuro-components/src/icon/icon.scss index a7c27e7aa0..0c08c71389 100644 --- a/packages/openneuro-components/src/icon/icon.scss +++ b/packages/openneuro-components/src/icon/icon.scss @@ -2,3 +2,7 @@ display: inline-flex; padding: 5px; } + +.on-icon img { + image-rendering: -webkit-optimize-contrast; +} diff --git a/packages/openneuro-components/src/mock-content/bimodal-search-results.jsx b/packages/openneuro-components/src/mock-content/bimodal-search-results.jsx deleted file mode 100644 index cb12b09b66..0000000000 --- a/packages/openneuro-components/src/mock-content/bimodal-search-results.jsx +++ /dev/null @@ -1,562 +0,0 @@ -import React from 'react' - -export const bimodal = { - data: { - datasets: { - edges: [ - { - node: { - id: 'ds002338', - created: '2019-12-03T10:06:04.003Z', - uploader: { - id: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - name: 'Claire Cury', - }, - public: true, - permissions: { - id: 'ds002338', - userPermissions: [ - { - userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - level: 'admin', - access: 'admin', - user: { - id: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - name: 'Claire Cury', - email: 'claire.cury@inria.fr', - provider: 'orcid', - }, - }, - { - userId: '98e9d912-ace0-4440-839f-e23900ad1d8b', - level: 'rw', - access: 'rw', - user: { - id: '98e9d912-ace0-4440-839f-e23900ad1d8b', - name: 'Giulia Lioi', - email: 'lioi.giulia@gmail.com', - provider: 'google', - }, - }, - ], - }, - draft: { - id: 'ds002338', - summary: { - modalities: ['T1w', 'eeg', 'bold'], - sessions: [], - subjects: [ - 'xp201', - 'xp202', - 'xp203', - 'xp204', - 'xp205', - 'xp206', - 'xp207', - 'xp210', - 'xp211', - 'xp213', - 'xp216', - 'xp217', - 'xp218', - 'xp219', - 'xp220', - 'xp221', - 'xp222', - ], - subjectMetadata: [ - { - participantId: 'xp201', - age: 41, - sex: 'F', - group: null, - }, - { - participantId: 'xp202', - age: 39, - sex: 'M', - group: null, - }, - { - participantId: 'xp203', - age: 32, - sex: 'M', - group: null, - }, - { - participantId: 'xp204', - age: 34, - sex: 'F', - group: null, - }, - { - participantId: 'xp205', - age: 28, - sex: 'F', - group: null, - }, - { - participantId: 'xp206', - age: 31, - sex: 'M', - group: null, - }, - { - participantId: 'xp207', - age: 39, - sex: 'M', - group: null, - }, - { - participantId: 'xp208', - age: 47, - sex: 'M', - group: null, - }, - { - participantId: 'xp209', - age: 25, - sex: 'M', - group: null, - }, - { - participantId: 'xp210', - age: 26, - sex: 'F', - group: null, - }, - { - participantId: 'xp211', - age: 50, - sex: 'M', - group: null, - }, - { - participantId: 'xp212', - age: 30, - sex: 'F', - group: null, - }, - { - participantId: 'xp213', - age: 31, - sex: 'M', - group: null, - }, - { - participantId: 'xp214', - age: 23, - sex: 'F', - group: null, - }, - { - participantId: 'xp215', - age: 44, - sex: 'M', - group: null, - }, - { - participantId: 'xp216', - age: 31, - sex: 'M', - group: null, - }, - { - participantId: 'xp217', - age: 36, - sex: 'F', - group: null, - }, - { - participantId: 'xp218', - age: 46, - sex: 'F', - group: null, - }, - { - participantId: 'xp219', - age: 26, - sex: 'F', - group: null, - }, - { - participantId: 'xp220', - age: 66, - sex: 'M', - group: null, - }, - { - participantId: 'xp221', - age: 42, - sex: 'M', - group: null, - }, - { - participantId: 'xp222', - age: 32, - sex: 'F', - group: null, - }, - { - participantId: 'xp223', - age: 18, - sex: 'F', - group: null, - }, - ], - tasks: [ - '1dNF', - 'MIpost', - 'MIpre', - '2dNF', - '1dNF_run-01', - '2dNF_run-02', - ], - size: 26024158001, - totalFiles: 484, - dataProcessed: false, - }, - issues: [ - { - severity: 'warning', - }, - { - severity: 'warning', - }, - ], - description: { - Name: 'A multi-modal human neuroimaging dataset for data integration: simultaneous EEG and fMRI acquisition during a motor imagery neurofeedback task: XP2', - }, - }, - analytics: { - views: 34821, - downloads: 210, - }, - stars: [ - { - userId: '646d9f88-8c4d-494a-9c73-5d518c49c7df', - datasetId: 'ds002338', - }, - { - userId: '3ab631a6-5698-43b3-9064-bb8904b01301', - datasetId: 'ds002338', - }, - { - userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - datasetId: 'ds002338', - }, - { - userId: '5b20ed3a-3dc2-4333-ae5d-c9eb29d5425e', - datasetId: 'ds002338', - }, - { - userId: 'd0e20a7e-ee60-4cb0-9a1e-7360bcc6af05', - datasetId: 'ds002338', - }, - { - userId: '54c7655b-c1aa-47e4-ad11-0eb20511a605', - datasetId: 'ds002338', - }, - ], - followers: [ - { - userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - datasetId: 'ds002338', - }, - { - userId: '98e9d912-ace0-4440-839f-e23900ad1d8b', - datasetId: 'ds002338', - }, - { - userId: 'd0e20a7e-ee60-4cb0-9a1e-7360bcc6af05', - datasetId: 'ds002338', - }, - ], - snapshots: [ - { - id: 'ds002338:1.0.0', - created: '2019-12-03T22:03:46.965Z', - tag: '1.0.0', - }, - { - id: 'ds002338:1.0.1', - created: '2019-12-04T14:42:42.175Z', - tag: '1.0.1', - }, - { - id: 'ds002338:1.0.2', - created: '2019-12-12T09:37:59.999Z', - tag: '1.0.2', - }, - { - id: 'ds002338:2.0.0', - created: '2020-04-26T09:34:30.908Z', - tag: '2.0.0', - }, - { - id: 'ds002338:2.0.1', - created: '2020-09-24T23:32:33.512Z', - tag: '2.0.1', - }, - ], - }, - }, - { - node: { - id: 'ds002336', - created: '2019-12-02T15:14:38.180Z', - uploader: { - id: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - name: 'Claire Cury', - }, - public: true, - permissions: { - id: 'ds002336', - userPermissions: [ - { - userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - level: 'admin', - access: 'admin', - user: { - id: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - name: 'Claire Cury', - email: 'claire.cury@inria.fr', - provider: 'orcid', - }, - }, - { - userId: '98e9d912-ace0-4440-839f-e23900ad1d8b', - level: 'rw', - access: 'rw', - user: { - id: '98e9d912-ace0-4440-839f-e23900ad1d8b', - name: 'Giulia Lioi', - email: 'lioi.giulia@gmail.com', - provider: 'google', - }, - }, - ], - }, - draft: { - id: 'ds002336', - summary: { - modalities: ['T1w', 'eeg', 'bold'], - sessions: [], - subjects: [ - 'xp101', - 'xp102', - 'xp103', - 'xp104', - 'xp105', - 'xp106', - 'xp107', - 'xp108', - 'xp109', - 'xp110', - ], - subjectMetadata: [ - { - participantId: 'xp101', - age: 25, - sex: 'M', - group: null, - }, - { - participantId: 'xp102', - age: 27, - sex: 'M', - group: null, - }, - { - participantId: 'xp103', - age: 25, - sex: 'M', - group: null, - }, - { - participantId: 'xp104', - age: 31, - sex: 'M', - group: null, - }, - { - participantId: 'xp105', - age: 39, - sex: 'M', - group: null, - }, - { - participantId: 'xp106', - age: 36, - sex: 'F', - group: null, - }, - { - participantId: 'xp107', - age: 19, - sex: 'M', - group: null, - }, - { - participantId: 'xp108', - age: 29, - sex: 'M', - group: null, - }, - { - participantId: 'xp109', - age: 27, - sex: 'F', - group: null, - }, - { - participantId: 'xp110', - age: 26, - sex: 'M', - group: null, - }, - ], - tasks: [ - 'eegNF', - 'eegfmriNF', - 'fmriNF', - 'motorloc', - 'MIpost', - 'MIpre', - ], - size: 18046628273, - totalFiles: 325, - dataProcessed: false, - }, - issues: [ - { - severity: 'warning', - }, - { - severity: 'warning', - }, - { - severity: 'warning', - }, - { - severity: 'warning', - }, - ], - description: { - Name: 'A multi-modal human neuroimaging dataset for data integration: simultaneous EEG and fMRI acquisition during a motor imagery neurofeedback task: XP1', - }, - }, - analytics: { - views: 28071, - downloads: 212, - }, - stars: [ - { - userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - datasetId: 'ds002336', - }, - { - userId: 'c4c77657-9e5d-4105-877c-2f9b9a33c266', - datasetId: 'ds002336', - }, - { - userId: '646d9f88-8c4d-494a-9c73-5d518c49c7df', - datasetId: 'ds002336', - }, - { - userId: 'd0e20a7e-ee60-4cb0-9a1e-7360bcc6af05', - datasetId: 'ds002336', - }, - { - userId: '54c7655b-c1aa-47e4-ad11-0eb20511a605', - datasetId: 'ds002336', - }, - { - userId: 'ac8b1a97-eb67-4f6e-b4b0-0eb192e74497', - datasetId: 'ds002336', - }, - ], - followers: [ - { - userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', - datasetId: 'ds002336', - }, - { - userId: '98e9d912-ace0-4440-839f-e23900ad1d8b', - datasetId: 'ds002336', - }, - { - userId: 'd0e20a7e-ee60-4cb0-9a1e-7360bcc6af05', - datasetId: 'ds002336', - }, - ], - snapshots: [ - { - id: 'ds002336:1.0.0', - created: '2019-12-03T09:47:07.574Z', - tag: '1.0.0', - }, - { - id: 'ds002336:1.0.1', - created: '2019-12-04T14:46:58.333Z', - tag: '1.0.1', - }, - { - id: 'ds002336:1.0.2', - created: '2019-12-12T09:41:29.876Z', - tag: '1.0.2', - }, - { - id: 'ds002336:2.0.0', - created: '2020-04-26T08:55:55.414Z', - tag: '2.0.0', - }, - { - id: 'ds002336:2.0.1', - created: '2020-09-24T23:27:18.365Z', - tag: '2.0.1', - }, - ], - }, - }, - ], - pageInfo: { - startCursor: null, - endCursor: 'WzMuOTQ5NzA4LCJkczAwMjMzNiJd', - hasPreviousPage: false, - hasNextPage: true, - count: 2, - }, - }, - }, - extensions: { - openneuro: { - version: '3.33.5', - }, - cacheControl: { - version: 1, - hints: [ - { - path: ['datasets'], - maxAge: 0, - }, - { - path: ['datasets', 'edges'], - maxAge: 0, - }, - { - path: ['datasets', 'edges', 0, 'node'], - maxAge: 0, - }, - { - path: ['datasets', 'edges', 1, 'node'], - maxAge: 0, - }, - { - path: ['datasets', 'pageInfo'], - maxAge: 0, - }, - ], - }, - }, -} diff --git a/packages/openneuro-components/src/mock-content/mri-search-results.jsx b/packages/openneuro-components/src/mock-content/mri-search-results.jsx new file mode 100644 index 0000000000..6fea99a1ca --- /dev/null +++ b/packages/openneuro-components/src/mock-content/mri-search-results.jsx @@ -0,0 +1,8548 @@ +import React from 'react' + +export const mri = { + data: { + datasets: { + edges: [ + { + node: { + id: 'ds000219', + created: '2018-03-05T21:03:13.076Z', + uploader: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + }, + public: true, + permissions: { + id: 'ds000219', + userPermissions: [ + { + userId: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + level: 'admin', + access: 'admin', + user: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + email: 'poldrackexperiments@gmail.com', + provider: 'google', + }, + }, + { + userId: 'c182a244-2c74-48f1-acca-41839604c87b', + level: 'admin', + access: 'admin', + user: { + id: 'c182a244-2c74-48f1-acca-41839604c87b', + name: 'Jelle R. Dalenberg', + email: 'jelle.dalenberg@yale.edu', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds000219', + summary: { + modalities: ['T1w', 'bold'], + sessions: [], + subjects: [ + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + '12', + '13', + '14', + '15', + '17', + '18', + '19', + '20', + '21', + '22', + ], + subjectMetadata: null, + tasks: ['RP flavour task'], + size: 16023472908, + totalFiles: 985, + dataProcessed: null, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Flavour Pleasantness (Regular Products)', + }, + }, + analytics: { + views: 30765, + downloads: 65, + }, + stars: [ + { + userId: '2b7f938a-db18-4f49-95ff-a4d48ac134b1', + datasetId: 'ds000219', + }, + { + userId: '945edaee-8258-4906-a09e-12448e3e6e27', + datasetId: 'ds000219', + }, + { + userId: 'e4813baa-c598-425f-b4c2-929b6d7ba368', + datasetId: 'ds000219', + }, + { + userId: '4a1b11a2-0b7d-45d1-902a-0cea37ff6536', + datasetId: 'ds000219', + }, + ], + followers: [], + snapshots: [ + { + id: 'ds000219:00001', + created: '2018-07-17T01:54:31.508Z', + tag: '00001', + }, + ], + }, + }, + { + node: { + id: 'ds000218', + created: '2018-03-08T19:10:19.232Z', + uploader: { + id: '9baa8f9f-55a4-49bc-a9cb-8d7f99a8e6e8', + name: 'Franklin Feingold', + }, + public: true, + permissions: { + id: 'ds000218', + userPermissions: [ + { + userId: '9baa8f9f-55a4-49bc-a9cb-8d7f99a8e6e8', + level: 'admin', + access: 'admin', + user: { + id: '9baa8f9f-55a4-49bc-a9cb-8d7f99a8e6e8', + name: 'Franklin Feingold', + email: 'franklin.feingold@gmail.com', + provider: 'google', + }, + }, + { + userId: 'c182a244-2c74-48f1-acca-41839604c87b', + level: 'admin', + access: 'admin', + user: { + id: 'c182a244-2c74-48f1-acca-41839604c87b', + name: 'Jelle R. Dalenberg', + email: 'jelle.dalenberg@yale.edu', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds000218', + summary: { + modalities: ['T1w', 'bold'], + sessions: [], + subjects: [ + '01', + '02', + '04', + '05', + '07', + '08', + '09', + '10', + '11', + '12', + '13', + '14', + '15', + '17', + '18', + '19', + '20', + '21', + '22', + ], + subjectMetadata: null, + tasks: ['ONS flavour task'], + size: 12575922826, + totalFiles: 1964, + dataProcessed: null, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Flavour Pleasantness (Oral Nutritional Supplements)', + }, + }, + analytics: { + views: 27216, + downloads: 32, + }, + stars: [], + followers: [], + snapshots: [ + { + id: 'ds000218:00001', + created: '2018-07-17T02:09:32.282Z', + tag: '00001', + }, + { + id: 'ds000218:00002', + created: '2018-07-17T02:20:06.013Z', + tag: '00002', + }, + ], + }, + }, + { + node: { + id: 'ds002837', + created: '2020-05-22T10:12:51.035Z', + uploader: { + id: '4bee012a-33a8-4603-8e72-8ed26b31bfe8', + name: 'Sarah A.', + }, + public: true, + permissions: { + id: 'ds002837', + userPermissions: [ + { + userId: '5060d967-ee75-499b-b3ca-82415689d92d', + level: 'admin', + access: 'admin', + user: { + id: '5060d967-ee75-499b-b3ca-82415689d92d', + name: 'Jeremy Skipper', + email: 'jskipper@lab-lab.org', + provider: 'google', + }, + }, + { + userId: '4bee012a-33a8-4603-8e72-8ed26b31bfe8', + level: 'admin', + access: 'admin', + user: { + id: '4bee012a-33a8-4603-8e72-8ed26b31bfe8', + name: 'Sarah A.', + email: 'sarah.aliko@googlemail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds002837', + summary: { + modalities: ['T1w', 'bold'], + sessions: [], + subjects: [ + '1', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '2', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '3', + '30', + '31', + '32', + '33', + '34', + '35', + '36', + '37', + '38', + '39', + '4', + '40', + '41', + '42', + '43', + '44', + '45', + '46', + '47', + '48', + '49', + '5', + '50', + '51', + '52', + '53', + '54', + '55', + '56', + '57', + '58', + '59', + '6', + '60', + '61', + '62', + '63', + '64', + '65', + '66', + '67', + '68', + '69', + '7', + '70', + '71', + '72', + '73', + '74', + '75', + '76', + '77', + '78', + '79', + '8', + '80', + '81', + '82', + '83', + '84', + '85', + '86', + '9', + ], + subjectMetadata: [ + { + participantId: '1', + age: 23, + sex: 'M', + group: null, + }, + { + participantId: '2', + age: 25, + sex: 'F', + group: null, + }, + { + participantId: '3', + age: 23, + sex: 'M', + group: null, + }, + { + participantId: '4', + age: 23, + sex: 'M', + group: null, + }, + { + participantId: '5', + age: 22, + sex: 'F', + group: null, + }, + { + participantId: '6', + age: 25, + sex: 'M', + group: null, + }, + { + participantId: '7', + age: 23, + sex: 'F', + group: null, + }, + { + participantId: '8', + age: 23, + sex: 'F', + group: null, + }, + { + participantId: '9', + age: 28, + sex: 'F', + group: null, + }, + { + participantId: '10', + age: 31, + sex: 'M', + group: null, + }, + { + participantId: '11', + age: 20, + sex: 'F', + group: null, + }, + { + participantId: '12', + age: 19, + sex: 'M', + group: null, + }, + { + participantId: '13', + age: 19, + sex: 'F', + group: null, + }, + { + participantId: '14', + age: 38, + sex: 'M', + group: null, + }, + { + participantId: '15', + age: 22, + sex: 'F', + group: null, + }, + { + participantId: '16', + age: 50, + sex: 'F', + group: null, + }, + { + participantId: '17', + age: 22, + sex: 'M', + group: null, + }, + { + participantId: '18', + age: 53, + sex: 'M', + group: null, + }, + { + participantId: '19', + age: 22, + sex: 'F', + group: null, + }, + { + participantId: '20', + age: 43, + sex: 'M', + group: null, + }, + { + participantId: '21', + age: 27, + sex: 'M', + group: null, + }, + { + participantId: '22', + age: 23, + sex: 'M', + group: null, + }, + { + participantId: '23', + age: 24, + sex: 'M', + group: null, + }, + { + participantId: '24', + age: 22, + sex: 'M', + group: null, + }, + { + participantId: '25', + age: 20, + sex: 'F', + group: null, + }, + { + participantId: '26', + age: 26, + sex: 'F', + group: null, + }, + { + participantId: '27', + age: 21, + sex: 'M', + group: null, + }, + { + participantId: '28', + age: 20, + sex: 'F', + group: null, + }, + { + participantId: '29', + age: 19, + sex: 'F', + group: null, + }, + { + participantId: '30', + age: 20, + sex: 'M', + group: null, + }, + { + participantId: '31', + age: 30, + sex: 'M', + group: null, + }, + { + participantId: '32', + age: 35, + sex: 'M', + group: null, + }, + { + participantId: '33', + age: 58, + sex: 'M', + group: null, + }, + { + participantId: '34', + age: 46, + sex: 'F', + group: null, + }, + { + participantId: '35', + age: 19, + sex: 'F', + group: null, + }, + { + participantId: '36', + age: 34, + sex: 'F', + group: null, + }, + { + participantId: '37', + age: 21, + sex: 'F', + group: null, + }, + { + participantId: '38', + age: 21, + sex: 'F', + group: null, + }, + { + participantId: '39', + age: 21, + sex: 'F', + group: null, + }, + { + participantId: '40', + age: 25, + sex: 'F', + group: null, + }, + { + participantId: '41', + age: 23, + sex: 'F', + group: null, + }, + { + participantId: '42', + age: 20, + sex: 'M', + group: null, + }, + { + participantId: '43', + age: 25, + sex: 'M', + group: null, + }, + { + participantId: '44', + age: 25, + sex: 'M', + group: null, + }, + { + participantId: '45', + age: 19, + sex: 'F', + group: null, + }, + { + participantId: '46', + age: 31, + sex: 'F', + group: null, + }, + { + participantId: '47', + age: 21, + sex: 'F', + group: null, + }, + { + participantId: '48', + age: 22, + sex: 'M', + group: null, + }, + { + participantId: '49', + age: 19, + sex: 'M', + group: null, + }, + { + participantId: '50', + age: 24, + sex: 'M', + group: null, + }, + { + participantId: '51', + age: 22, + sex: 'M', + group: null, + }, + { + participantId: '52', + age: 30, + sex: 'M', + group: null, + }, + { + participantId: '53', + age: 20, + sex: 'F', + group: null, + }, + { + participantId: '54', + age: 19, + sex: 'F', + group: null, + }, + { + participantId: '55', + age: 19, + sex: 'F', + group: null, + }, + { + participantId: '56', + age: 23, + sex: 'M', + group: null, + }, + { + participantId: '57', + age: 23, + sex: 'F', + group: null, + }, + { + participantId: '58', + age: 50, + sex: 'M', + group: null, + }, + { + participantId: '59', + age: 58, + sex: 'M', + group: null, + }, + { + participantId: '60', + age: 33, + sex: 'M', + group: null, + }, + { + participantId: '61', + age: 20, + sex: 'F', + group: null, + }, + { + participantId: '62', + age: 21, + sex: 'F', + group: null, + }, + { + participantId: '63', + age: 22, + sex: 'M', + group: null, + }, + { + participantId: '64', + age: 18, + sex: 'F', + group: null, + }, + { + participantId: '65', + age: 21, + sex: 'F', + group: null, + }, + { + participantId: '66', + age: 24, + sex: 'M', + group: null, + }, + { + participantId: '67', + age: 23, + sex: 'F', + group: null, + }, + { + participantId: '68', + age: 25, + sex: 'M', + group: null, + }, + { + participantId: '69', + age: 24, + sex: 'F', + group: null, + }, + { + participantId: '70', + age: 19, + sex: 'F', + group: null, + }, + { + participantId: '71', + age: 25, + sex: 'M', + group: null, + }, + { + participantId: '72', + age: 20, + sex: 'M', + group: null, + }, + { + participantId: '73', + age: 24, + sex: 'M', + group: null, + }, + { + participantId: '74', + age: 24, + sex: 'F', + group: null, + }, + { + participantId: '75', + age: 45, + sex: 'F', + group: null, + }, + { + participantId: '76', + age: 20, + sex: 'M', + group: null, + }, + { + participantId: '77', + age: 29, + sex: 'M', + group: null, + }, + { + participantId: '78', + age: 45, + sex: 'M', + group: null, + }, + { + participantId: '79', + age: 20, + sex: 'F', + group: null, + }, + { + participantId: '80', + age: 55, + sex: 'M', + group: null, + }, + { + participantId: '81', + age: 31, + sex: 'M', + group: null, + }, + { + participantId: '82', + age: 50, + sex: 'M', + group: null, + }, + { + participantId: '83', + age: 18, + sex: 'F', + group: null, + }, + { + participantId: '84', + age: 22, + sex: 'F', + group: null, + }, + { + participantId: '85', + age: 23, + sex: 'F', + group: null, + }, + { + participantId: '86', + age: 19, + sex: 'M', + group: null, + }, + ], + tasks: [ + '500daysofsummer', + '12yearsaslave', + 'citizenfour', + 'theusualsuspects', + 'pulpfiction', + 'theshawshankredemption', + 'theprestige', + 'backtothefuture', + 'split', + 'littlemisssunshine', + ], + size: 95679003586, + totalFiles: 887, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Naturalistic Neuroimaging Database', + }, + }, + analytics: { + views: 30822, + downloads: 304, + }, + stars: [ + { + userId: 'c379bd89-007e-499a-bf38-5e3f34c5b452', + datasetId: 'ds002837', + }, + { + userId: '2b7f938a-db18-4f49-95ff-a4d48ac134b1', + datasetId: 'ds002837', + }, + { + userId: '9dc997b3-78ed-4411-be06-32670c03b437', + datasetId: 'ds002837', + }, + { + userId: '78715d09-920d-4f6e-a473-5ff1f29087b6', + datasetId: 'ds002837', + }, + { + userId: '790fac31-c573-4219-a065-a24390c39b98', + datasetId: 'ds002837', + }, + { + userId: '442ead0d-01ad-4c1c-b4da-6391c65dc3b5', + datasetId: 'ds002837', + }, + { + userId: '37036d56-b24e-45b9-8360-d3c0b2ea8704', + datasetId: 'ds002837', + }, + { + userId: 'b4ca8be6-a02f-46c6-8940-12d33cb4a8d4', + datasetId: 'ds002837', + }, + { + userId: 'f729dfc3-3cab-48b8-8fd3-053ee1b56ede', + datasetId: 'ds002837', + }, + { + userId: 'cedb016a-ea4f-446f-9888-23b0be7b126d', + datasetId: 'ds002837', + }, + { + userId: '945edaee-8258-4906-a09e-12448e3e6e27', + datasetId: 'ds002837', + }, + { + userId: 'a12c691c-1c09-4199-b981-9f667a94cf40', + datasetId: 'ds002837', + }, + { + userId: '4d2bdd4a-69ae-43be-ba93-e2da51548a42', + datasetId: 'ds002837', + }, + { + userId: 'dc6ad605-e2b7-4635-8320-b79b92676686', + datasetId: 'ds002837', + }, + ], + followers: [ + { + userId: '4bee012a-33a8-4603-8e72-8ed26b31bfe8', + datasetId: 'ds002837', + }, + { + userId: '78715d09-920d-4f6e-a473-5ff1f29087b6', + datasetId: 'ds002837', + }, + { + userId: '9dc997b3-78ed-4411-be06-32670c03b437', + datasetId: 'ds002837', + }, + { + userId: 'b4ca8be6-a02f-46c6-8940-12d33cb4a8d4', + datasetId: 'ds002837', + }, + { + userId: 'cedb016a-ea4f-446f-9888-23b0be7b126d', + datasetId: 'ds002837', + }, + { + userId: '4d2bdd4a-69ae-43be-ba93-e2da51548a42', + datasetId: 'ds002837', + }, + ], + snapshots: [ + { + id: 'ds002837:1.0.0', + created: '2020-05-22T20:31:40.943Z', + tag: '1.0.0', + }, + { + id: 'ds002837:1.0.1', + created: '2020-05-22T21:17:25.082Z', + tag: '1.0.1', + }, + { + id: 'ds002837:1.0.2', + created: '2020-05-22T22:09:20.656Z', + tag: '1.0.2', + }, + { + id: 'ds002837:1.0.3', + created: '2020-05-26T19:41:00.589Z', + tag: '1.0.3', + }, + { + id: 'ds002837:1.0.4', + created: '2020-05-26T22:22:56.357Z', + tag: '1.0.4', + }, + { + id: 'ds002837:1.0.5', + created: '2020-05-27T13:24:30.947Z', + tag: '1.0.5', + }, + { + id: 'ds002837:1.0.6', + created: '2020-05-27T13:44:29.068Z', + tag: '1.0.6', + }, + { + id: 'ds002837:1.1.0', + created: '2020-07-16T10:52:43.110Z', + tag: '1.1.0', + }, + { + id: 'ds002837:1.1.1', + created: '2020-07-21T15:42:22.662Z', + tag: '1.1.1', + }, + { + id: 'ds002837:1.1.2', + created: '2020-10-28T11:18:12.656Z', + tag: '1.1.2', + }, + { + id: 'ds002837:1.1.3', + created: '2021-04-20T22:20:04.479Z', + tag: '1.1.3', + }, + { + id: 'ds002837:2.0.0', + created: '2021-04-20T22:20:18.104Z', + tag: '2.0.0', + }, + ], + }, + }, + { + node: { + id: 'ds001491', + created: '2018-08-30T15:06:10.187Z', + uploader: { + id: 'c182a244-2c74-48f1-acca-41839604c87b', + name: 'Jelle R. Dalenberg', + }, + public: true, + permissions: { + id: 'ds001491', + userPermissions: [ + { + userId: 'c182a244-2c74-48f1-acca-41839604c87b', + level: 'admin', + access: 'admin', + user: { + id: 'c182a244-2c74-48f1-acca-41839604c87b', + name: 'Jelle R. Dalenberg', + email: 'jelle.dalenberg@yale.edu', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds001491', + summary: { + modalities: ['T1w', 'bold'], + sessions: [], + subjects: [ + '01', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + ], + subjectMetadata: null, + tasks: [ + 'task-FlavorRun1', + 'task-FlavorRun2', + 'task-FlavorRun3', + 'task-FlavorRun4', + 'task-images', + ], + size: 10821515433, + totalFiles: 3505, + dataProcessed: null, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Valence processing differs across stimulus modalities (Multi-echo)', + }, + }, + analytics: { + views: 22681, + downloads: 9, + }, + stars: [ + { + userId: '442ead0d-01ad-4c1c-b4da-6391c65dc3b5', + datasetId: 'ds001491', + }, + { + userId: '9e09a097-963a-4ea5-bc40-a3d0b0f0420d', + datasetId: 'ds001491', + }, + { + userId: '945edaee-8258-4906-a09e-12448e3e6e27', + datasetId: 'ds001491', + }, + { + userId: '4a1b11a2-0b7d-45d1-902a-0cea37ff6536', + datasetId: 'ds001491', + }, + ], + followers: [ + { + userId: 'c182a244-2c74-48f1-acca-41839604c87b', + datasetId: 'ds001491', + }, + { + userId: '9e09a097-963a-4ea5-bc40-a3d0b0f0420d', + datasetId: 'ds001491', + }, + ], + snapshots: [ + { + id: 'ds001491:1.0.0', + created: '2018-08-31T22:06:07.648Z', + tag: '1.0.0', + }, + ], + }, + }, + { + node: { + id: 'ds000221', + created: '2018-03-23T17:13:17.439Z', + uploader: { + id: '9baa8f9f-55a4-49bc-a9cb-8d7f99a8e6e8', + name: 'Franklin Feingold', + }, + public: true, + permissions: { + id: 'ds000221', + userPermissions: [ + { + userId: '2754d0bc-f596-4e99-9038-622cc5282d77', + level: 'admin', + access: 'admin', + user: { + id: '2754d0bc-f596-4e99-9038-622cc5282d77', + name: 'Anahid Babayan', + email: 'anahid.babayan@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds000221', + summary: { + modalities: [ + 'FLAIR', + 'bold', + 'T2w', + 'dwi', + 'T1w', + 'fieldmap', + 'fieldmap', + ], + sessions: ['02', '01'], + subjects: [ + '010001', + '010002', + '010003', + '010004', + '010005', + '010006', + '010007', + '010008', + '010009', + '010010', + '010011', + '010012', + '010014', + '010015', + '010016', + '010017', + '010018', + '010019', + '010020', + '010021', + '010022', + '010023', + '010024', + '010025', + '010026', + '010027', + '010028', + '010029', + '010030', + '010031', + '010032', + '010033', + '010034', + '010035', + '010036', + '010037', + '010038', + '010039', + '010040', + '010041', + '010042', + '010043', + '010044', + '010045', + '010046', + '010047', + '010048', + '010049', + '010050', + '010051', + '010052', + '010053', + '010054', + '010055', + '010056', + '010057', + '010058', + '010059', + '010060', + '010061', + '010062', + '010063', + '010064', + '010065', + '010066', + '010067', + '010068', + '010069', + '010070', + '010071', + '010072', + '010073', + '010074', + '010075', + '010076', + '010077', + '010078', + '010079', + '010080', + '010081', + '010082', + '010083', + '010084', + '010085', + '010086', + '010087', + '010088', + '010089', + '010090', + '010091', + '010092', + '010093', + '010094', + '010096', + '010097', + '010098', + '010099', + '010100', + '010101', + '010102', + '010103', + '010104', + '010105', + '010106', + '010107', + '010108', + '010109', + '010110', + '010111', + '010112', + '010113', + '010114', + '010115', + '010116', + '010117', + '010118', + '010119', + '010120', + '010121', + '010122', + '010123', + '010124', + '010125', + '010126', + '010127', + '010128', + '010129', + '010130', + '010131', + '010132', + '010133', + '010134', + '010135', + '010136', + '010137', + '010138', + '010139', + '010140', + '010141', + '010142', + '010143', + '010144', + '010145', + '010146', + '010147', + '010148', + '010149', + '010150', + '010151', + '010152', + '010153', + '010154', + '010155', + '010156', + '010157', + '010158', + '010159', + '010160', + '010161', + '010162', + '010163', + '010164', + '010165', + '010166', + '010167', + '010168', + '010169', + '010170', + '010171', + '010172', + '010173', + '010174', + '010175', + '010176', + '010177', + '010178', + '010179', + '010180', + '010181', + '010182', + '010183', + '010184', + '010185', + '010186', + '010187', + '010188', + '010189', + '010190', + '010191', + '010192', + '010193', + '010194', + '010195', + '010196', + '010197', + '010198', + '010199', + '010200', + '010201', + '010202', + '010203', + '010204', + '010205', + '010206', + '010207', + '010208', + '010209', + '010210', + '010211', + '010212', + '010213', + '010214', + '010215', + '010216', + '010217', + '010218', + '010219', + '010220', + '010221', + '010222', + '010223', + '010224', + '010225', + '010226', + '010227', + '010228', + '010229', + '010230', + '010231', + '010232', + '010233', + '010234', + '010235', + '010236', + '010237', + '010238', + '010239', + '010240', + '010241', + '010242', + '010243', + '010244', + '010245', + '010246', + '010247', + '010249', + '010250', + '010251', + '010252', + '010253', + '010254', + '010255', + '010256', + '010257', + '010258', + '010259', + '010260', + '010261', + '010262', + '010263', + '010264', + '010265', + '010266', + '010267', + '010268', + '010269', + '010270', + '010271', + '010272', + '010273', + '010274', + '010275', + '010276', + '010277', + '010278', + '010279', + '010280', + '010281', + '010282', + '010283', + '010284', + '010285', + '010286', + '010287', + '010288', + '010289', + '010290', + '010291', + '010292', + '010293', + '010294', + '010295', + '010296', + '010297', + '010298', + '010299', + '010300', + '010301', + '010302', + '010303', + '010304', + '010305', + '010306', + '010307', + '010308', + '010309', + '010310', + '010311', + '010312', + '010313', + '010314', + '010315', + '010316', + '010317', + '010318', + '010319', + '010320', + '010321', + ], + subjectMetadata: [ + { + participantId: '010001', + age: null, + sex: null, + group: null, + }, + { + participantId: '010002', + age: null, + sex: null, + group: null, + }, + { + participantId: '010004', + age: null, + sex: null, + group: null, + }, + { + participantId: '010005', + age: null, + sex: null, + group: null, + }, + { + participantId: '010006', + age: null, + sex: null, + group: null, + }, + { + participantId: '010007', + age: null, + sex: null, + group: null, + }, + { + participantId: '010008', + age: null, + sex: null, + group: null, + }, + { + participantId: '010009', + age: null, + sex: null, + group: null, + }, + { + participantId: '010011', + age: null, + sex: null, + group: null, + }, + { + participantId: '010012', + age: null, + sex: null, + group: null, + }, + { + participantId: '010014', + age: null, + sex: null, + group: null, + }, + { + participantId: '010015', + age: null, + sex: null, + group: null, + }, + { + participantId: '010016', + age: null, + sex: null, + group: null, + }, + { + participantId: '010017', + age: null, + sex: null, + group: null, + }, + { + participantId: '010018', + age: null, + sex: null, + group: null, + }, + { + participantId: '010019', + age: null, + sex: null, + group: null, + }, + { + participantId: '010020', + age: null, + sex: null, + group: null, + }, + { + participantId: '010021', + age: null, + sex: null, + group: null, + }, + { + participantId: '010003', + age: null, + sex: null, + group: null, + }, + { + participantId: '010010', + age: null, + sex: null, + group: null, + }, + { + participantId: '010100', + age: null, + sex: null, + group: null, + }, + { + participantId: '010022', + age: null, + sex: null, + group: null, + }, + { + participantId: '010023', + age: null, + sex: null, + group: null, + }, + { + participantId: '010024', + age: null, + sex: null, + group: null, + }, + { + participantId: '010104', + age: null, + sex: null, + group: null, + }, + { + participantId: '010321', + age: null, + sex: null, + group: null, + }, + { + participantId: '010110', + age: null, + sex: null, + group: null, + }, + { + participantId: '010134', + age: null, + sex: null, + group: null, + }, + { + participantId: '010150', + age: null, + sex: null, + group: null, + }, + { + participantId: '010169', + age: null, + sex: null, + group: null, + }, + { + participantId: '010025', + age: null, + sex: null, + group: null, + }, + { + participantId: '010026', + age: null, + sex: null, + group: null, + }, + { + participantId: '010027', + age: null, + sex: null, + group: null, + }, + { + participantId: '010320', + age: null, + sex: null, + group: null, + }, + { + participantId: '010028', + age: null, + sex: null, + group: null, + }, + { + participantId: '010029', + age: null, + sex: null, + group: null, + }, + { + participantId: '010030', + age: null, + sex: null, + group: null, + }, + { + participantId: '010031', + age: null, + sex: null, + group: null, + }, + { + participantId: '010032', + age: null, + sex: null, + group: null, + }, + { + participantId: '010033', + age: null, + sex: null, + group: null, + }, + { + participantId: '010034', + age: null, + sex: null, + group: null, + }, + { + participantId: '010170', + age: null, + sex: null, + group: null, + }, + { + participantId: '010035', + age: null, + sex: null, + group: null, + }, + { + participantId: '010183', + age: null, + sex: null, + group: null, + }, + { + participantId: '010197', + age: null, + sex: null, + group: null, + }, + { + participantId: '010036', + age: null, + sex: null, + group: null, + }, + { + participantId: '010037', + age: null, + sex: null, + group: null, + }, + { + participantId: '010199', + age: null, + sex: null, + group: null, + }, + { + participantId: '010202', + age: null, + sex: null, + group: null, + }, + { + participantId: '010038', + age: null, + sex: null, + group: null, + }, + { + participantId: '010039', + age: null, + sex: null, + group: null, + }, + { + participantId: '010207', + age: null, + sex: null, + group: null, + }, + { + participantId: '010040', + age: null, + sex: null, + group: null, + }, + { + participantId: '010041', + age: null, + sex: null, + group: null, + }, + { + participantId: '010042', + age: null, + sex: null, + group: null, + }, + { + participantId: '010219', + age: null, + sex: null, + group: null, + }, + { + participantId: '010043', + age: null, + sex: null, + group: null, + }, + { + participantId: '010222', + age: null, + sex: null, + group: null, + }, + { + participantId: '010044', + age: null, + sex: null, + group: null, + }, + { + participantId: '010045', + age: null, + sex: null, + group: null, + }, + { + participantId: '010046', + age: null, + sex: null, + group: null, + }, + { + participantId: '010047', + age: null, + sex: null, + group: null, + }, + { + participantId: '010048', + age: null, + sex: null, + group: null, + }, + { + participantId: '010223', + age: null, + sex: null, + group: null, + }, + { + participantId: '010049', + age: null, + sex: null, + group: null, + }, + { + participantId: '010234', + age: null, + sex: null, + group: null, + }, + { + participantId: '010050', + age: null, + sex: null, + group: null, + }, + { + participantId: '010051', + age: null, + sex: null, + group: null, + }, + { + participantId: '010235', + age: null, + sex: null, + group: null, + }, + { + participantId: '010052', + age: null, + sex: null, + group: null, + }, + { + participantId: '010053', + age: null, + sex: null, + group: null, + }, + { + participantId: '010054', + age: null, + sex: null, + group: null, + }, + { + participantId: '010055', + age: null, + sex: null, + group: null, + }, + { + participantId: '010056', + age: null, + sex: null, + group: null, + }, + { + participantId: '010057', + age: null, + sex: null, + group: null, + }, + { + participantId: '010058', + age: null, + sex: null, + group: null, + }, + { + participantId: '010059', + age: null, + sex: null, + group: null, + }, + { + participantId: '010060', + age: null, + sex: null, + group: null, + }, + { + participantId: '010061', + age: null, + sex: null, + group: null, + }, + { + participantId: '010062', + age: null, + sex: null, + group: null, + }, + { + participantId: '010063', + age: null, + sex: null, + group: null, + }, + { + participantId: '010064', + age: null, + sex: null, + group: null, + }, + { + participantId: '010065', + age: null, + sex: null, + group: null, + }, + { + participantId: '010066', + age: null, + sex: null, + group: null, + }, + { + participantId: '010236', + age: null, + sex: null, + group: null, + }, + { + participantId: '010067', + age: null, + sex: null, + group: null, + }, + { + participantId: '010237', + age: null, + sex: null, + group: null, + }, + { + participantId: '010068', + age: null, + sex: null, + group: null, + }, + { + participantId: '010069', + age: null, + sex: null, + group: null, + }, + { + participantId: '010070', + age: null, + sex: null, + group: null, + }, + { + participantId: '010238', + age: null, + sex: null, + group: null, + }, + { + participantId: '010071', + age: null, + sex: null, + group: null, + }, + { + participantId: '010072', + age: null, + sex: null, + group: null, + }, + { + participantId: '010073', + age: null, + sex: null, + group: null, + }, + { + participantId: '010074', + age: null, + sex: null, + group: null, + }, + { + participantId: '010075', + age: null, + sex: null, + group: null, + }, + { + participantId: '010076', + age: null, + sex: null, + group: null, + }, + { + participantId: '010077', + age: null, + sex: null, + group: null, + }, + { + participantId: '010078', + age: null, + sex: null, + group: null, + }, + { + participantId: '010239', + age: null, + sex: null, + group: null, + }, + { + participantId: '010079', + age: null, + sex: null, + group: null, + }, + { + participantId: '010080', + age: null, + sex: null, + group: null, + }, + { + participantId: '010240', + age: null, + sex: null, + group: null, + }, + { + participantId: '010081', + age: null, + sex: null, + group: null, + }, + { + participantId: '010082', + age: null, + sex: null, + group: null, + }, + { + participantId: '010083', + age: null, + sex: null, + group: null, + }, + { + participantId: '010084', + age: null, + sex: null, + group: null, + }, + { + participantId: '010241', + age: null, + sex: null, + group: null, + }, + { + participantId: '010085', + age: null, + sex: null, + group: null, + }, + { + participantId: '010242', + age: null, + sex: null, + group: null, + }, + { + participantId: '010086', + age: null, + sex: null, + group: null, + }, + { + participantId: '010087', + age: null, + sex: null, + group: null, + }, + { + participantId: '010243', + age: null, + sex: null, + group: null, + }, + { + participantId: '010244', + age: null, + sex: null, + group: null, + }, + { + participantId: '010245', + age: null, + sex: null, + group: null, + }, + { + participantId: '010246', + age: null, + sex: null, + group: null, + }, + { + participantId: '010088', + age: null, + sex: null, + group: null, + }, + { + participantId: '010089', + age: null, + sex: null, + group: null, + }, + { + participantId: '010090', + age: null, + sex: null, + group: null, + }, + { + participantId: '010091', + age: null, + sex: null, + group: null, + }, + { + participantId: '010247', + age: null, + sex: null, + group: null, + }, + { + participantId: '010249', + age: null, + sex: null, + group: null, + }, + { + participantId: '010092', + age: null, + sex: null, + group: null, + }, + { + participantId: '010093', + age: null, + sex: null, + group: null, + }, + { + participantId: '010250', + age: null, + sex: null, + group: null, + }, + { + participantId: '010251', + age: null, + sex: null, + group: null, + }, + { + participantId: '010094', + age: null, + sex: null, + group: null, + }, + { + participantId: '010252', + age: null, + sex: null, + group: null, + }, + { + participantId: '010253', + age: null, + sex: null, + group: null, + }, + { + participantId: '010096', + age: null, + sex: null, + group: null, + }, + { + participantId: '010097', + age: null, + sex: null, + group: null, + }, + { + participantId: '010098', + age: null, + sex: null, + group: null, + }, + { + participantId: '010099', + age: null, + sex: null, + group: null, + }, + { + participantId: '010101', + age: null, + sex: null, + group: null, + }, + { + participantId: '010102', + age: null, + sex: null, + group: null, + }, + { + participantId: '010103', + age: null, + sex: null, + group: null, + }, + { + participantId: '010105', + age: null, + sex: null, + group: null, + }, + { + participantId: '010106', + age: null, + sex: null, + group: null, + }, + { + participantId: '010107', + age: null, + sex: null, + group: null, + }, + { + participantId: '010108', + age: null, + sex: null, + group: null, + }, + { + participantId: '010109', + age: null, + sex: null, + group: null, + }, + { + participantId: '010111', + age: null, + sex: null, + group: null, + }, + { + participantId: '010112', + age: null, + sex: null, + group: null, + }, + { + participantId: '010113', + age: null, + sex: null, + group: null, + }, + { + participantId: '010114', + age: null, + sex: null, + group: null, + }, + { + participantId: '010115', + age: null, + sex: null, + group: null, + }, + { + participantId: '010116', + age: null, + sex: null, + group: null, + }, + { + participantId: '010117', + age: null, + sex: null, + group: null, + }, + { + participantId: '010118', + age: null, + sex: null, + group: null, + }, + { + participantId: '010119', + age: null, + sex: null, + group: null, + }, + { + participantId: '010120', + age: null, + sex: null, + group: null, + }, + { + participantId: '010121', + age: null, + sex: null, + group: null, + }, + { + participantId: '010122', + age: null, + sex: null, + group: null, + }, + { + participantId: '010123', + age: null, + sex: null, + group: null, + }, + { + participantId: '010124', + age: null, + sex: null, + group: null, + }, + { + participantId: '010125', + age: null, + sex: null, + group: null, + }, + { + participantId: '010126', + age: null, + sex: null, + group: null, + }, + { + participantId: '010254', + age: null, + sex: null, + group: null, + }, + { + participantId: '010127', + age: null, + sex: null, + group: null, + }, + { + participantId: '010128', + age: null, + sex: null, + group: null, + }, + { + participantId: '010255', + age: null, + sex: null, + group: null, + }, + { + participantId: '010129', + age: null, + sex: null, + group: null, + }, + { + participantId: '010130', + age: null, + sex: null, + group: null, + }, + { + participantId: '010131', + age: null, + sex: null, + group: null, + }, + { + participantId: '010132', + age: null, + sex: null, + group: null, + }, + { + participantId: '010133', + age: null, + sex: null, + group: null, + }, + { + participantId: '010135', + age: null, + sex: null, + group: null, + }, + { + participantId: '010136', + age: null, + sex: null, + group: null, + }, + { + participantId: '010137', + age: null, + sex: null, + group: null, + }, + { + participantId: '010256', + age: null, + sex: null, + group: null, + }, + { + participantId: '010138', + age: null, + sex: null, + group: null, + }, + { + participantId: '010139', + age: null, + sex: null, + group: null, + }, + { + participantId: '010257', + age: null, + sex: null, + group: null, + }, + { + participantId: '010258', + age: null, + sex: null, + group: null, + }, + { + participantId: '010259', + age: null, + sex: null, + group: null, + }, + { + participantId: '010260', + age: null, + sex: null, + group: null, + }, + { + participantId: '010140', + age: null, + sex: null, + group: null, + }, + { + participantId: '010141', + age: null, + sex: null, + group: null, + }, + { + participantId: '010142', + age: null, + sex: null, + group: null, + }, + { + participantId: '010143', + age: null, + sex: null, + group: null, + }, + { + participantId: '010261', + age: null, + sex: null, + group: null, + }, + { + participantId: '010262', + age: null, + sex: null, + group: null, + }, + { + participantId: '010144', + age: null, + sex: null, + group: null, + }, + { + participantId: '010145', + age: null, + sex: null, + group: null, + }, + { + participantId: '010263', + age: null, + sex: null, + group: null, + }, + { + participantId: '010264', + age: null, + sex: null, + group: null, + }, + { + participantId: '010146', + age: null, + sex: null, + group: null, + }, + { + participantId: '010147', + age: null, + sex: null, + group: null, + }, + { + participantId: '010148', + age: null, + sex: null, + group: null, + }, + { + participantId: '010149', + age: null, + sex: null, + group: null, + }, + { + participantId: '010151', + age: null, + sex: null, + group: null, + }, + { + participantId: '010152', + age: null, + sex: null, + group: null, + }, + { + participantId: '010153', + age: null, + sex: null, + group: null, + }, + { + participantId: '010154', + age: null, + sex: null, + group: null, + }, + { + participantId: '010265', + age: null, + sex: null, + group: null, + }, + { + participantId: '010155', + age: null, + sex: null, + group: null, + }, + { + participantId: '010266', + age: null, + sex: null, + group: null, + }, + { + participantId: '010156', + age: null, + sex: null, + group: null, + }, + { + participantId: '010267', + age: null, + sex: null, + group: null, + }, + { + participantId: '010268', + age: null, + sex: null, + group: null, + }, + { + participantId: '010269', + age: null, + sex: null, + group: null, + }, + { + participantId: '010270', + age: null, + sex: null, + group: null, + }, + { + participantId: '010271', + age: null, + sex: null, + group: null, + }, + { + participantId: '010272', + age: null, + sex: null, + group: null, + }, + { + participantId: '010157', + age: null, + sex: null, + group: null, + }, + { + participantId: '010158', + age: null, + sex: null, + group: null, + }, + { + participantId: '010159', + age: null, + sex: null, + group: null, + }, + { + participantId: '010160', + age: null, + sex: null, + group: null, + }, + { + participantId: '010161', + age: null, + sex: null, + group: null, + }, + { + participantId: '010273', + age: null, + sex: null, + group: null, + }, + { + participantId: '010162', + age: null, + sex: null, + group: null, + }, + { + participantId: '010163', + age: null, + sex: null, + group: null, + }, + { + participantId: '010164', + age: null, + sex: null, + group: null, + }, + { + participantId: '010165', + age: null, + sex: null, + group: null, + }, + { + participantId: '010166', + age: null, + sex: null, + group: null, + }, + { + participantId: '010167', + age: null, + sex: null, + group: null, + }, + { + participantId: '010274', + age: null, + sex: null, + group: null, + }, + { + participantId: '010275', + age: null, + sex: null, + group: null, + }, + { + participantId: '010168', + age: null, + sex: null, + group: null, + }, + { + participantId: '010171', + age: null, + sex: null, + group: null, + }, + { + participantId: '010172', + age: null, + sex: null, + group: null, + }, + { + participantId: '010173', + age: null, + sex: null, + group: null, + }, + { + participantId: '010174', + age: null, + sex: null, + group: null, + }, + { + participantId: '010175', + age: null, + sex: null, + group: null, + }, + { + participantId: '010176', + age: null, + sex: null, + group: null, + }, + { + participantId: '010177', + age: null, + sex: null, + group: null, + }, + { + participantId: '010178', + age: null, + sex: null, + group: null, + }, + { + participantId: '010276', + age: null, + sex: null, + group: null, + }, + { + participantId: '010179', + age: null, + sex: null, + group: null, + }, + { + participantId: '010180', + age: null, + sex: null, + group: null, + }, + { + participantId: '010181', + age: null, + sex: null, + group: null, + }, + { + participantId: '010277', + age: null, + sex: null, + group: null, + }, + { + participantId: '010278', + age: null, + sex: null, + group: null, + }, + { + participantId: '010279', + age: null, + sex: null, + group: null, + }, + { + participantId: '010280', + age: null, + sex: null, + group: null, + }, + { + participantId: '010182', + age: null, + sex: null, + group: null, + }, + { + participantId: '010281', + age: null, + sex: null, + group: null, + }, + { + participantId: '010282', + age: null, + sex: null, + group: null, + }, + { + participantId: '010184', + age: null, + sex: null, + group: null, + }, + { + participantId: '010185', + age: null, + sex: null, + group: null, + }, + { + participantId: '010186', + age: null, + sex: null, + group: null, + }, + { + participantId: '010187', + age: null, + sex: null, + group: null, + }, + { + participantId: '010188', + age: null, + sex: null, + group: null, + }, + { + participantId: '010189', + age: null, + sex: null, + group: null, + }, + { + participantId: '010190', + age: null, + sex: null, + group: null, + }, + { + participantId: '010283', + age: null, + sex: null, + group: null, + }, + { + participantId: '010284', + age: null, + sex: null, + group: null, + }, + { + participantId: '010285', + age: null, + sex: null, + group: null, + }, + { + participantId: '010286', + age: null, + sex: null, + group: null, + }, + { + participantId: '010287', + age: null, + sex: null, + group: null, + }, + { + participantId: '010288', + age: null, + sex: null, + group: null, + }, + { + participantId: '010289', + age: null, + sex: null, + group: null, + }, + { + participantId: '010290', + age: null, + sex: null, + group: null, + }, + { + participantId: '010291', + age: null, + sex: null, + group: null, + }, + { + participantId: '010191', + age: null, + sex: null, + group: null, + }, + { + participantId: '010292', + age: null, + sex: null, + group: null, + }, + { + participantId: '010293', + age: null, + sex: null, + group: null, + }, + { + participantId: '010192', + age: null, + sex: null, + group: null, + }, + { + participantId: '010193', + age: null, + sex: null, + group: null, + }, + { + participantId: '010294', + age: null, + sex: null, + group: null, + }, + { + participantId: '010194', + age: null, + sex: null, + group: null, + }, + { + participantId: '010295', + age: null, + sex: null, + group: null, + }, + { + participantId: '010195', + age: null, + sex: null, + group: null, + }, + { + participantId: '010296', + age: null, + sex: null, + group: null, + }, + { + participantId: '010297', + age: null, + sex: null, + group: null, + }, + { + participantId: '010196', + age: null, + sex: null, + group: null, + }, + { + participantId: '010298', + age: null, + sex: null, + group: null, + }, + { + participantId: '010198', + age: null, + sex: null, + group: null, + }, + { + participantId: '010200', + age: null, + sex: null, + group: null, + }, + { + participantId: '010299', + age: null, + sex: null, + group: null, + }, + { + participantId: '010201', + age: null, + sex: null, + group: null, + }, + { + participantId: '010300', + age: null, + sex: null, + group: null, + }, + { + participantId: '010203', + age: null, + sex: null, + group: null, + }, + { + participantId: '010204', + age: null, + sex: null, + group: null, + }, + { + participantId: '010205', + age: null, + sex: null, + group: null, + }, + { + participantId: '010206', + age: null, + sex: null, + group: null, + }, + { + participantId: '010208', + age: null, + sex: null, + group: null, + }, + { + participantId: '010209', + age: null, + sex: null, + group: null, + }, + { + participantId: '010210', + age: null, + sex: null, + group: null, + }, + { + participantId: '010319', + age: null, + sex: null, + group: null, + }, + { + participantId: '010211', + age: null, + sex: null, + group: null, + }, + { + participantId: '010212', + age: null, + sex: null, + group: null, + }, + { + participantId: '010213', + age: null, + sex: null, + group: null, + }, + { + participantId: '010214', + age: null, + sex: null, + group: null, + }, + { + participantId: '010215', + age: null, + sex: null, + group: null, + }, + { + participantId: '010216', + age: null, + sex: null, + group: null, + }, + { + participantId: '010217', + age: null, + sex: null, + group: null, + }, + { + participantId: '010301', + age: null, + sex: null, + group: null, + }, + { + participantId: '010218', + age: null, + sex: null, + group: null, + }, + { + participantId: '010302', + age: null, + sex: null, + group: null, + }, + { + participantId: '010303', + age: null, + sex: null, + group: null, + }, + { + participantId: '010304', + age: null, + sex: null, + group: null, + }, + { + participantId: '010305', + age: null, + sex: null, + group: null, + }, + { + participantId: '010306', + age: null, + sex: null, + group: null, + }, + { + participantId: '010220', + age: null, + sex: null, + group: null, + }, + { + participantId: '010307', + age: null, + sex: null, + group: null, + }, + { + participantId: '010308', + age: null, + sex: null, + group: null, + }, + { + participantId: '010221', + age: null, + sex: null, + group: null, + }, + { + participantId: '010309', + age: null, + sex: null, + group: null, + }, + { + participantId: '010224', + age: null, + sex: null, + group: null, + }, + { + participantId: '010310', + age: null, + sex: null, + group: null, + }, + { + participantId: '010225', + age: null, + sex: null, + group: null, + }, + { + participantId: '010311', + age: null, + sex: null, + group: null, + }, + { + participantId: '010312', + age: null, + sex: null, + group: null, + }, + { + participantId: '010313', + age: null, + sex: null, + group: null, + }, + { + participantId: '010314', + age: null, + sex: null, + group: null, + }, + { + participantId: '010226', + age: null, + sex: null, + group: null, + }, + { + participantId: '010227', + age: null, + sex: null, + group: null, + }, + { + participantId: '010228', + age: null, + sex: null, + group: null, + }, + { + participantId: '010315', + age: null, + sex: null, + group: null, + }, + { + participantId: '010316', + age: null, + sex: null, + group: null, + }, + { + participantId: '010229', + age: null, + sex: null, + group: null, + }, + { + participantId: '010230', + age: null, + sex: null, + group: null, + }, + { + participantId: '010231', + age: null, + sex: null, + group: null, + }, + { + participantId: '010232', + age: null, + sex: null, + group: null, + }, + { + participantId: '010317', + age: null, + sex: null, + group: null, + }, + { + participantId: '010233', + age: null, + sex: null, + group: null, + }, + { + participantId: '010318', + age: null, + sex: null, + group: null, + }, + ], + tasks: ['Rest'], + size: 397053522729, + totalFiles: 12040, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Unnamed Dataset', + }, + }, + analytics: { + views: 293798, + downloads: 627, + }, + stars: [ + { + userId: '8467133f-7467-4d27-a53a-fec596adf00c', + datasetId: 'ds000221', + }, + { + userId: 'ce662944-a4a8-4b56-b922-565c1a961439', + datasetId: 'ds000221', + }, + { + userId: 'e2334667-4594-45d9-8a91-aaa8c917c905', + datasetId: 'ds000221', + }, + { + userId: '9e09a097-963a-4ea5-bc40-a3d0b0f0420d', + datasetId: 'ds000221', + }, + { + userId: '0ddc6ce6-0841-445d-9ac3-db212101b2fd', + datasetId: 'ds000221', + }, + { + userId: '672c31f1-84c4-4375-b2f9-0644d3491ced', + datasetId: 'ds000221', + }, + { + userId: 'b6b88f27-7c27-45f3-9849-c1da949603a8', + datasetId: 'ds000221', + }, + { + userId: 'c95dfb2f-3373-4c13-b8a1-af282710b821', + datasetId: 'ds000221', + }, + { + userId: '930d6b52-8baf-4d53-a43f-227478fd2be2', + datasetId: 'ds000221', + }, + { + userId: 'd8acf9eb-a543-414f-8d7a-0f222ffece1b', + datasetId: 'ds000221', + }, + { + userId: 'a316d803-068d-4351-b980-beb6f97196fe', + datasetId: 'ds000221', + }, + { + userId: '1b7e35c6-8612-4114-a25a-607cb341b553', + datasetId: 'ds000221', + }, + { + userId: 'fc1551b7-84df-4b09-b4f8-e375c5b8d7e3', + datasetId: 'ds000221', + }, + { + userId: 'c1614b5f-b088-48cb-a030-b894a7f67c74', + datasetId: 'ds000221', + }, + { + userId: '84aed7d6-5667-4b68-8d44-c912dd8a5493', + datasetId: 'ds000221', + }, + { + userId: '645a83ac-3c72-4258-99f8-85e9935ec746', + datasetId: 'ds000221', + }, + { + userId: 'f729dfc3-3cab-48b8-8fd3-053ee1b56ede', + datasetId: 'ds000221', + }, + { + userId: '4939f101-4695-41d0-96af-63e2c35598df', + datasetId: 'ds000221', + }, + { + userId: '945edaee-8258-4906-a09e-12448e3e6e27', + datasetId: 'ds000221', + }, + { + userId: 'd72f1f02-7e7a-4af1-9f36-dee076913e8b', + datasetId: 'ds000221', + }, + { + userId: 'df0fd1b6-467f-48d5-866d-363fcb596aa1', + datasetId: 'ds000221', + }, + { + userId: '0078e9ae-1b20-4243-8b0e-8ceba8cfb528', + datasetId: 'ds000221', + }, + { + userId: '4bf3ef06-3804-4e3f-9235-6f3bcfe3909f', + datasetId: 'ds000221', + }, + { + userId: 'c837eca6-4812-465d-b38a-aad6b6f41f83', + datasetId: 'ds000221', + }, + { + userId: '761f3e38-c88a-4fc5-a32a-1e433cb94a80', + datasetId: 'ds000221', + }, + { + userId: '4a1b11a2-0b7d-45d1-902a-0cea37ff6536', + datasetId: 'ds000221', + }, + { + userId: '01a23077-b9a3-4858-b073-6918d96a85c9', + datasetId: 'ds000221', + }, + { + userId: '0d84128c-e911-49a6-84e1-a04c06f7a672', + datasetId: 'ds000221', + }, + ], + followers: [ + { + userId: 'ce662944-a4a8-4b56-b922-565c1a961439', + datasetId: 'ds000221', + }, + { + userId: 'cfd40cc9-bdae-49ea-ba15-0d7477070784', + datasetId: 'ds000221', + }, + { + userId: 'a316d803-068d-4351-b980-beb6f97196fe', + datasetId: 'ds000221', + }, + { + userId: '2ed15b25-3b63-40cd-8693-893fbb36d33a', + datasetId: 'ds000221', + }, + { + userId: '930d6b52-8baf-4d53-a43f-227478fd2be2', + datasetId: 'ds000221', + }, + { + userId: '9e09a097-963a-4ea5-bc40-a3d0b0f0420d', + datasetId: 'ds000221', + }, + { + userId: 'c95dfb2f-3373-4c13-b8a1-af282710b821', + datasetId: 'ds000221', + }, + { + userId: 'b6b88f27-7c27-45f3-9849-c1da949603a8', + datasetId: 'ds000221', + }, + { + userId: 'e2334667-4594-45d9-8a91-aaa8c917c905', + datasetId: 'ds000221', + }, + { + userId: '8467133f-7467-4d27-a53a-fec596adf00c', + datasetId: 'ds000221', + }, + { + userId: '645a83ac-3c72-4258-99f8-85e9935ec746', + datasetId: 'ds000221', + }, + { + userId: 'd72f1f02-7e7a-4af1-9f36-dee076913e8b', + datasetId: 'ds000221', + }, + { + userId: '4bf3ef06-3804-4e3f-9235-6f3bcfe3909f', + datasetId: 'ds000221', + }, + ], + snapshots: [ + { + id: 'ds000221:00001', + created: '2018-07-17T06:23:43.529Z', + tag: '00001', + }, + { + id: 'ds000221:00002', + created: '2018-07-17T13:05:10.909Z', + tag: '00002', + }, + { + id: 'ds000221:1.0.0', + created: '2020-07-22T19:18:12.254Z', + tag: '1.0.0', + }, + ], + }, + }, + { + node: { + id: 'ds002734', + created: '2020-04-24T17:45:44.338Z', + uploader: { + id: '05519bf3-c02a-413e-a9ac-3de57f79057e', + name: 'Joe Wexler', + }, + public: true, + permissions: { + id: 'ds002734', + userPermissions: [ + { + userId: '60a0dcb4-46c9-4418-a96c-2385940ef75e', + level: 'admin', + access: 'admin', + user: { + id: '60a0dcb4-46c9-4418-a96c-2385940ef75e', + name: 'Andrea Pisauro', + email: 'andrea.pisauro@gmail.com', + provider: 'google', + }, + }, + { + userId: '05519bf3-c02a-413e-a9ac-3de57f79057e', + level: 'admin', + access: 'admin', + user: { + id: '05519bf3-c02a-413e-a9ac-3de57f79057e', + name: 'Joe Wexler', + email: 'jbwexler@tutanota.com', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds002734', + summary: { + modalities: ['T1w', 'bold', 'events'], + sessions: [], + subjects: [ + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + ], + subjectMetadata: null, + tasks: ['main'], + size: 4067685017, + totalFiles: 114, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Evidence Accumulation in Value-Based decisions', + }, + }, + analytics: { + views: 22308, + downloads: 55, + }, + stars: [ + { + userId: '5b20ed3a-3dc2-4333-ae5d-c9eb29d5425e', + datasetId: 'ds002734', + }, + { + userId: 'b96297a7-6d3c-41cb-a6aa-f249543f3e68', + datasetId: 'ds002734', + }, + { + userId: '2b949807-69c8-4066-9e2d-29f75779be2b', + datasetId: 'ds002734', + }, + ], + followers: [ + { + userId: '05519bf3-c02a-413e-a9ac-3de57f79057e', + datasetId: 'ds002734', + }, + ], + snapshots: [ + { + id: 'ds002734:1.0.0', + created: '2020-04-24T18:12:34.174Z', + tag: '1.0.0', + }, + { + id: 'ds002734:1.0.1', + created: '2020-04-27T22:30:04.911Z', + tag: '1.0.1', + }, + { + id: 'ds002734:1.0.2', + created: '2020-04-29T17:19:09.581Z', + tag: '1.0.2', + }, + ], + }, + }, + { + node: { + id: 'ds002419', + created: '2020-01-18T17:12:42.661Z', + uploader: { + id: 'c182a244-2c74-48f1-acca-41839604c87b', + name: 'Jelle R. Dalenberg', + }, + public: true, + permissions: { + id: 'ds002419', + userPermissions: [ + { + userId: 'c182a244-2c74-48f1-acca-41839604c87b', + level: 'admin', + access: 'admin', + user: { + id: 'c182a244-2c74-48f1-acca-41839604c87b', + name: 'Jelle R. Dalenberg', + email: 'jelle.dalenberg@yale.edu', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds002419', + summary: { + modalities: ['T1w', 'bold', 'events', 'fieldmap'], + sessions: ['scan1', 'scan2'], + subjects: [ + '1358', + '1473', + '1480', + '1482', + '1493', + '1502', + '1506', + '1511', + '1514', + '1519', + '1571', + '1596', + '1598', + '1610', + '1611', + '1615', + '1638', + '1643', + '1645', + '1665', + '1671', + '1678', + '1697', + '1700', + '1705', + '1710', + '1734', + '1752', + '1754', + '1756', + '1757', + '1766', + '1770', + '1780', + '1781', + '1797', + '1798', + '1803', + '1810', + '1813', + '1814', + '1815', + '1822', + '1824', + '1842', + '1843', + '1855', + '1856', + ], + subjectMetadata: [ + { + participantId: '1358', + age: 24, + sex: null, + group: 'sugar', + }, + { + participantId: '1473', + age: 36, + sex: null, + group: 'lcs', + }, + { + participantId: '1480', + age: 23, + sex: null, + group: 'lcs', + }, + { + participantId: '1482', + age: 29, + sex: null, + group: 'combo', + }, + { + participantId: '1493', + age: 25, + sex: null, + group: 'lcs', + }, + { + participantId: '1502', + age: 38, + sex: null, + group: 'combo', + }, + { + participantId: '1506', + age: 30, + sex: null, + group: 'lcs', + }, + { + participantId: '1511', + age: 23, + sex: null, + group: 'lcs', + }, + { + participantId: '1514', + age: 25, + sex: null, + group: 'lcs', + }, + { + participantId: '1519', + age: 26, + sex: null, + group: 'lcs', + }, + { + participantId: '1571', + age: 39, + sex: null, + group: 'sugar', + }, + { + participantId: '1596', + age: 25, + sex: null, + group: 'lcs', + }, + { + participantId: '1598', + age: 24, + sex: null, + group: 'lcs', + }, + { + participantId: '1610', + age: 26, + sex: null, + group: 'combo', + }, + { + participantId: '1611', + age: 30, + sex: null, + group: 'lcs', + }, + { + participantId: '1615', + age: 25, + sex: null, + group: 'lcs', + }, + { + participantId: '1638', + age: 31, + sex: null, + group: 'sugar', + }, + { + participantId: '1643', + age: 31, + sex: null, + group: 'lcs', + }, + { + participantId: '1645', + age: 26, + sex: null, + group: 'combo', + }, + { + participantId: '1665', + age: 36, + sex: null, + group: 'lcs', + }, + { + participantId: '1671', + age: 28, + sex: null, + group: 'lcs', + }, + { + participantId: '1678', + age: 29, + sex: null, + group: 'lcs', + }, + { + participantId: '1697', + age: 27, + sex: null, + group: 'combo', + }, + { + participantId: '1700', + age: 27, + sex: null, + group: 'sugar', + }, + { + participantId: '1705', + age: 24, + sex: null, + group: 'combo', + }, + { + participantId: '1710', + age: 28, + sex: null, + group: 'sugar', + }, + { + participantId: '1734', + age: 27, + sex: null, + group: 'combo', + }, + { + participantId: '1752', + age: 27, + sex: null, + group: 'combo', + }, + { + participantId: '1754', + age: 26, + sex: null, + group: 'sugar', + }, + { + participantId: '1756', + age: 24, + sex: null, + group: 'sugar', + }, + { + participantId: '1757', + age: 24, + sex: null, + group: 'sugar', + }, + { + participantId: '1766', + age: 25, + sex: null, + group: 'combo', + }, + { + participantId: '1770', + age: 29, + sex: null, + group: 'combo', + }, + { + participantId: '1780', + age: 27, + sex: null, + group: 'sugar', + }, + { + participantId: '1781', + age: 28, + sex: null, + group: 'combo', + }, + { + participantId: '1797', + age: 33, + sex: null, + group: 'combo', + }, + { + participantId: '1798', + age: 27, + sex: null, + group: 'sugar', + }, + { + participantId: '1803', + age: 23, + sex: null, + group: 'sugar', + }, + { + participantId: '1810', + age: 30, + sex: null, + group: 'sugar', + }, + { + participantId: '1813', + age: 28, + sex: null, + group: 'combo', + }, + { + participantId: '1814', + age: 31, + sex: null, + group: 'combo', + }, + { + participantId: '1815', + age: 23, + sex: null, + group: 'combo', + }, + { + participantId: '1822', + age: 33, + sex: null, + group: 'combo', + }, + { + participantId: '1824', + age: 27, + sex: null, + group: 'combo', + }, + { + participantId: '1842', + age: 29, + sex: null, + group: 'sugar', + }, + { + participantId: '1843', + age: 23, + sex: null, + group: 'combo', + }, + { + participantId: '1855', + age: 27, + sex: null, + group: 'sugar', + }, + { + participantId: '1856', + age: 24, + sex: null, + group: 'lcs', + }, + ], + tasks: ['task-taste1', 'task-taste2'], + size: 97979630256, + totalFiles: 830, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Short-term consumption of sucralose with, but not without, carbohydrate impairs neural and metabolic sensitivity to sugar', + }, + }, + analytics: { + views: 23825, + downloads: 45, + }, + stars: [ + { + userId: 'fbd9b377-515f-4168-b526-5f7bbf3d9c7f', + datasetId: 'ds002419', + }, + { + userId: '352440e2-4c63-45e9-b9f4-771fd0432dc3', + datasetId: 'ds002419', + }, + { + userId: '645a83ac-3c72-4258-99f8-85e9935ec746', + datasetId: 'ds002419', + }, + { + userId: '4a1b11a2-0b7d-45d1-902a-0cea37ff6536', + datasetId: 'ds002419', + }, + ], + followers: [ + { + userId: 'c182a244-2c74-48f1-acca-41839604c87b', + datasetId: 'ds002419', + }, + { + userId: '352440e2-4c63-45e9-b9f4-771fd0432dc3', + datasetId: 'ds002419', + }, + ], + snapshots: [ + { + id: 'ds002419:1.0.0', + created: '2020-01-21T09:39:53.535Z', + tag: '1.0.0', + }, + { + id: 'ds002419:1.0.1', + created: '2020-01-22T12:47:47.062Z', + tag: '1.0.1', + }, + { + id: 'ds002419:1.0.2', + created: '2020-01-26T09:24:25.149Z', + tag: '1.0.2', + }, + { + id: 'ds002419:1.0.3', + created: '2020-01-27T10:08:58.764Z', + tag: '1.0.3', + }, + ], + }, + }, + { + node: { + id: 'ds000214', + created: '2017-09-12T00:51:49.232Z', + uploader: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + }, + public: true, + permissions: { + id: 'ds000214', + userPermissions: [ + { + userId: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + level: 'admin', + access: 'admin', + user: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + email: 'poldrackexperiments@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds000214', + summary: { + modalities: ['T1w', 'bold'], + sessions: [], + subjects: [ + 'EESS001', + 'EESS002', + 'EESS003', + 'EESS004', + 'EESS005', + 'EESS006', + 'EESS007', + 'EESS008', + 'EESS009', + 'EESS010', + 'EESS011', + 'EESS012', + 'EESS013', + 'EESS014', + 'EESS015', + 'EESS017', + 'EESS018', + 'EESS019', + 'EESS021', + 'EESS022', + 'EESS023', + 'EESS024', + 'EESS025', + 'EESS026', + 'EESS027', + 'EESS029', + 'EESS030', + 'EESS031', + 'EESS033', + 'EESS034', + 'EESS035', + 'EESS036', + 'EESS037', + 'EESS038', + 'EESS039', + 'EESS040', + ], + subjectMetadata: null, + tasks: ['Cyberball'], + size: 2159540579, + totalFiles: 689, + dataProcessed: null, + }, + issues: [ + { + severity: 'error', + }, + ], + description: { + Name: 'EUPD Cyberball', + }, + }, + analytics: { + views: 27046, + downloads: 116, + }, + stars: [ + { + userId: '3c1c6e88-39db-4844-85e7-4902654387d4', + datasetId: 'ds000214', + }, + { + userId: '4a1b11a2-0b7d-45d1-902a-0cea37ff6536', + datasetId: 'ds000214', + }, + { + userId: 'a7ab2248-3463-49a6-8a44-cb0b63e14351', + datasetId: 'ds000214', + }, + ], + followers: [ + { + userId: '3c1c6e88-39db-4844-85e7-4902654387d4', + datasetId: 'ds000214', + }, + { + userId: '81115307-8a03-4c6a-aaa1-1f6cdee4a14d', + datasetId: 'ds000214', + }, + { + userId: 'a7ab2248-3463-49a6-8a44-cb0b63e14351', + datasetId: 'ds000214', + }, + ], + snapshots: [ + { + id: 'ds000214:00001', + created: '2018-07-17T18:58:26.851Z', + tag: '00001', + }, + ], + }, + }, + { + node: { + id: 'ds000116', + created: '2017-07-25T22:22:30.977Z', + uploader: { + id: 'c1d9de43-7fb0-4c28-8636-130a27a8db1f', + name: 'Chris Gorgolewski', + }, + public: true, + permissions: { + id: 'ds000116', + userPermissions: [ + { + userId: 'e5e1af24-01b3-4b73-b7aa-768d27f496dc', + level: 'admin', + access: 'admin', + user: { + id: 'e5e1af24-01b3-4b73-b7aa-768d27f496dc', + name: 'Jennifer Walz', + email: 'jennifer.m.walz@gmail.com', + provider: 'google', + }, + }, + { + userId: 'c1d9de43-7fb0-4c28-8636-130a27a8db1f', + level: 'admin', + access: 'admin', + user: { + id: 'c1d9de43-7fb0-4c28-8636-130a27a8db1f', + name: 'Chris Gorgolewski', + email: 'krzysztof.gorgolewski@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds000116', + summary: { + modalities: ['T1w', 'inplaneT2', 'bold'], + sessions: [], + subjects: [ + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + ], + subjectMetadata: null, + tasks: [ + 'auditory oddball with button response to target stimuli', + 'visual oddball with button response to target stimuli', + ], + size: 3305632448, + totalFiles: 1919, + dataProcessed: null, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Auditory and Visual Oddball EEG-fMRI', + }, + }, + analytics: { + views: 39003, + downloads: 545, + }, + stars: [ + { + userId: '1feb8b6c-f05e-46ee-a2ed-5a3384dfa60d', + datasetId: 'ds000116', + }, + { + userId: '58529c8d-ae1a-4e6a-8608-d40d5b3d9989', + datasetId: 'ds000116', + }, + { + userId: 'b3d82fb3-b49b-4970-9263-30d48882bb4e', + datasetId: 'ds000116', + }, + { + userId: '5b20ed3a-3dc2-4333-ae5d-c9eb29d5425e', + datasetId: 'ds000116', + }, + { + userId: 'f5ba2390-1aee-429e-a8bd-346e8e02aa5b', + datasetId: 'ds000116', + }, + { + userId: 'bc0577df-520b-43e9-a347-cd6f9b8af4cd', + datasetId: 'ds000116', + }, + { + userId: '54c7655b-c1aa-47e4-ad11-0eb20511a605', + datasetId: 'ds000116', + }, + { + userId: '6072bdfe-3b10-4847-961e-f3fc99abbddc', + datasetId: 'ds000116', + }, + { + userId: '0d84128c-e911-49a6-84e1-a04c06f7a672', + datasetId: 'ds000116', + }, + ], + followers: [ + { + userId: '108336fb-f6de-4963-b7b9-07e827e000ce', + datasetId: 'ds000116', + }, + { + userId: '58529c8d-ae1a-4e6a-8608-d40d5b3d9989', + datasetId: 'ds000116', + }, + { + userId: '1e81bdde-87d9-46fc-a9a4-25f512086ea3', + datasetId: 'ds000116', + }, + { + userId: '6072bdfe-3b10-4847-961e-f3fc99abbddc', + datasetId: 'ds000116', + }, + ], + snapshots: [ + { + id: 'ds000116:00002', + created: '2018-07-16T19:10:16.070Z', + tag: '00002', + }, + { + id: 'ds000116:00001', + created: '2018-07-16T19:13:34.429Z', + tag: '00001', + }, + { + id: 'ds000116:00003', + created: '2018-07-16T19:15:04.496Z', + tag: '00003', + }, + ], + }, + }, + { + node: { + id: 'ds002241', + created: '2019-10-14T14:35:07.116Z', + uploader: { + id: '7c2ffc11-d665-4bf1-850a-2ae06a02dd1f', + name: 'Neggin Keshavarzian', + }, + public: true, + permissions: { + id: 'ds002241', + userPermissions: [ + { + userId: '7c2ffc11-d665-4bf1-850a-2ae06a02dd1f', + level: 'admin', + access: 'admin', + user: { + id: '7c2ffc11-d665-4bf1-850a-2ae06a02dd1f', + name: 'Neggin Keshavarzian', + email: 'neggink@princeton.edu', + provider: 'google', + }, + }, + { + userId: '2817dcbc-3db1-43c7-94ab-2d3a6bd6d4c6', + level: 'admin', + access: 'admin', + user: { + id: '2817dcbc-3db1-43c7-94ab-2d3a6bd6d4c6', + name: 'Compmem Lab', + email: 'princetoncompmemlab@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds002241', + summary: { + modalities: ['T1w', 'bold', 'events'], + sessions: [], + subjects: [ + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '31', + ], + subjectMetadata: null, + tasks: ['drawing', 'recognition'], + size: 61602618601, + totalFiles: 656, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + ], + description: { + Name: 'Unnamed Dataset', + }, + }, + analytics: { + views: 15462, + downloads: 23, + }, + stars: [ + { + userId: '4a1b11a2-0b7d-45d1-902a-0cea37ff6536', + datasetId: 'ds002241', + }, + ], + followers: [ + { + userId: '7c2ffc11-d665-4bf1-850a-2ae06a02dd1f', + datasetId: 'ds002241', + }, + ], + snapshots: [ + { + id: 'ds002241:1.0.0', + created: '2019-10-14T15:45:50.114Z', + tag: '1.0.0', + }, + { + id: 'ds002241:1.1.0', + created: '2020-12-03T12:18:32.150Z', + tag: '1.1.0', + }, + ], + }, + }, + { + node: { + id: 'ds000232', + created: '2017-09-23T02:41:09.402Z', + uploader: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + }, + public: true, + permissions: { + id: 'ds000232', + userPermissions: [ + { + userId: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + level: 'admin', + access: 'admin', + user: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + email: 'poldrackexperiments@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds000232', + summary: { + modalities: ['T1w', 'bold', 'events'], + sessions: ['01', '02', '03', '04'], + subjects: [ + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + ], + subjectMetadata: [ + { + participantId: '01', + age: 27, + sex: 'F ', + group: null, + }, + { + participantId: '02', + age: 29, + sex: 'F ', + group: null, + }, + { + participantId: '03', + age: 25, + sex: 'F ', + group: null, + }, + { + participantId: '04', + age: 30, + sex: 'F ', + group: null, + }, + { + participantId: '05', + age: 38, + sex: 'F ', + group: null, + }, + { + participantId: '06', + age: 22, + sex: 'F ', + group: null, + }, + { + participantId: '07', + age: 31, + sex: 'M ', + group: null, + }, + { + participantId: '08', + age: 36, + sex: 'M ', + group: null, + }, + { + participantId: '09', + age: 37, + sex: 'M ', + group: null, + }, + { + participantId: '10', + age: 24, + sex: 'F ', + group: null, + }, + ], + tasks: ['localizer', 'main'], + size: 29461746381, + totalFiles: 564, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Adjudicating between face-coding models with individual-face fMRI responses', + }, + }, + analytics: { + views: 15829, + downloads: 25, + }, + stars: [ + { + userId: '296d1749-fd68-42d8-9416-66883d0822c4', + datasetId: 'ds000232', + }, + ], + followers: [], + snapshots: [ + { + id: 'ds000232:00001', + created: '2018-07-16T18:56:21.521Z', + tag: '00001', + }, + ], + }, + }, + { + node: { + id: 'ds000205', + created: '2017-09-04T19:44:16.161Z', + uploader: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + }, + public: true, + permissions: { + id: 'ds000205', + userPermissions: [ + { + userId: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + level: 'admin', + access: 'admin', + user: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + email: 'poldrackexperiments@gmail.com', + provider: 'google', + }, + }, + { + userId: '0ed50f8b-5714-4a5f-889e-47676bb51a58', + level: 'admin', + access: 'admin', + user: { + id: '0ed50f8b-5714-4a5f-889e-47676bb51a58', + name: 'Jongwan Kim', + email: 'kim253@umd.edu', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds000205', + summary: { + modalities: ['T1w', 'bold'], + sessions: [], + subjects: [ + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + ], + subjectMetadata: null, + tasks: ['Functional localizer', 'Passive Viewing'], + size: 2975396817, + totalFiles: 375, + dataProcessed: null, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Affective Videos', + }, + }, + analytics: { + views: 19540, + downloads: 131, + }, + stars: [ + { + userId: '2b7f938a-db18-4f49-95ff-a4d48ac134b1', + datasetId: 'ds000205', + }, + { + userId: '795e5a6e-117b-458e-bcaf-c82fdb3b5478', + datasetId: 'ds000205', + }, + { + userId: '7932d39a-9f2a-4858-b972-b1cb75f914c8', + datasetId: 'ds000205', + }, + { + userId: '2d19913d-f5a0-41ed-be10-479b1b1d8f6a', + datasetId: 'ds000205', + }, + ], + followers: [ + { + userId: '7932d39a-9f2a-4858-b972-b1cb75f914c8', + datasetId: 'ds000205', + }, + ], + snapshots: [ + { + id: 'ds000205:00001', + created: '2018-07-17T14:30:54.439Z', + tag: '00001', + }, + ], + }, + }, + { + node: { + id: 'ds002338', + created: '2019-12-03T10:06:04.003Z', + uploader: { + id: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + name: 'Claire Cury', + }, + public: true, + permissions: { + id: 'ds002338', + userPermissions: [ + { + userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + level: 'admin', + access: 'admin', + user: { + id: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + name: 'Claire Cury', + email: 'claire.cury@inria.fr', + provider: 'orcid', + }, + }, + { + userId: '98e9d912-ace0-4440-839f-e23900ad1d8b', + level: 'rw', + access: 'rw', + user: { + id: '98e9d912-ace0-4440-839f-e23900ad1d8b', + name: 'Giulia Lioi', + email: 'lioi.giulia@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds002338', + summary: { + modalities: ['T1w', 'eeg', 'bold'], + sessions: [], + subjects: [ + 'xp201', + 'xp202', + 'xp203', + 'xp204', + 'xp205', + 'xp206', + 'xp207', + 'xp210', + 'xp211', + 'xp213', + 'xp216', + 'xp217', + 'xp218', + 'xp219', + 'xp220', + 'xp221', + 'xp222', + ], + subjectMetadata: [ + { + participantId: 'xp201', + age: 41, + sex: 'F', + group: null, + }, + { + participantId: 'xp202', + age: 39, + sex: 'M', + group: null, + }, + { + participantId: 'xp203', + age: 32, + sex: 'M', + group: null, + }, + { + participantId: 'xp204', + age: 34, + sex: 'F', + group: null, + }, + { + participantId: 'xp205', + age: 28, + sex: 'F', + group: null, + }, + { + participantId: 'xp206', + age: 31, + sex: 'M', + group: null, + }, + { + participantId: 'xp207', + age: 39, + sex: 'M', + group: null, + }, + { + participantId: 'xp208', + age: 47, + sex: 'M', + group: null, + }, + { + participantId: 'xp209', + age: 25, + sex: 'M', + group: null, + }, + { + participantId: 'xp210', + age: 26, + sex: 'F', + group: null, + }, + { + participantId: 'xp211', + age: 50, + sex: 'M', + group: null, + }, + { + participantId: 'xp212', + age: 30, + sex: 'F', + group: null, + }, + { + participantId: 'xp213', + age: 31, + sex: 'M', + group: null, + }, + { + participantId: 'xp214', + age: 23, + sex: 'F', + group: null, + }, + { + participantId: 'xp215', + age: 44, + sex: 'M', + group: null, + }, + { + participantId: 'xp216', + age: 31, + sex: 'M', + group: null, + }, + { + participantId: 'xp217', + age: 36, + sex: 'F', + group: null, + }, + { + participantId: 'xp218', + age: 46, + sex: 'F', + group: null, + }, + { + participantId: 'xp219', + age: 26, + sex: 'F', + group: null, + }, + { + participantId: 'xp220', + age: 66, + sex: 'M', + group: null, + }, + { + participantId: 'xp221', + age: 42, + sex: 'M', + group: null, + }, + { + participantId: 'xp222', + age: 32, + sex: 'F', + group: null, + }, + { + participantId: 'xp223', + age: 18, + sex: 'F', + group: null, + }, + ], + tasks: [ + '1dNF', + 'MIpost', + 'MIpre', + '2dNF', + '1dNF_run-01', + '2dNF_run-02', + ], + size: 26024158001, + totalFiles: 484, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'A multi-modal human neuroimaging dataset for data integration: simultaneous EEG and fMRI acquisition during a motor imagery neurofeedback task: XP2', + }, + }, + analytics: { + views: 34986, + downloads: 210, + }, + stars: [ + { + userId: '646d9f88-8c4d-494a-9c73-5d518c49c7df', + datasetId: 'ds002338', + }, + { + userId: '3ab631a6-5698-43b3-9064-bb8904b01301', + datasetId: 'ds002338', + }, + { + userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + datasetId: 'ds002338', + }, + { + userId: '5b20ed3a-3dc2-4333-ae5d-c9eb29d5425e', + datasetId: 'ds002338', + }, + { + userId: 'd0e20a7e-ee60-4cb0-9a1e-7360bcc6af05', + datasetId: 'ds002338', + }, + { + userId: '54c7655b-c1aa-47e4-ad11-0eb20511a605', + datasetId: 'ds002338', + }, + ], + followers: [ + { + userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + datasetId: 'ds002338', + }, + { + userId: '98e9d912-ace0-4440-839f-e23900ad1d8b', + datasetId: 'ds002338', + }, + { + userId: 'd0e20a7e-ee60-4cb0-9a1e-7360bcc6af05', + datasetId: 'ds002338', + }, + ], + snapshots: [ + { + id: 'ds002338:1.0.0', + created: '2019-12-03T22:03:46.965Z', + tag: '1.0.0', + }, + { + id: 'ds002338:1.0.1', + created: '2019-12-04T14:42:42.175Z', + tag: '1.0.1', + }, + { + id: 'ds002338:1.0.2', + created: '2019-12-12T09:37:59.999Z', + tag: '1.0.2', + }, + { + id: 'ds002338:2.0.0', + created: '2020-04-26T09:34:30.908Z', + tag: '2.0.0', + }, + { + id: 'ds002338:2.0.1', + created: '2020-09-24T23:32:33.512Z', + tag: '2.0.1', + }, + ], + }, + }, + { + node: { + id: 'ds002336', + created: '2019-12-02T15:14:38.180Z', + uploader: { + id: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + name: 'Claire Cury', + }, + public: true, + permissions: { + id: 'ds002336', + userPermissions: [ + { + userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + level: 'admin', + access: 'admin', + user: { + id: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + name: 'Claire Cury', + email: 'claire.cury@inria.fr', + provider: 'orcid', + }, + }, + { + userId: '98e9d912-ace0-4440-839f-e23900ad1d8b', + level: 'rw', + access: 'rw', + user: { + id: '98e9d912-ace0-4440-839f-e23900ad1d8b', + name: 'Giulia Lioi', + email: 'lioi.giulia@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds002336', + summary: { + modalities: ['T1w', 'eeg', 'bold'], + sessions: [], + subjects: [ + 'xp101', + 'xp102', + 'xp103', + 'xp104', + 'xp105', + 'xp106', + 'xp107', + 'xp108', + 'xp109', + 'xp110', + ], + subjectMetadata: [ + { + participantId: 'xp101', + age: 25, + sex: 'M', + group: null, + }, + { + participantId: 'xp102', + age: 27, + sex: 'M', + group: null, + }, + { + participantId: 'xp103', + age: 25, + sex: 'M', + group: null, + }, + { + participantId: 'xp104', + age: 31, + sex: 'M', + group: null, + }, + { + participantId: 'xp105', + age: 39, + sex: 'M', + group: null, + }, + { + participantId: 'xp106', + age: 36, + sex: 'F', + group: null, + }, + { + participantId: 'xp107', + age: 19, + sex: 'M', + group: null, + }, + { + participantId: 'xp108', + age: 29, + sex: 'M', + group: null, + }, + { + participantId: 'xp109', + age: 27, + sex: 'F', + group: null, + }, + { + participantId: 'xp110', + age: 26, + sex: 'M', + group: null, + }, + ], + tasks: [ + 'eegNF', + 'eegfmriNF', + 'fmriNF', + 'motorloc', + 'MIpost', + 'MIpre', + ], + size: 18046628273, + totalFiles: 325, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Unnamed Dataset', + }, + }, + analytics: { + views: 28242, + downloads: 215, + }, + stars: [ + { + userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + datasetId: 'ds002336', + }, + { + userId: 'c4c77657-9e5d-4105-877c-2f9b9a33c266', + datasetId: 'ds002336', + }, + { + userId: '646d9f88-8c4d-494a-9c73-5d518c49c7df', + datasetId: 'ds002336', + }, + { + userId: 'd0e20a7e-ee60-4cb0-9a1e-7360bcc6af05', + datasetId: 'ds002336', + }, + { + userId: '54c7655b-c1aa-47e4-ad11-0eb20511a605', + datasetId: 'ds002336', + }, + { + userId: 'ac8b1a97-eb67-4f6e-b4b0-0eb192e74497', + datasetId: 'ds002336', + }, + ], + followers: [ + { + userId: 'ecfd294f-b5ae-4b05-bd5d-f12deac97647', + datasetId: 'ds002336', + }, + { + userId: '98e9d912-ace0-4440-839f-e23900ad1d8b', + datasetId: 'ds002336', + }, + { + userId: 'd0e20a7e-ee60-4cb0-9a1e-7360bcc6af05', + datasetId: 'ds002336', + }, + ], + snapshots: [ + { + id: 'ds002336:1.0.0', + created: '2019-12-03T09:47:07.574Z', + tag: '1.0.0', + }, + { + id: 'ds002336:1.0.1', + created: '2019-12-04T14:46:58.333Z', + tag: '1.0.1', + }, + { + id: 'ds002336:1.0.2', + created: '2019-12-12T09:41:29.876Z', + tag: '1.0.2', + }, + { + id: 'ds002336:2.0.0', + created: '2020-04-26T08:55:55.414Z', + tag: '2.0.0', + }, + { + id: 'ds002336:2.0.1', + created: '2020-09-24T23:27:18.365Z', + tag: '2.0.1', + }, + ], + }, + }, + { + node: { + id: 'ds001926', + created: '2019-05-15T19:21:25.771Z', + uploader: { + id: '7c2ffc11-d665-4bf1-850a-2ae06a02dd1f', + name: 'Neggin Keshavarzian', + }, + public: true, + permissions: { + id: 'ds001926', + userPermissions: [ + { + userId: '2817dcbc-3db1-43c7-94ab-2d3a6bd6d4c6', + level: 'admin', + access: 'admin', + user: { + id: '2817dcbc-3db1-43c7-94ab-2d3a6bd6d4c6', + name: 'Compmem Lab', + email: 'princetoncompmemlab@gmail.com', + provider: 'google', + }, + }, + { + userId: '7c2ffc11-d665-4bf1-850a-2ae06a02dd1f', + level: 'admin', + access: 'admin', + user: { + id: '7c2ffc11-d665-4bf1-850a-2ae06a02dd1f', + name: 'Neggin Keshavarzian', + email: 'neggink@princeton.edu', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds001926', + summary: { + modalities: ['T1w', 'T2w', 'bold', 'fieldmap'], + sessions: ['day1', 'day2'], + subjects: [ + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '31', + '32', + ], + subjectMetadata: null, + tasks: [ + 'Localizer', + 'Post Test Phase', + 'Study Phase', + 'Test Phase', + ], + size: 151065180184, + totalFiles: 676, + dataProcessed: null, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Violation Differentiation', + }, + }, + analytics: { + views: 21845, + downloads: 10, + }, + stars: [ + { + userId: 'a12c691c-1c09-4199-b981-9f667a94cf40', + datasetId: 'ds001926', + }, + { + userId: '4a1b11a2-0b7d-45d1-902a-0cea37ff6536', + datasetId: 'ds001926', + }, + ], + followers: [ + { + userId: '7c2ffc11-d665-4bf1-850a-2ae06a02dd1f', + datasetId: 'ds001926', + }, + ], + snapshots: [ + { + id: 'ds001926:1.0.0', + created: '2019-05-17T17:56:18.552Z', + tag: '1.0.0', + }, + { + id: 'ds001926:1.0.1', + created: '2019-05-21T14:23:48.105Z', + tag: '1.0.1', + }, + ], + }, + }, + { + node: { + id: 'ds003608', + created: '2021-04-10T09:18:07.714Z', + uploader: { + id: '507acecb-83a9-45d6-8ad3-f3f2e8d4b9c0', + name: 'Weiyong Xu', + }, + public: true, + permissions: { + id: 'ds003608', + userPermissions: [ + { + userId: '507acecb-83a9-45d6-8ad3-f3f2e8d4b9c0', + level: 'admin', + access: 'admin', + user: { + id: '507acecb-83a9-45d6-8ad3-f3f2e8d4b9c0', + name: 'Weiyong Xu', + email: 'weiyong.w.xu@jyu.fi', + provider: 'orcid', + }, + }, + { + userId: '2b63e867-6302-472a-896f-8b8fca3232c6', + level: 'ro', + access: 'ro', + user: { + id: '2b63e867-6302-472a-896f-8b8fca3232c6', + name: 'Robert Oostenveld', + email: 'r.oostenveld@donders.ru.nl', + provider: 'orcid', + }, + }, + { + userId: '55ae49e7-9c8c-4e5b-9b85-ddafc7ac2b58', + level: 'ro', + access: 'ro', + user: { + id: '55ae49e7-9c8c-4e5b-9b85-ddafc7ac2b58', + name: 'Jarmo Hamalainen', + email: 'jarmo.a.hamalainen@gmail.com', + provider: 'google', + }, + }, + { + userId: '3384f672-6b96-4bb9-bd6c-3f6a7a0ba533', + level: 'ro', + access: 'ro', + user: { + id: '3384f672-6b96-4bb9-bd6c-3f6a7a0ba533', + name: 'Orsolya Beatrix Kolozsvári', + email: 'orsolyab.kolozsvari@gmail.com', + provider: 'orcid', + }, + }, + { + userId: 'b6cf5571-a1d2-46ab-b86e-26f1511350d9', + level: 'ro', + access: 'ro', + user: { + id: 'b6cf5571-a1d2-46ab-b86e-26f1511350d9', + name: 'Orsolya Beatrix Kolozsvári', + email: 'orsolyab.kolozsvari@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds003608', + summary: { + modalities: ['meg', 'coordsystem', 'channels', 'events'], + sessions: [], + subjects: [ + 'CN01', + 'CN06', + 'CN07', + 'CN08', + 'CN09', + 'CN10', + 'CN11', + 'CN12', + 'CN14', + 'CN17', + 'CN18', + 'CN20', + 'FI03', + 'FI04', + 'FI05', + 'FI06', + 'FI09', + 'FI10', + 'FI11', + 'FI12', + 'FI14', + 'FI17', + 'FI18', + 'FI19', + 'FI20', + ], + subjectMetadata: null, + tasks: ['audiovisual'], + size: 39537802450, + totalFiles: 205, + dataProcessed: false, + }, + issues: [], + description: { + Name: 'Unnamed Dataset', + }, + }, + analytics: { + views: 787760, + downloads: 2, + }, + stars: [], + followers: [ + { + userId: '507acecb-83a9-45d6-8ad3-f3f2e8d4b9c0', + datasetId: 'ds003608', + }, + ], + snapshots: [ + { + id: 'ds003608:1.0.0', + created: '2021-04-10T11:43:23.369Z', + tag: '1.0.0', + }, + { + id: 'ds003608:1.0.1', + created: '2021-04-28T06:41:55.647Z', + tag: '1.0.1', + }, + ], + }, + }, + { + node: { + id: 'ds003059', + created: '2020-08-07T02:56:10.653Z', + uploader: { + id: 'b2bb2f7d-189d-4f88-9dbd-72f953587bba', + name: 'Manesh Girn', + }, + public: true, + permissions: { + id: 'ds003059', + userPermissions: [ + { + userId: 'b2bb2f7d-189d-4f88-9dbd-72f953587bba', + level: 'admin', + access: 'admin', + user: { + id: 'b2bb2f7d-189d-4f88-9dbd-72f953587bba', + name: 'Manesh Girn', + email: 'manesh.girn@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds003059', + summary: { + modalities: ['T1w', 'bold'], + sessions: ['LSD', 'PLCB'], + subjects: [ + '001', + '002', + '003', + '004', + '006', + '009', + '010', + '011', + '012', + '013', + '015', + '017', + '018', + '019', + '020', + ], + subjectMetadata: null, + tasks: ['Rest'], + size: 15370199456, + totalFiles: 138, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Neural correlates of the LSD experience revealed by multimodal neuroimaging', + }, + }, + analytics: { + views: 16392, + downloads: 132, + }, + stars: [ + { + userId: 'd6ac0432-b99f-46a8-9bf8-5dd2205ce536', + datasetId: 'ds003059', + }, + { + userId: 'd72f1f02-7e7a-4af1-9f36-dee076913e8b', + datasetId: 'ds003059', + }, + { + userId: 'c986a67d-51c2-48ac-af88-42aac43ebcf0', + datasetId: 'ds003059', + }, + { + userId: 'dcbb97da-0bd5-40a5-b9eb-3861492c0122', + datasetId: 'ds003059', + }, + ], + followers: [ + { + userId: 'b2bb2f7d-189d-4f88-9dbd-72f953587bba', + datasetId: 'ds003059', + }, + { + userId: 'd72f1f02-7e7a-4af1-9f36-dee076913e8b', + datasetId: 'ds003059', + }, + { + userId: 'c986a67d-51c2-48ac-af88-42aac43ebcf0', + datasetId: 'ds003059', + }, + { + userId: 'dcbb97da-0bd5-40a5-b9eb-3861492c0122', + datasetId: 'ds003059', + }, + ], + snapshots: [ + { + id: 'ds003059:1.0.0', + created: '2020-08-07T08:05:15.174Z', + tag: '1.0.0', + }, + ], + }, + }, + { + node: { + id: 'ds001345', + created: '2018-04-28T08:31:53.690Z', + uploader: { + id: '93c900ff-8e09-4c0b-9444-a6bce221edb5', + name: 'Michael Notter', + }, + public: true, + permissions: { + id: 'ds001345', + userPermissions: [ + { + userId: '93c900ff-8e09-4c0b-9444-a6bce221edb5', + level: 'admin', + access: 'admin', + user: { + id: '93c900ff-8e09-4c0b-9444-a6bce221edb5', + name: 'Michael Notter', + email: 'miykaelnotter@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds001345', + summary: { + modalities: ['T1w', 'bold', 'events'], + sessions: [], + subjects: [ + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + '12', + ], + subjectMetadata: [ + { + participantId: '01', + age: 22, + sex: 'M', + group: null, + }, + { + participantId: '02', + age: 24, + sex: 'F', + group: null, + }, + { + participantId: '03', + age: 30, + sex: 'F', + group: null, + }, + { + participantId: '04', + age: 28, + sex: 'F', + group: null, + }, + { + participantId: '05', + age: 34, + sex: 'F', + group: null, + }, + { + participantId: '06', + age: 29, + sex: 'F', + group: null, + }, + { + participantId: '07', + age: 29, + sex: 'M', + group: null, + }, + { + participantId: '08', + age: 24, + sex: 'F', + group: null, + }, + { + participantId: '09', + age: 27, + sex: 'M', + group: null, + }, + { + participantId: '10', + age: 28, + sex: 'M', + group: null, + }, + { + participantId: '11', + age: 30, + sex: 'F', + group: null, + }, + { + participantId: '12', + age: 26, + sex: 'F', + group: null, + }, + ], + tasks: ['Audio-Visual Memory'], + size: 2334422099, + totalFiles: 113, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + ], + description: { + Name: 'Decoding of multisensory semantics and memories in low-level visual cortex', + }, + }, + analytics: { + views: 21403, + downloads: 52, + }, + stars: [], + followers: [], + snapshots: [ + { + id: 'ds001345:00001', + created: '2018-07-18T03:14:37.744Z', + tag: '00001', + }, + { + id: 'ds001345:1.0.0', + created: '2019-11-29T10:17:44.083Z', + tag: '1.0.0', + }, + ], + }, + }, + { + node: { + id: 'ds003430', + created: '2020-12-16T12:51:01.012Z', + uploader: { + id: 'cec87dae-99d4-4e75-a8b4-60bbee20d1c1', + name: 'Kamitani Lab', + }, + public: true, + permissions: { + id: 'ds003430', + userPermissions: [ + { + userId: 'cec87dae-99d4-4e75-a8b4-60bbee20d1c1', + level: 'admin', + access: 'admin', + user: { + id: 'cec87dae-99d4-4e75-a8b4-60bbee20d1c1', + name: 'Kamitani Lab', + email: 'cns.decode@gmail.com', + provider: 'google', + }, + }, + { + userId: '8a0267ac-3e35-4519-a1b7-92da14fbcee8', + level: 'rw', + access: 'rw', + user: { + id: '8a0267ac-3e35-4519-a1b7-92da14fbcee8', + name: 'Tomoyasu Horikawa', + email: 'horikawa-t@atr.jp', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds003430', + summary: { + modalities: ['T1w', 'inplaneT2', 'bold', 'events'], + sessions: [ + 'anatomy', + 'attention01', + 'attention02', + 'perceptionNaturalImageTraining01', + 'perceptionNaturalImageTraining02', + 'perceptionNaturalImageTraining03', + 'perceptionNaturalImageTraining04', + 'perceptionNaturalImageTraining05', + 'perceptionNaturalImageTraining06', + 'perceptionNaturalImageTraining07', + 'perceptionNaturalImageTraining08', + 'perceptionNaturalImageTraining09', + 'perceptionNaturalImageTraining10', + 'perceptionNaturalImageTraining11', + 'perceptionNaturalImageTraining12', + 'perceptionNaturalImageTraining13', + 'perceptionNaturalImageTraining14', + 'perceptionNaturalImageTraining15', + 'perceptionNaturalImageTraining16', + ], + subjects: ['01', '02', '03', '04', '05'], + subjectMetadata: null, + tasks: [ + 'attentionNaturalTestImage', + 'perceptionNaturalImageTraining', + ], + size: 62073386293, + totalFiles: 1009, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + ], + description: { + Name: 'Unnamed Dataset', + }, + }, + analytics: { + views: 7543, + downloads: 10, + }, + stars: [], + followers: [ + { + userId: 'cec87dae-99d4-4e75-a8b4-60bbee20d1c1', + datasetId: 'ds003430', + }, + ], + snapshots: [ + { + id: 'ds003430:1.0.0', + created: '2020-12-17T17:03:06.166Z', + tag: '1.0.0', + }, + { + id: 'ds003430:1.0.1', + created: '2020-12-28T06:01:23.141Z', + tag: '1.0.1', + }, + { + id: 'ds003430:1.0.2', + created: '2020-12-28T06:12:34.737Z', + tag: '1.0.2', + }, + { + id: 'ds003430:1.0.3', + created: '2021-01-05T06:10:48.260Z', + tag: '1.0.3', + }, + { + id: 'ds003430:1.0.4', + created: '2021-01-05T06:19:19.556Z', + tag: '1.0.4', + }, + ], + }, + }, + { + node: { + id: 'ds003416', + created: '2020-12-03T07:58:11.749Z', + uploader: { + id: '72a2dc63-02a7-49b4-b7ba-2eb853ff70c3', + name: 'Leon Cai', + }, + public: true, + permissions: { + id: 'ds003416', + userPermissions: [ + { + userId: '72a2dc63-02a7-49b4-b7ba-2eb853ff70c3', + level: 'admin', + access: 'admin', + user: { + id: '72a2dc63-02a7-49b4-b7ba-2eb853ff70c3', + name: 'Leon Cai', + email: 'leon.y.cai@vanderbilt.edu', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds003416', + summary: { + modalities: ['T1w', 'dwi'], + sessions: [ + 's1Bx1', + 's1Bx3', + 's1Bx4', + 's1Bx5', + 's1Bx6', + 's1Bx7', + 's1Bx2', + 's1Ax1', + 's2x1', + 's3x1', + 's1Ax2', + 's1Ax3', + ], + subjects: [ + 'cIIIs01', + 'cIIIs02', + 'cIIIs03', + 'cIIIs04', + 'cIIIs05', + 'cIIIs06', + 'cIIIs07', + 'cIIIs08', + 'cIIs00', + 'cIIs01', + 'cIIs02', + 'cIIs03', + 'cIIs04', + 'cIVs001', + 'cIVs002', + 'cIVs005', + 'cIVs006', + 'cIVs007', + 'cIVs009', + 'cIVs010', + 'cIVs012', + 'cIVs013', + 'cIVs015', + 'cIVs016', + 'cIVs017', + 'cIVs018', + 'cIVs020', + 'cIVs023', + 'cIVs024', + 'cIVs025', + 'cIVs026', + 'cIVs027', + 'cIVs028', + 'cIVs029', + 'cIVs030', + 'cIVs031', + 'cIVs032', + 'cIVs033', + 'cIVs034', + 'cIVs035', + 'cIVs036', + 'cIVs037', + 'cIVs038', + 'cIVs040', + 'cIVs041', + 'cIVs043', + 'cIVs044', + 'cIVs045', + 'cIVs046', + 'cIVs047', + 'cIVs048', + 'cIVs049', + 'cIVs050', + 'cIVs051', + 'cIVs052', + 'cIVs053', + 'cIVs054', + 'cIVs055', + 'cIVs056', + 'cIVs057', + 'cIVs058', + 'cIVs061', + 'cIVs062', + 'cIVs065', + 'cIVs066', + 'cIVs067', + 'cIVs069', + 'cIVs070', + 'cIVs071', + 'cIVs073', + 'cIVs074', + 'cIVs075', + 'cIVs076', + 'cIVs077', + 'cIVs078', + 'cIVs080', + 'cIVs081', + 'cIVs082', + 'cIVs085', + 'cIVs086', + 'cIVs088', + 'cIVs089', + 'cIVs090', + 'cIVs092', + 'cIVs093', + 'cIVs094', + 'cIVs095', + 'cIVs096', + 'cIVs098', + 'cIVs100', + 'cIVs101', + 'cIVs102', + 'cIVs104', + 'cIVs108', + 'cIVs109', + 'cIVs110', + 'cIs1', + ], + subjectMetadata: [ + { + participantId: 'cIs1', + age: 25, + sex: 'male', + group: null, + }, + { + participantId: 'cIs1', + age: 25, + sex: 'male', + group: null, + }, + { + participantId: 'cIs1', + age: 25, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs00', + age: 37, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs00', + age: 37, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs00', + age: 37, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs00', + age: 37, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs01', + age: 27, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs01', + age: 27, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs01', + age: 27, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs01', + age: 27, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs01', + age: 27, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs01', + age: 27, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs02', + age: 45, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs02', + age: 45, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs02', + age: 45, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs02', + age: 45, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs02', + age: 45, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs02', + age: 46, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs03', + age: 47, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs03', + age: 47, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs03', + age: 47, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs03', + age: 47, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs03', + age: 47, + sex: 'female', + group: null, + }, + { + participantId: 'cIIs04', + age: 36, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs04', + age: 36, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs04', + age: 36, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs04', + age: 36, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs04', + age: 36, + sex: 'male', + group: null, + }, + { + participantId: 'cIIs04', + age: 36, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs01', + age: 23, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs01', + age: 23, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs01', + age: 24, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs01', + age: 24, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs01', + age: 24, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs01', + age: 24, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs02', + age: 28, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs02', + age: 28, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs02', + age: 28, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs03', + age: 21, + sex: 'female', + group: null, + }, + { + participantId: 'cIIIs04', + age: 29, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs04', + age: 29, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs04', + age: 30, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs04', + age: 30, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs04', + age: 30, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs05', + age: 21, + sex: 'female', + group: null, + }, + { + participantId: 'cIIIs05', + age: 22, + sex: 'female', + group: null, + }, + { + participantId: 'cIIIs06', + age: 21, + sex: 'male', + group: null, + }, + { + participantId: 'cIIIs07', + age: 20, + sex: 'female', + group: null, + }, + { + participantId: 'cIIIs08', + age: 31, + sex: 'female', + group: null, + }, + { + participantId: 'cIIIs08', + age: 31, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs001', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs001', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs002', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs005', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs005', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs006', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs006', + age: 8, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs007', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs007', + age: 8, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs009', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs010', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs012', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs012', + age: 8, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs013', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs013', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs015', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs016', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs017', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs017', + age: 8, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs018', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs018', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs020', + age: 8, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs023', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs024', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs024', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs025', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs025', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs026', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs026', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs027', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs028', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs029', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs029', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs030', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs030', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs031', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs032', + age: 5, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs032', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs033', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs034', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs035', + age: 8, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs036', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs036', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs037', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs037', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs038', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs038', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs040', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs040', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs041', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs043', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs043', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs044', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs044', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs045', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs045', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs046', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs047', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs048', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs049', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs050', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs051', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs051', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs052', + age: 5, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs053', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs053', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs054', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs054', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs055', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs055', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs056', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs056', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs057', + age: 5, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs057', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs058', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs061', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs062', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs065', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs066', + age: 5, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs067', + age: 5, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs067', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs069', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs070', + age: 5, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs070', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs071', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs073', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs074', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs075', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs075', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs076', + age: 5, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs077', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs077', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs078', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs078', + age: 7, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs080', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs081', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs081', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs082', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs082', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs085', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs085', + age: 7, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs086', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs088', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs089', + age: 5, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs090', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs092', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs093', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs094', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs095', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs096', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs098', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs100', + age: 5, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs101', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs102', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs104', + age: 6, + sex: 'female', + group: null, + }, + { + participantId: 'cIVs108', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs109', + age: 6, + sex: 'male', + group: null, + }, + { + participantId: 'cIVs110', + age: 6, + sex: 'female', + group: null, + }, + ], + tasks: [], + size: 18701566541, + totalFiles: 4483, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + ], + description: { + Name: 'MASiVar: Multisite, Multiscanner, and Multisubject Acquisitions for Studying Variability in Diffusion Weighted Magnetic Resonance Imaging', + }, + }, + analytics: { + views: 8878, + downloads: 27, + }, + stars: [], + followers: [ + { + userId: '72a2dc63-02a7-49b4-b7ba-2eb853ff70c3', + datasetId: 'ds003416', + }, + ], + snapshots: [ + { + id: 'ds003416:1.0.0', + created: '2020-12-03T16:52:17.576Z', + tag: '1.0.0', + }, + { + id: 'ds003416:2.0.0', + created: '2021-03-01T04:11:10.354Z', + tag: '2.0.0', + }, + { + id: 'ds003416:2.0.1', + created: '2021-03-01T04:20:40.370Z', + tag: '2.0.1', + }, + ], + }, + }, + { + node: { + id: 'ds000244', + created: '2018-03-30T00:46:19.402Z', + uploader: { + id: '9baa8f9f-55a4-49bc-a9cb-8d7f99a8e6e8', + name: 'Franklin Feingold', + }, + public: true, + permissions: { + id: 'ds000244', + userPermissions: [ + { + userId: '28a9b4e7-97fd-4d46-8d11-93e028d1d368', + level: 'admin', + access: 'admin', + user: { + id: '28a9b4e7-97fd-4d46-8d11-93e028d1d368', + name: 'Bertrand Thirion', + email: 'bertrand.thirion@inria.fr', + provider: 'orcid', + }, + }, + { + userId: '9baa8f9f-55a4-49bc-a9cb-8d7f99a8e6e8', + level: 'admin', + access: 'admin', + user: { + id: '9baa8f9f-55a4-49bc-a9cb-8d7f99a8e6e8', + name: 'Franklin Feingold', + email: 'franklin.feingold@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds000244', + summary: { + modalities: [ + 'FLAIR', + 'T1w', + 'T2w', + 'dwi', + 'bold', + 'events', + 'sbref', + 'fieldmap', + ], + sessions: [ + '00', + '03', + '04', + '05', + '07', + '14', + '15', + '19', + '20', + '24', + '01', + '06', + '02', + '11', + '12', + '17', + '21', + '23', + '13', + '16', + '18', + '22', + ], + subjects: [ + '01', + '02', + '04', + '05', + '06', + '07', + '08', + '09', + '11', + '12', + '13', + '14', + ], + subjectMetadata: [ + { + participantId: '01', + age: 39, + sex: 'M', + group: null, + }, + { + participantId: '02', + age: 32, + sex: 'M', + group: null, + }, + { + participantId: '04', + age: 26, + sex: 'M', + group: null, + }, + { + participantId: '05', + age: 27, + sex: 'M', + group: null, + }, + { + participantId: '06', + age: 33, + sex: 'M', + group: null, + }, + { + participantId: '07', + age: 38, + sex: 'M', + group: null, + }, + { + participantId: '08', + age: 36, + sex: 'F', + group: null, + }, + { + participantId: '09', + age: 38, + sex: 'F', + group: null, + }, + { + participantId: '11', + age: 35, + sex: 'M', + group: null, + }, + { + participantId: '12', + age: 40, + sex: 'M', + group: null, + }, + { + participantId: '13', + age: 28, + sex: 'M', + group: null, + }, + { + participantId: '14', + age: 28, + sex: 'M', + group: null, + }, + { + participantId: '15', + age: 30, + sex: 'M', + group: null, + }, + ], + tasks: [ + 'archi emotional', + 'archi social', + 'archi spatial', + 'archi standard', + 'self', + 'RSVP language', + 'clips watching', + 'retinotopy', + 'HCP emotion', + 'HCP gambling', + 'HCP langage', + 'HCP motor', + 'HCP relational', + 'HCP social', + 'HCP WM', + 'Fictitious event ordering', + 'film viewing', + 'rest eyes open', + ], + size: 847670476812, + totalFiles: 3965, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'error', + }, + { + severity: 'error', + }, + { + severity: 'error', + }, + ], + description: { + Name: 'IBC', + }, + }, + analytics: { + views: 72775, + downloads: 226, + }, + stars: [ + { + userId: 'f9e09ab7-9240-4869-985a-67056f0a21eb', + datasetId: 'ds000244', + }, + { + userId: 'b810d9ca-9754-4e40-b990-5855bc8b2c4a', + datasetId: 'ds000244', + }, + { + userId: '442ead0d-01ad-4c1c-b4da-6391c65dc3b5', + datasetId: 'ds000244', + }, + { + userId: '12da2a94-0627-4ea9-8e23-f5525ec12406', + datasetId: 'ds000244', + }, + { + userId: '8fb96f3e-6053-4746-ab02-8b318241aca3', + datasetId: 'ds000244', + }, + { + userId: 'dde1fae7-ab97-4cba-971d-a934c90cddfe', + datasetId: 'ds000244', + }, + { + userId: 'e205186a-05f4-4621-b7be-3dd63803f78b', + datasetId: 'ds000244', + }, + { + userId: '325795f7-98a8-4a96-9454-f25eda1481de', + datasetId: 'ds000244', + }, + { + userId: '790fac31-c573-4219-a065-a24390c39b98', + datasetId: 'ds000244', + }, + { + userId: 'a7ab2248-3463-49a6-8a44-cb0b63e14351', + datasetId: 'ds000244', + }, + ], + followers: [ + { + userId: '12da2a94-0627-4ea9-8e23-f5525ec12406', + datasetId: 'ds000244', + }, + { + userId: 'b810d9ca-9754-4e40-b990-5855bc8b2c4a', + datasetId: 'ds000244', + }, + { + userId: 'dde1fae7-ab97-4cba-971d-a934c90cddfe', + datasetId: 'ds000244', + }, + { + userId: 'e205186a-05f4-4621-b7be-3dd63803f78b', + datasetId: 'ds000244', + }, + { + userId: '8fb96f3e-6053-4746-ab02-8b318241aca3', + datasetId: 'ds000244', + }, + { + userId: 'a7ab2248-3463-49a6-8a44-cb0b63e14351', + datasetId: 'ds000244', + }, + ], + snapshots: [ + { + id: 'ds000244:00001', + created: '2018-07-18T07:44:50.043Z', + tag: '00001', + }, + { + id: 'ds000244:00002', + created: '2018-07-18T12:18:56.363Z', + tag: '00002', + }, + { + id: 'ds000244:1.0.0', + created: '2018-09-14T20:33:16.148Z', + tag: '1.0.0', + }, + ], + }, + }, + { + node: { + id: 'ds002372', + created: '2019-12-18T22:07:01.568Z', + uploader: { + id: '204d7630-c3b6-4727-b76c-0da9cf9c674e', + name: 'Yale MRRC', + }, + public: true, + permissions: { + id: 'ds002372', + userPermissions: [ + { + userId: 'adcc7f30-6df7-4d75-ac77-33d3a2ea3b7d', + level: 'rw', + access: 'rw', + user: { + id: 'adcc7f30-6df7-4d75-ac77-33d3a2ea3b7d', + name: 'Mehraveh Salehi', + email: 'mehraveh.salehi@yale.edu', + provider: 'orcid', + }, + }, + { + userId: '204d7630-c3b6-4727-b76c-0da9cf9c674e', + level: 'admin', + access: 'admin', + user: { + id: '204d7630-c3b6-4727-b76c-0da9cf9c674e', + name: 'Yale MRRC', + email: 'yalemrrcmri@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds002372', + summary: { + modalities: ['T1w', 'bold', 'events'], + sessions: [ + 'func01', + 'func02', + 'func03', + 'func04', + 'func05', + 'func06', + 'func07', + 'func08', + 'func09', + 'func10', + 'func11', + 'func12', + 'func13', + 'func14', + 'func15', + 'func16', + 'func17', + 'func18', + 'func19', + 'func20', + 'func21', + 'func22', + 'func23', + 'func24', + 'func25', + 'func26', + 'func27', + 'func28', + 'func29', + 'func30', + ], + subjects: ['RTC01'], + subjectMetadata: null, + tasks: [ + 'Card Guessing Task', + 'Reading the Mind in the eyes task', + 'Gradual-onset continuous performance task', + 'Rest task', + 'Movies task', + 'N-back task', + 'Stop-signal task', + ], + size: 168487665300, + totalFiles: 490, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Yale_Single_Subject_Task_Rest30x', + }, + }, + analytics: { + views: 28361, + downloads: 102, + }, + stars: [ + { + userId: 'adcc7f30-6df7-4d75-ac77-33d3a2ea3b7d', + datasetId: 'ds002372', + }, + { + userId: 'b59f3d98-d012-4f58-9e69-6e884dc50271', + datasetId: 'ds002372', + }, + { + userId: '204d7630-c3b6-4727-b76c-0da9cf9c674e', + datasetId: 'ds002372', + }, + { + userId: '5102be62-ab5f-4e97-84be-6e7d3d348d31', + datasetId: 'ds002372', + }, + { + userId: '7f5f72a3-d308-4f3f-8eb8-ed2433d88aae', + datasetId: 'ds002372', + }, + { + userId: '2c7cf4a4-9e8f-4b79-acca-d4c4f116071a', + datasetId: 'ds002372', + }, + { + userId: '436338c4-c6c0-4e39-8ddb-a02bd0791a7b', + datasetId: 'ds002372', + }, + { + userId: '97fa13b7-7d75-48de-b3d9-fa14b45eb040', + datasetId: 'ds002372', + }, + { + userId: 'b24a6c0a-2b43-42ca-a19e-ea32918f56d6', + datasetId: 'ds002372', + }, + { + userId: '4a1b11a2-0b7d-45d1-902a-0cea37ff6536', + datasetId: 'ds002372', + }, + ], + followers: [ + { + userId: 'adcc7f30-6df7-4d75-ac77-33d3a2ea3b7d', + datasetId: 'ds002372', + }, + { + userId: '204d7630-c3b6-4727-b76c-0da9cf9c674e', + datasetId: 'ds002372', + }, + { + userId: 'b59f3d98-d012-4f58-9e69-6e884dc50271', + datasetId: 'ds002372', + }, + { + userId: '5102be62-ab5f-4e97-84be-6e7d3d348d31', + datasetId: 'ds002372', + }, + { + userId: '436338c4-c6c0-4e39-8ddb-a02bd0791a7b', + datasetId: 'ds002372', + }, + ], + snapshots: [ + { + id: 'ds002372:1.0.0', + created: '2019-12-19T08:21:39.629Z', + tag: '1.0.0', + }, + ], + }, + }, + { + node: { + id: 'ds003634', + created: '2021-04-24T16:34:15.916Z', + uploader: { + id: '507acecb-83a9-45d6-8ad3-f3f2e8d4b9c0', + name: 'Weiyong Xu', + }, + public: true, + permissions: { + id: 'ds003634', + userPermissions: [ + { + userId: '507acecb-83a9-45d6-8ad3-f3f2e8d4b9c0', + level: 'admin', + access: 'admin', + user: { + id: '507acecb-83a9-45d6-8ad3-f3f2e8d4b9c0', + name: 'Weiyong Xu', + email: 'weiyong.w.xu@jyu.fi', + provider: 'orcid', + }, + }, + { + userId: 'b6cf5571-a1d2-46ab-b86e-26f1511350d9', + level: 'ro', + access: 'ro', + user: { + id: 'b6cf5571-a1d2-46ab-b86e-26f1511350d9', + name: 'Orsolya Beatrix Kolozsvári', + email: 'orsolyab.kolozsvari@gmail.com', + provider: 'google', + }, + }, + { + userId: '3384f672-6b96-4bb9-bd6c-3f6a7a0ba533', + level: 'ro', + access: 'ro', + user: { + id: '3384f672-6b96-4bb9-bd6c-3f6a7a0ba533', + name: 'Orsolya Beatrix Kolozsvári', + email: 'orsolyab.kolozsvari@gmail.com', + provider: 'orcid', + }, + }, + { + userId: '55ae49e7-9c8c-4e5b-9b85-ddafc7ac2b58', + level: 'ro', + access: 'ro', + user: { + id: '55ae49e7-9c8c-4e5b-9b85-ddafc7ac2b58', + name: 'Jarmo Hamalainen', + email: 'jarmo.a.hamalainen@gmail.com', + provider: 'google', + }, + }, + { + userId: '2b63e867-6302-472a-896f-8b8fca3232c6', + level: 'ro', + access: 'ro', + user: { + id: '2b63e867-6302-472a-896f-8b8fca3232c6', + name: 'Robert Oostenveld', + email: 'r.oostenveld@donders.ru.nl', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds003634', + summary: { + modalities: ['T1w', 'meg', 'coordsystem', 'channels', 'events'], + sessions: [], + subjects: [ + '02', + '03', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + '12', + '13', + '14', + '15', + '16', + '17', + '18', + '19', + '20', + '21', + '22', + '23', + '24', + '25', + '26', + '27', + '28', + '29', + '30', + '31', + ], + subjectMetadata: null, + tasks: ['audiovisual'], + size: 38640105109, + totalFiles: 289, + dataProcessed: false, + }, + issues: [], + description: { + Name: 'Unnamed Dataset', + }, + }, + analytics: { + views: 697409, + downloads: 1, + }, + stars: [], + followers: [ + { + userId: '507acecb-83a9-45d6-8ad3-f3f2e8d4b9c0', + datasetId: 'ds003634', + }, + ], + snapshots: [ + { + id: 'ds003634:1.0.0', + created: '2021-04-27T12:47:03.512Z', + tag: '1.0.0', + }, + ], + }, + }, + { + node: { + id: 'ds000243', + created: '2017-09-24T20:23:43.883Z', + uploader: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + }, + public: true, + permissions: { + id: 'ds000243', + userPermissions: [ + { + userId: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + level: 'admin', + access: 'admin', + user: { + id: '6ae514b1-1d27-4e09-b391-a7329b6f918e', + name: 'William James', + email: 'poldrackexperiments@gmail.com', + provider: 'google', + }, + }, + ], + }, + draft: { + id: 'ds000243', + summary: { + modalities: ['T1w', 'bold'], + sessions: [], + subjects: [ + '001', + '002', + '003', + '004', + '005', + '006', + '007', + '008', + '009', + '010', + '011', + '012', + '013', + '014', + '015', + '016', + '017', + '018', + '019', + '020', + '021', + '022', + '023', + '024', + '025', + '026', + '027', + '028', + '029', + '030', + '031', + '032', + '033', + '034', + '035', + '036', + '037', + '038', + '039', + '040', + '041', + '042', + '043', + '044', + '045', + '046', + '047', + '048', + '049', + '050', + '051', + '052', + '053', + '054', + '055', + '056', + '057', + '058', + '059', + '060', + '061', + '062', + '063', + '064', + '065', + '066', + '067', + '068', + '069', + '070', + '071', + '072', + '073', + '074', + '075', + '076', + '077', + '078', + '079', + '080', + '081', + '082', + '083', + '084', + '085', + '086', + '087', + '088', + '089', + '090', + '091', + '092', + '093', + '094', + '095', + '096', + '097', + '098', + '099', + '100', + '101', + '102', + '103', + '104', + '105', + '106', + '107', + '108', + '109', + '110', + '111', + '112', + '113', + '114', + '115', + '116', + '117', + '118', + '119', + '120', + ], + subjectMetadata: null, + tasks: ['rest'], + size: 2565618396, + totalFiles: 4939, + dataProcessed: null, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Unnamed Dataset', + }, + }, + analytics: { + views: 51693, + downloads: 201, + }, + stars: [ + { + userId: '970fc60f-904e-4392-91a7-7e0c6717e479', + datasetId: 'ds000243', + }, + { + userId: '9ae0666b-d052-4b51-a89c-3507955af44b', + datasetId: 'ds000243', + }, + { + userId: '84aed7d6-5667-4b68-8d44-c912dd8a5493', + datasetId: 'ds000243', + }, + { + userId: 'f729dfc3-3cab-48b8-8fd3-053ee1b56ede', + datasetId: 'ds000243', + }, + { + userId: '97fa13b7-7d75-48de-b3d9-fa14b45eb040', + datasetId: 'ds000243', + }, + { + userId: 'a12c691c-1c09-4199-b981-9f667a94cf40', + datasetId: 'ds000243', + }, + { + userId: 'c837eca6-4812-465d-b38a-aad6b6f41f83', + datasetId: 'ds000243', + }, + { + userId: 'b59f3bcc-1c4f-4806-99d1-4a229c6b0293', + datasetId: 'ds000243', + }, + { + userId: '94559216-75d9-4d01-809c-bf435e96276f', + datasetId: 'ds000243', + }, + { + userId: 'a7ab2248-3463-49a6-8a44-cb0b63e14351', + datasetId: 'ds000243', + }, + ], + followers: [ + { + userId: '970fc60f-904e-4392-91a7-7e0c6717e479', + datasetId: 'ds000243', + }, + { + userId: 'a7ab2248-3463-49a6-8a44-cb0b63e14351', + datasetId: 'ds000243', + }, + ], + snapshots: [ + { + id: 'ds000243:00001', + created: '2018-07-17T19:36:45.976Z', + tag: '00001', + }, + ], + }, + }, + { + node: { + id: 'ds001246', + created: '2018-03-01T00:35:48.849Z', + uploader: { + id: '6b5f5a9b-80b7-4431-91da-5c652dbf1eb6', + name: 'Shuntaro Aoki', + }, + public: true, + permissions: { + id: 'ds001246', + userPermissions: [ + { + userId: '6b5f5a9b-80b7-4431-91da-5c652dbf1eb6', + level: 'admin', + access: 'admin', + user: { + id: '6b5f5a9b-80b7-4431-91da-5c652dbf1eb6', + name: 'Shuntaro Aoki', + email: 's_aoki@i.kyoto-u.ac.jp', + provider: 'orcid', + }, + }, + ], + }, + draft: { + id: 'ds001246', + summary: { + modalities: ['T1w', 'inplaneT2', 'bold', 'events'], + sessions: [ + 'anatomy', + 'imageryTest01', + 'imageryTest02', + 'imageryTest03', + 'perceptionTest01', + 'perceptionTest02', + 'perceptionTest03', + 'perceptionTest04', + 'perceptionTraining01', + 'perceptionTraining02', + 'perceptionTraining03', + 'perceptionTest05', + 'imageryTest04', + 'imageryTest05', + 'perceptionTest06', + 'perceptionTraining04', + 'perceptionTraining05', + ], + subjects: ['01', '02', '03', '04', '05'], + subjectMetadata: null, + tasks: ['imagery', 'perception'], + size: 19693682188, + totalFiles: 859, + dataProcessed: false, + }, + issues: [ + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + { + severity: 'warning', + }, + ], + description: { + Name: 'Unnamed Dataset', + }, + }, + analytics: { + views: 148198, + downloads: 650, + }, + stars: [ + { + userId: '7932d39a-9f2a-4858-b972-b1cb75f914c8', + datasetId: 'ds001246', + }, + { + userId: '2b7f938a-db18-4f49-95ff-a4d48ac134b1', + datasetId: 'ds001246', + }, + { + userId: 'ef18e4f3-a86e-412f-bc78-394a4f76720a', + datasetId: 'ds001246', + }, + { + userId: 'f35f14e0-8444-4dd8-8d34-7e8be9648881', + datasetId: 'ds001246', + }, + { + userId: 'cb1dbdc0-1990-417b-bdf1-60736b758b0b', + datasetId: 'ds001246', + }, + { + userId: '033322ba-150f-409a-ad9f-6f21a8d44502', + datasetId: 'ds001246', + }, + { + userId: '267d88c8-2806-485a-8339-b6758384e07a', + datasetId: 'ds001246', + }, + { + userId: '33a0e0f3-beec-4b9a-aaef-e4e68618b52e', + datasetId: 'ds001246', + }, + { + userId: 'e264e056-469d-4651-b8af-3bf21ffadd4f', + datasetId: 'ds001246', + }, + { + userId: 'c1d9de43-7fb0-4c28-8636-130a27a8db1f', + datasetId: 'ds001246', + }, + { + userId: '0753f380-b43e-4d4b-aafc-557c855a7309', + datasetId: 'ds001246', + }, + { + userId: '9c9d0c89-19ae-498d-8683-59266d2d0647', + datasetId: 'ds001246', + }, + { + userId: '436eddf8-dc84-43b3-8d2a-f3ff8a1070f5', + datasetId: 'ds001246', + }, + { + userId: 'df815359-250d-4872-b916-008980c91fe7', + datasetId: 'ds001246', + }, + { + userId: 'c529e86a-9d6a-40ca-acf8-ae1c9e7516fd', + datasetId: 'ds001246', + }, + { + userId: '6b5f5a9b-80b7-4431-91da-5c652dbf1eb6', + datasetId: 'ds001246', + }, + { + userId: '790fac31-c573-4219-a065-a24390c39b98', + datasetId: 'ds001246', + }, + { + userId: 'a12c691c-1c09-4199-b981-9f667a94cf40', + datasetId: 'ds001246', + }, + { + userId: 'f39c5b0c-c313-4a6d-b224-7bbc7ca24b5f', + datasetId: 'ds001246', + }, + { + userId: '6cc4d974-d0e1-4110-b965-f01afe459fc8', + datasetId: 'ds001246', + }, + ], + followers: [ + { + userId: '267d88c8-2806-485a-8339-b6758384e07a', + datasetId: 'ds001246', + }, + { + userId: 'df815359-250d-4872-b916-008980c91fe7', + datasetId: 'ds001246', + }, + { + userId: '033322ba-150f-409a-ad9f-6f21a8d44502', + datasetId: 'ds001246', + }, + { + userId: 'e8032d45-6950-470c-b884-3987fb59491a', + datasetId: 'ds001246', + }, + { + userId: 'c529e86a-9d6a-40ca-acf8-ae1c9e7516fd', + datasetId: 'ds001246', + }, + { + userId: 'f35f14e0-8444-4dd8-8d34-7e8be9648881', + datasetId: 'ds001246', + }, + { + userId: 'ef18e4f3-a86e-412f-bc78-394a4f76720a', + datasetId: 'ds001246', + }, + { + userId: '7932d39a-9f2a-4858-b972-b1cb75f914c8', + datasetId: 'ds001246', + }, + { + userId: 'c6403e8d-684f-4598-b4cb-e706a98c06a0', + datasetId: 'ds001246', + }, + { + userId: '33a0e0f3-beec-4b9a-aaef-e4e68618b52e', + datasetId: 'ds001246', + }, + { + userId: '6b5f5a9b-80b7-4431-91da-5c652dbf1eb6', + datasetId: 'ds001246', + }, + { + userId: '9c9d0c89-19ae-498d-8683-59266d2d0647', + datasetId: 'ds001246', + }, + { + userId: 'ae7eec19-a8d4-4bbe-8560-c4010e44ff83', + datasetId: 'ds001246', + }, + ], + snapshots: [ + { + id: 'ds001246:00001', + created: '2018-07-15T14:49:11.480Z', + tag: '00001', + }, + { + id: 'ds001246:00002', + created: '2018-07-15T15:04:06.968Z', + tag: '00002', + }, + { + id: 'ds001246:00005', + created: '2018-07-15T15:12:17.847Z', + tag: '00005', + }, + { + id: 'ds001246:1.0.0', + created: '2018-09-10T08:58:30.848Z', + tag: '1.0.0', + }, + { + id: 'ds001246:1.0.1', + created: '2018-09-11T16:24:53.506Z', + tag: '1.0.1', + }, + { + id: 'ds001246:1.0.2', + created: '2019-02-21T03:10:20.087Z', + tag: '1.0.2', + }, + { + id: 'ds001246:1.1.0', + created: '2019-04-12T02:09:12.918Z', + tag: '1.1.0', + }, + { + id: 'ds001246:1.2.0', + created: '2019-12-06T20:42:29.879Z', + tag: '1.2.0', + }, + { + id: 'ds001246:1.2.1', + created: '2019-12-06T20:42:29.879Z', + tag: '1.2.1', + }, + ], + }, + }, + ], + pageInfo: { + startCursor: null, + endCursor: 'WzAuOTQ0Mzk4MywiZHMwMDEyNDYiXQ==', + hasPreviousPage: false, + hasNextPage: true, + count: 172, + }, + }, + }, + extensions: { + openneuro: { + version: '3.33.5', + }, + cacheControl: { + version: 1, + hints: [ + { + path: ['datasets'], + maxAge: 0, + }, + { + path: ['datasets', 'edges'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 0, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 1, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 2, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 3, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 4, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 5, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 6, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 7, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 8, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 9, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 10, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 11, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 12, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 13, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 14, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 15, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 16, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 17, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 18, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 19, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 20, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 21, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 22, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 23, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'edges', 24, 'node'], + maxAge: 0, + }, + { + path: ['datasets', 'pageInfo'], + maxAge: 0, + }, + ], + }, + }, +} diff --git a/packages/openneuro-components/src/search-page/CommunitySwoop.tsx b/packages/openneuro-components/src/search-page/CommunitySwoop.tsx index 6a8c71822a..0dd0f92cbe 100644 --- a/packages/openneuro-components/src/search-page/CommunitySwoop.tsx +++ b/packages/openneuro-components/src/search-page/CommunitySwoop.tsx @@ -22,9 +22,6 @@ export const CommunitySwoop = ({
  • -
    -
    -
    ) } diff --git a/packages/openneuro-components/src/search-page/ModalityHeader.tsx b/packages/openneuro-components/src/search-page/ModalityHeader.tsx index 888a65fe63..99b2a44559 100644 --- a/packages/openneuro-components/src/search-page/ModalityHeader.tsx +++ b/packages/openneuro-components/src/search-page/ModalityHeader.tsx @@ -22,7 +22,12 @@ export const ModalityHeader = ({ }: ModalityHeaderProps) => { console.log(hexBackgroundImage) return ( -
    +
    @@ -50,16 +55,6 @@ export const ModalityHeader = ({
    -
    -
    -
    -
    -
    ) } diff --git a/packages/openneuro-components/src/search-page/SearchPage.tsx b/packages/openneuro-components/src/search-page/SearchPage.tsx index ebec2a33c3..9da9089a6f 100644 --- a/packages/openneuro-components/src/search-page/SearchPage.tsx +++ b/packages/openneuro-components/src/search-page/SearchPage.tsx @@ -3,6 +3,7 @@ import { ModalityHeader } from './ModalityHeader' import { CommunitySwoop } from './CommunitySwoop' import { FacetExample } from '../facets/Facet.stories' +import { SearchResults } from './SearchResults.stories' import { SortBy } from './SearchSort.stories' import './search-page.scss' @@ -42,16 +43,42 @@ export const SearchPage = ({ portalContent }: SearchPageProps) => { ) : null}
    -
    -
    -
    - -
    -
    -
    - +
    +
    +

    + {portalContent ? 'Search MRI Portal' : 'Search all Dataset'} +

    +
    + +
    +
    +
    +
    + + 100 Datasets found for "MRI" + +
    +
    +
    + +
    - results todo +
    +
    + +
    + +
    +
    + +
    + + 100 Datasets found for "MRI" +
    diff --git a/packages/openneuro-components/src/search-page/SearchResult.stories.tsx b/packages/openneuro-components/src/search-page/SearchResult.stories.tsx index febb8717a9..013138d488 100644 --- a/packages/openneuro-components/src/search-page/SearchResult.stories.tsx +++ b/packages/openneuro-components/src/search-page/SearchResult.stories.tsx @@ -1,19 +1,22 @@ import React from 'react' import { Story, Meta } from '@storybook/react' -import { bimodal } from '../mock-content/bimodal-search-results' +import { mri } from '../mock-content/mri-search-results' import { SearchResult, SearchResultProps } from './SearchResult' export default { - title: 'Components/Search', + title: 'Components/SearchResult', component: SearchResult, } as Meta -const SearchResultTemplate: Story = ({ result }) => { - return +const SearchResultTemplate: Story = ({ node, profile }) => { + return } -export const SortBy = SearchResultTemplate.bind({}) -SortBy.args = { - result: bimodal.data.datasets.edges[0], +export const Result = SearchResultTemplate.bind({}) +Result.args = { + node: mri.data.datasets.edges[0].node, +} +Result.parameters = { + layout: 'centered', } diff --git a/packages/openneuro-components/src/search-page/SearchResult.tsx b/packages/openneuro-components/src/search-page/SearchResult.tsx index d8f80c6403..f750d2feb1 100644 --- a/packages/openneuro-components/src/search-page/SearchResult.tsx +++ b/packages/openneuro-components/src/search-page/SearchResult.tsx @@ -1,12 +1,293 @@ import React from 'react' +import bytes from 'bytes' +import parseISO from 'date-fns/parseISO' +import formatDistanceToNow from 'date-fns/formatDistanceToNow' +import { Link } from 'react-router-dom' +import { formatDate } from '../../../openneuro-app/src/scripts/utils/date.js' + +import { Tooltip } from '../tooltip/Tooltip' +import { Icon } from '../icon/Icon' + import './search-result.scss' +import activityPulseIcon from '../assets/activity-icon.png' + export interface SearchResultProps { - result: { + node: { id: string + created: string + uploader: { + id: string + name: string + } + public: boolean + permissions: { + id: string + userPermissions: [ + { + userId: string + level: string + access: string + user: { + id: string + name: string + email: string + provider: string + } + }, + ] + } + draft: { + id: string + summary: { + modalities: [string] + sessions: [] + subjects: [string] + subjectMetadata: [ + { + participantId: string + age: number + sex: string + group: null + }, + ] + tasks: [string] + size: number + totalFiles: number + dataProcessed: boolean + } + issues: [ + { + severity: string + }, + ] + description: { + Name: string + } + } + analytics: { + views: number + downloads: number + } + stars: [ + { + userId: string + datasetId: string + }, + ] + followers: [ + { + userId: string + datasetId: string + }, + ] + snapshots: [ + { + id: string + created: string + tag: string + }, + ] } + profile: Record } -export const SearchResult = ({ result }: SearchResultProps) => { - return <>{result.id} +export const SearchResult = ({ node, profile }: SearchResultProps) => { + console.log(node) + + const heading = node.draft.description.Name + const summary = node.draft.summary + const numSessions = summary.sessions.length > 0 ? summary.sessions.length : 1 + const numSubjects = summary.subjects.length > 0 ? summary.subjects.length : 1 + + const accessionNumber = ( + + Openneuro Acession Number: + {node.id} + + ) + const sessions = ( + + Sessions: + {numSessions} + + ) + const subjects = ( + + Subjects: + {numSubjects} + + ) + const size = ( + + Size: + {bytes(summary.size)} + + ) + const files = ( + + Files: + {summary.totalFiles} + + ) + + const uploader = ( +
    + Uploaded by: + {node.uploader.name} +
    + ) + const dateAdded = formatDate(node.created) + const dateAddedDifference = formatDistanceToNow(parseISO(node.created)) + const dateUpdated = formatDate( + node.snapshots[node.snapshots.length - 1].created, + ) + const dateUpdatedDifference = formatDistanceToNow( + parseISO(node.snapshots[node.snapshots.length - 1].created), + ) + + const lastUpdatedDate = ( +
    + {node.snapshots.length ? ( + <> + Updated: + {dateUpdated} - {dateUpdatedDifference} ago + + ) : null} +
    + ) + const addedDate = ( +
    + Uploaded: + {dateAdded} - {dateAddedDifference} ago +
    + ) + const downloads = node.analytics.downloads + ? node.analytics.downloads + ' Downloads' + : null + const views = node.analytics.views ? node.analytics.views + ' Views' : null + const following = node.followers.length + ? node.followers.length + ' Follower' + : null + const stars = node.stars.length ? node.stars.length + ' Bookmarked' : null + + const activtyTooltip = + downloads + '\n' + views + '\n' + following + '\n' + stars + + const activityIcon = ( + + + + ) + + const sharedWithIcon = ( + + + + ) + const publicIcon = ( + + + + ) + + const errorsIcon = ( + + + + ) + + const _list = (type, items) => { + function wrapWords(str) { + return str.replace(/\w+/g, '$&') + } + if (items && items.length > 0) { + return ( + <> + {type}: +
    + {items.map((item, index) => ( + + {item} + + ))} +
    + + ) + } else { + return null + } + } + const invalid = + !node.draft.issues || + node.draft.issues.some(issue => issue.severity === 'error') + const shared = !node.public && node.uploader.id !== profile.sub + + const datasetOwenerIcons = ( +
    + {node.public ? publicIcon : null} + {!shared ? sharedWithIcon : null} + {!invalid ? errorsIcon : null} +
    + ) + + const modalityList = summary.modalities ? ( +
    + {_list(<>Modalities, summary.modalities)} +
    + ) : null + + const taskList = summary.modalities ? ( +
    {_list(<>Tasks, summary.tasks)}
    + ) : null + + return ( + <> +
    +
    +

    + {heading} +

    +
    + {modalityList} + {taskList} +
    +
    +
    +
    + {datasetOwenerIcons} + {activityIcon} +
    +
    + {uploader} + {lastUpdatedDate} + {addedDate} +
    +
    +
    + {accessionNumber} + {sessions} + {subjects} + {size} + {files} +
    +
    + + ) } diff --git a/packages/openneuro-components/src/search-page/SearchResults.stories.tsx b/packages/openneuro-components/src/search-page/SearchResults.stories.tsx new file mode 100644 index 0000000000..c93e3640b5 --- /dev/null +++ b/packages/openneuro-components/src/search-page/SearchResults.stories.tsx @@ -0,0 +1,26 @@ +import React from 'react' +import { Story, Meta } from '@storybook/react' +import { mri } from '../mock-content/mri-search-results' + +import { SearchResult } from './SearchResult' + +export default { + title: 'Components/SearchResults', + component: SearchResult, +} as Meta + +const SearchResultsTemplate: Story = ({ items, profile }) => { + console.log(items) + return ( +
    + {items.map((item, index) => ( + + ))} +
    + ) +} + +export const SearchResults = SearchResultsTemplate.bind({}) +SearchResults.args = { + items: mri.data.datasets.edges, +} diff --git a/packages/openneuro-components/src/search-page/search-page.scss b/packages/openneuro-components/src/search-page/search-page.scss index 48ff682d6f..57ad932a42 100644 --- a/packages/openneuro-components/src/search-page/search-page.scss +++ b/packages/openneuro-components/src/search-page/search-page.scss @@ -1,28 +1,17 @@ +@import '../scss/variables'; + .search-page-portal-header { - margin: -200px 0 0; - padding: 145px 0 30px; - height: 290px; + // margin: -200px 0 0; + // padding: 145px 0 30px; + // height: 290px; position: relative; color: #fff; .hex-col { margin-top: 50px; + margin-bottom: -30px; position: relative; } - .swoop-wrap { - overflow: hidden; - max-width: 100%; - } - .search-swoop { - background: #444; - width: calc(100% + 40vw); - height: 550px; - border-radius: 100%; - margin: 0 0 0 -300px; - top: -100px; - position: absolute; - transform: scale(1.05) rotate(-3deg); - z-index: 1; - } + .primary-content, .secondary-content { font-weight: 300; @@ -41,23 +30,9 @@ } .search-page-coms { - overflow: hidden; position: relative; - margin: -160px 0 0; - padding: 180px 0 0; - height: 320px; - position: relative; - .search-swoop { - background: #f3f3f3; - width: calc(100% + 40vw); - height: 620px; - border-radius: 100%; - margin: 0 0 0 -160px; - top: -250px; - position: absolute; - transform: scale(1.05) rotate(-7.1deg); - z-index: -1; - } + background-color: #f3f7f6; + padding: 20px 0 40px; h2 { font-size: 19px; } @@ -174,10 +149,30 @@ } .search { - padding: 50px 0; + padding: 0 0 50px; +} +.search-results { + border: 1px solid #ddd; + border-radius: 4px; + .search-result { + border-bottom: 1px solid #ddd; + } +} +.search-facet-wrapper { + max-width: 500px; + margin-top: -47px; + .facet-accordion.on-accordion-wrapper { + padding: 0; + } } - .search-sort { display: flex; justify-content: flex-end; } + +.results-count { + padding: 20px 0; + span { + color: $current-theme-primary; + } +} diff --git a/packages/openneuro-components/src/search-page/search-result.scss b/packages/openneuro-components/src/search-page/search-result.scss index e69de29bb2..edac3147ee 100644 --- a/packages/openneuro-components/src/search-page/search-result.scss +++ b/packages/openneuro-components/src/search-page/search-result.scss @@ -0,0 +1,78 @@ +@import '../scss/variables'; +.search-result { + padding: 20px; + h3 { + margin: 0 0 20px; + a { + color: $current-theme-primary; + &:hover { + color: lighten($current-theme-primary, 10%); + } + } + } + + .result-icon-wrap, + .owner-icon-wrap { + display: flex; + justify-content: flex-end; + .result-icon { + margin-left: 15px; + } + } + .result-activity-icon { + width: 18px; + height: 19px; + + &[data-tooltip]::after { + width: 142px; + line-height: 1.6em; + text-align: center; + white-space: break-spaces; + } + } + + .result-meta-body > div { + margin-bottom: 20px; + font-size: 14px; + display: flex; + + strong { + text-transform: uppercase; + color: #777; + margin-right: 20px; + } + .list-item { + color: #c83fad; + display: inline-block; + padding: 0px 12px 0 0; + margin: 0 12px 10px 0; + border-right: 1px solid #cacaca; + &:last-child { + border: 0; + } + } + } + + .result-meta-footer { + display: flex; + .result-summary-meta { + margin-right: 10px; + padding: 5px 40px 5px 0; + font-size: 14px; + font-weight: 600; + strong { + text-transform: uppercase; + color: #777; + } + } + } + + .result-upload-info { + text-align: right; + font-size: 12px; + margin-top: 10px; + span { + color: #777; + } + } +} diff --git a/packages/openneuro-components/src/tooltip/Tooltip.tsx b/packages/openneuro-components/src/tooltip/Tooltip.tsx index 35c0881108..1a47bcdb41 100644 --- a/packages/openneuro-components/src/tooltip/Tooltip.tsx +++ b/packages/openneuro-components/src/tooltip/Tooltip.tsx @@ -5,9 +5,15 @@ export interface TooltipProps { tooltip: string flow: 'up' | 'down' | 'left' | 'right' children: React.ReactNode + className: string } -export const Tooltip = ({ children, tooltip, flow }: TooltipProps) => { +export const Tooltip = ({ + children, + tooltip, + flow, + className, +}: TooltipProps) => { const reference = useRef() useEffect(() => { const placement = @@ -16,7 +22,11 @@ export const Tooltip = ({ children, tooltip, flow }: TooltipProps) => { }, []) return ( - + {children} ) diff --git a/yarn.lock b/yarn.lock index 155997f077..5618701100 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,36 +35,6 @@ __metadata: languageName: node linkType: hard -"@apollo/client@npm:^3.3.19": - version: 3.3.19 - resolution: "@apollo/client@npm:3.3.19" - dependencies: - "@graphql-typed-document-node/core": ^3.0.0 - "@types/zen-observable": ^0.8.0 - "@wry/context": ^0.6.0 - "@wry/equality": ^0.4.0 - fast-json-stable-stringify: ^2.0.0 - graphql-tag: ^2.12.0 - hoist-non-react-statics: ^3.3.2 - optimism: ^0.16.0 - prop-types: ^15.7.2 - symbol-observable: ^2.0.0 - ts-invariant: ^0.7.0 - tslib: ^1.10.0 - zen-observable: ^0.8.14 - peerDependencies: - graphql: ^14.0.0 || ^15.0.0 - react: ^16.8.0 || ^17.0.0 - subscriptions-transport-ws: ^0.9.0 - peerDependenciesMeta: - react: - optional: true - subscriptions-transport-ws: - optional: true - checksum: a7266cfdff900ef71adece4d24c853fc6179dfe3d3b89905b468b0a487959a435ef84219fb1266c86e2edb0747ff0e52b6ac49dba72bdac7cdbc55e1d0a2e357 - languageName: node - linkType: hard - "@apollo/protobufjs@npm:1.2.2, @apollo/protobufjs@npm:^1.0.3": version: 1.2.2 resolution: "@apollo/protobufjs@npm:1.2.2" @@ -4880,7 +4850,6 @@ __metadata: version: 0.0.0-use.local resolution: "@openneuro/components@workspace:packages/openneuro-components" dependencies: - "@apollo/client": ^3.3.19 "@mdx-js/react": ^1.6.22 "@storybook/addon-a11y": ^6.2.8 "@storybook/addon-actions": ^6.2.8 @@ -4893,13 +4862,15 @@ __metadata: "@storybook/theming": ^6.2.8 "@testing-library/jest-dom": ^5.11.4 "@testing-library/react": ^11.1.0 + "@types/bytes": ^3 "@types/mdx-js__react": ^1 "@types/react-router-dom": ^5 "@types/react-slick": ^0 "@types/slick-carousel": ^1 + bytes: ^3.1.0 css-loader: ^5.2.1 date-fns: ^2.21.1 - graphql-hooks: ^5.1.1 + pluralize: ^8.0.0 rc-slider: ^9.7.2 react: ^17.0.1 react-router-dom: ^5.2.0 @@ -6553,6 +6524,13 @@ __metadata: languageName: node linkType: hard +"@types/bytes@npm:^3": + version: 3.1.0 + resolution: "@types/bytes@npm:3.1.0" + checksum: 184b8481789417872c8055811b4af7a41e1f5a30488ae0be8468ce0ca86f29a36a7175db9cc434599d50658ae0b709331323d97eb2a721e4ca1d2199da53a0a4 + languageName: node + linkType: hard + "@types/cheerio@npm:^0.22.22": version: 0.22.28 resolution: "@types/cheerio@npm:0.22.28" @@ -10567,7 +10545,7 @@ __metadata: languageName: node linkType: hard -"bytes@npm:3.1.0, bytes@npm:^3.0.0": +"bytes@npm:3.1.0, bytes@npm:^3.0.0, bytes@npm:^3.1.0": version: 3.1.0 resolution: "bytes@npm:3.1.0" checksum: c3f64645ef37922c8194fef88a052de2a28101882dfdf8a225493888c4941a26ea15164957e7492e5c5e3a8e98ee6276f4834efacb68e2d8ad4d91f903250b6c @@ -13355,13 +13333,6 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.0": - version: 2.0.2 - resolution: "dequal@npm:2.0.2" - checksum: 3b5b019a873da282a25512c632c077e5e8e2a019e71c5b6968836443b861e44176ee3934facfecdc14994d553c1ff4a6c7232278d6aef87baf65e2413d41760c - languageName: node - linkType: hard - "des.js@npm:^1.0.0": version: 1.0.1 resolution: "des.js@npm:1.0.1" @@ -15644,7 +15615,7 @@ __metadata: languageName: node linkType: hard -"extract-files@npm:9.0.0, extract-files@npm:^9.0.0": +"extract-files@npm:9.0.0": version: 9.0.0 resolution: "extract-files@npm:9.0.0" checksum: 021b10787718a2f81847e58bd5eea3b09d636e8bb3cf281dad2aeeafc439c32f9e7d2353b2b4b30f6a7febf93be9d1edd76706ea56cff6850b3f39e1594e5bb3 @@ -17957,18 +17928,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"graphql-hooks@npm:^5.1.1": - version: 5.1.1 - resolution: "graphql-hooks@npm:5.1.1" - dependencies: - dequal: ^2.0.0 - extract-files: ^9.0.0 - peerDependencies: - react: ^17.0.0 - checksum: 4d615236e206e70d6f334e513243385c10c9524d50542e6ca9eee85c843c0effea7d07fa5ff84b8b15619598c46a93a5cf7d6ec979c95118147473414525e1e9 - languageName: node - linkType: hard - "graphql-iso-date@npm:^3.6.1": version: 3.6.1 resolution: "graphql-iso-date@npm:3.6.1" @@ -25038,16 +24997,6 @@ fsevents@^1.2.7: languageName: node linkType: hard -"optimism@npm:^0.16.0": - version: 0.16.1 - resolution: "optimism@npm:0.16.1" - dependencies: - "@wry/context": ^0.6.0 - "@wry/trie": ^0.3.0 - checksum: 760b1295525ba86592edf245736ed704670330a8997d91144c1b45bc9f76e392b53c170fb1eb3b265f67584a4f7e205bc777d0c8ed97774326dba9fbfe899e27 - languageName: node - linkType: hard - "optimize-css-assets-webpack-plugin@npm:^5.0.3": version: 5.0.6 resolution: "optimize-css-assets-webpack-plugin@npm:5.0.6" From 346df910b968da7a5ec06af240e58c505d1b0924 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Sat, 29 May 2021 12:11:11 -0700 Subject: [PATCH 23/37] minor updates for PR 2146 --- packages/openneuro-components/src/header/Header.tsx | 6 ------ .../src/search-page/SearchResults.stories.tsx | 1 - packages/openneuro-components/src/tooltip/Tooltip.tsx | 2 +- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/openneuro-components/src/header/Header.tsx b/packages/openneuro-components/src/header/Header.tsx index e07efd3527..ff9f5d889a 100644 --- a/packages/openneuro-components/src/header/Header.tsx +++ b/packages/openneuro-components/src/header/Header.tsx @@ -82,12 +82,6 @@ export const Header: React.FC = ({
    {expanded ? : null}
    - {/*
    - {' '} -
    -
    -
    -
    */} {!profile ? ( diff --git a/packages/openneuro-components/src/search-page/SearchResults.stories.tsx b/packages/openneuro-components/src/search-page/SearchResults.stories.tsx index c93e3640b5..24007a9124 100644 --- a/packages/openneuro-components/src/search-page/SearchResults.stories.tsx +++ b/packages/openneuro-components/src/search-page/SearchResults.stories.tsx @@ -10,7 +10,6 @@ export default { } as Meta const SearchResultsTemplate: Story = ({ items, profile }) => { - console.log(items) return (
    {items.map((item, index) => ( diff --git a/packages/openneuro-components/src/tooltip/Tooltip.tsx b/packages/openneuro-components/src/tooltip/Tooltip.tsx index 1a47bcdb41..f1839b942d 100644 --- a/packages/openneuro-components/src/tooltip/Tooltip.tsx +++ b/packages/openneuro-components/src/tooltip/Tooltip.tsx @@ -5,7 +5,7 @@ export interface TooltipProps { tooltip: string flow: 'up' | 'down' | 'left' | 'right' children: React.ReactNode - className: string + className?: string } export const Tooltip = ({ From b7ec7adb2dd140485450156a987c85c1efe2aafe Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Sat, 29 May 2021 12:12:58 -0700 Subject: [PATCH 24/37] update in props [string] to string[] --- .../openneuro-components/src/search-page/SearchResult.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/openneuro-components/src/search-page/SearchResult.tsx b/packages/openneuro-components/src/search-page/SearchResult.tsx index f750d2feb1..acd68505c8 100644 --- a/packages/openneuro-components/src/search-page/SearchResult.tsx +++ b/packages/openneuro-components/src/search-page/SearchResult.tsx @@ -40,9 +40,9 @@ export interface SearchResultProps { draft: { id: string summary: { - modalities: [string] + modalities: string[] sessions: [] - subjects: [string] + subjects: string[] subjectMetadata: [ { participantId: string @@ -51,7 +51,7 @@ export interface SearchResultProps { group: null }, ] - tasks: [string] + tasks: string[] size: number totalFiles: number dataProcessed: boolean From 38b551d33ddb79d81ce792e1774ca0f21e5a2a53 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Sat, 29 May 2021 14:13:51 -0700 Subject: [PATCH 25/37] adding searchpagecontainer and some other cleanup --- .../src/facets/Facet.stories.tsx | 81 ++----------------- .../{FacetListWrap.tsx => FacetSelect.tsx} | 20 +++-- .../src/mock-content/facet-content.jsx | 71 ++++++++++++++++ .../src/mock-content/sortby-list.jsx | 24 ++++++ .../src/page/Page.stories.tsx | 14 +++- .../src/search-page/FiltersBlock.tsx | 8 ++ .../src/search-page/ModalityHeader.tsx | 1 - .../src/search-page/SearchPage.tsx | 64 ++++++--------- .../src/search-page/SearchPageContainer.tsx | 71 ++++++++++++++++ .../src/search-page/SearchResult.tsx | 2 - .../src/search-page/SearchResults.tsx | 19 +++++ .../src/search-page/SearchSort.stories.tsx | 12 +-- .../src/search-page/SearchSort.tsx | 11 ++- .../src/search-page/SearchSortContainer.tsx | 11 +++ .../src/search-page/filters-block.scss | 0 15 files changed, 262 insertions(+), 147 deletions(-) rename packages/openneuro-components/src/facets/{FacetListWrap.tsx => FacetSelect.tsx} (90%) create mode 100644 packages/openneuro-components/src/mock-content/facet-content.jsx create mode 100644 packages/openneuro-components/src/mock-content/sortby-list.jsx create mode 100644 packages/openneuro-components/src/search-page/FiltersBlock.tsx create mode 100644 packages/openneuro-components/src/search-page/SearchPageContainer.tsx create mode 100644 packages/openneuro-components/src/search-page/SearchResults.tsx create mode 100644 packages/openneuro-components/src/search-page/SearchSortContainer.tsx create mode 100644 packages/openneuro-components/src/search-page/filters-block.scss diff --git a/packages/openneuro-components/src/facets/Facet.stories.tsx b/packages/openneuro-components/src/facets/Facet.stories.tsx index a41b7d07de..ac29bea7dd 100644 --- a/packages/openneuro-components/src/facets/Facet.stories.tsx +++ b/packages/openneuro-components/src/facets/Facet.stories.tsx @@ -1,14 +1,15 @@ import React from 'react' import { Story, Meta } from '@storybook/react' -import { FacetListWrap, FacetListWrapProps } from './FacetListWrap' +import { FacetSelect, FacetSelectProps } from './FacetSelect' +import { modalities } from '../mock-content/facet-content' export default { title: 'Components/Facet', - component: FacetListWrap, + component: FacetSelect, } as Meta -const FacetListWrapTemplate: Story = ({ +const FacetSelectTemplate: Story = ({ items, startOpen, label, @@ -19,7 +20,7 @@ const FacetListWrapTemplate: Story = ({ return (
    - = ({ ) } -const modalities = [ - { - label: 'MRI', - value: 'MRI', - count: 3000, - children: [ - { - label: 'Functional', - value: 'Functional', - count: 300, - }, - { - label: 'Structural', - value: 'Structural', - count: 200, - }, - { - label: 'Diffusion', - value: 'Diffusion', - count: 300, - }, - { - label: 'Perfusion', - value: 'Perfusion', - count: 150, - }, - ], - }, - { - label: 'EEG', - value: 'EEG', - count: 303, - children: [ - { - label: 'ECoG', - value: 'ECoG', - count: 300, - }, - { - label: 'SEEG', - value: 'SEEG', - count: 200, - }, - ], - }, - { - label: 'MEG', - value: 'MEG', - count: 330, - }, - { - label: 'PET', - value: 'PET', - count: 30, - children: [ - { - label: 'Static', - value: 'Static', - count: 300, - }, - { - label: 'Dynamic', - value: 'Dynamic', - count: 200, - }, - ], - }, -] -export const FacetExample = FacetListWrapTemplate.bind({}) +export const FacetExample = FacetSelectTemplate.bind({}) FacetExample.args = { items: modalities, accordionStyle: 'plain', @@ -108,7 +41,7 @@ FacetExample.args = { startOpen: true, } -export const FrontFacetExample = FacetListWrapTemplate.bind({}) +export const FrontFacetExample = FacetSelectTemplate.bind({}) FrontFacetExample.args = { items: modalities, accordionStyle: 'plain', diff --git a/packages/openneuro-components/src/facets/FacetListWrap.tsx b/packages/openneuro-components/src/facets/FacetSelect.tsx similarity index 90% rename from packages/openneuro-components/src/facets/FacetListWrap.tsx rename to packages/openneuro-components/src/facets/FacetSelect.tsx index 110edf94b9..8f9b69e285 100644 --- a/packages/openneuro-components/src/facets/FacetListWrap.tsx +++ b/packages/openneuro-components/src/facets/FacetSelect.tsx @@ -3,15 +3,13 @@ import { AccordionTab } from '../accordion/AccordionTab' import { AccordionWrap } from '../accordion/AccordionWrap' import './facet.scss' -export interface FacetListWrapProps { - items: [ - { - label: string - value: string - count: number - children: React.ReactNode - }, - ] +export interface FacetSelectProps { + items: { + label: string + value: string + count: number + children?: null | { label: string; value: string; count: number }[] + } accordionStyle: string startOpen: boolean label: string @@ -25,7 +23,7 @@ export interface FacetListWrapProps { setSelected: (selected: { label: string; value: string }) => void } -export const FacetListWrap = ({ +export const FacetSelect = ({ items, selected, setSelected, @@ -33,7 +31,7 @@ export const FacetListWrap = ({ label, accordionStyle, dropdown, -}: FacetListWrapProps) => { +}: FacetSelectProps) => { const setSelectorNoPropagation = (e, item) => { e.stopPropagation() setSelected(item) diff --git a/packages/openneuro-components/src/mock-content/facet-content.jsx b/packages/openneuro-components/src/mock-content/facet-content.jsx new file mode 100644 index 0000000000..7a521829c9 --- /dev/null +++ b/packages/openneuro-components/src/mock-content/facet-content.jsx @@ -0,0 +1,71 @@ +import React from 'react' + +export const modalities = [ + { + label: 'MRI', + value: 'MRI', + count: 3000, + children: [ + { + label: 'Functional', + value: 'Functional', + count: 300, + }, + { + label: 'Structural', + value: 'Structural', + count: 200, + }, + { + label: 'Diffusion', + value: 'Diffusion', + count: 300, + }, + { + label: 'Perfusion', + value: 'Perfusion', + count: 150, + }, + ], + }, + { + label: 'EEG', + value: 'EEG', + count: 303, + children: [ + { + label: 'ECoG', + value: 'ECoG', + count: 300, + }, + { + label: 'SEEG', + value: 'SEEG', + count: 200, + }, + ], + }, + { + label: 'MEG', + value: 'MEG', + count: 330, + children: null, + }, + { + label: 'PET', + value: 'PET', + count: 30, + children: [ + { + label: 'Static', + value: 'Static', + count: 300, + }, + { + label: 'Dynamic', + value: 'Dynamic', + count: 200, + }, + ], + }, +] diff --git a/packages/openneuro-components/src/mock-content/sortby-list.jsx b/packages/openneuro-components/src/mock-content/sortby-list.jsx new file mode 100644 index 0000000000..62ef2bf747 --- /dev/null +++ b/packages/openneuro-components/src/mock-content/sortby-list.jsx @@ -0,0 +1,24 @@ +import React from 'react' + +export const sortBy = [ + { + label: 'Newest', + value: 'newest', + }, + { + label: 'Oldest', + value: 'oldest', + }, + { + label: 'A-Z', + value: 'alphaDesc', + }, + { + label: 'Z-A', + value: 'alphaAsc', + }, + { + label: 'Activity', + value: 'activity', + }, +] diff --git a/packages/openneuro-components/src/page/Page.stories.tsx b/packages/openneuro-components/src/page/Page.stories.tsx index 2a272ed492..a4976139fa 100644 --- a/packages/openneuro-components/src/page/Page.stories.tsx +++ b/packages/openneuro-components/src/page/Page.stories.tsx @@ -3,10 +3,11 @@ import { Story, Meta } from '@storybook/react' import { Page, PageProps } from './Page' import { FrontPage } from '../front-page/FrontPage' -import { SearchPage } from '../search-page/SearchPage' +import { SearchPageContainer } from '../search-page/SearchPageContainer' import * as HeaderStories from '../header/Header.stories' import { MRIPortalContent } from '../mock-content/portal-content' +import { mri } from '../mock-content/mri-search-results' export default { title: 'Example/Page', @@ -24,13 +25,18 @@ FrontPageExample.args = { export const SearchPageExample = Template.bind({}) SearchPageExample.args = { - children: , + children: , headerArgs: HeaderStories.LoggedOut.args, - className: 'search-page', + className: 'search-page search-page-mri', } export const MRIPortalPageExample = Template.bind({}) MRIPortalPageExample.args = { - children: , + children: ( + + ), headerArgs: HeaderStories.LoggedOut.args, className: 'search-page', } diff --git a/packages/openneuro-components/src/search-page/FiltersBlock.tsx b/packages/openneuro-components/src/search-page/FiltersBlock.tsx new file mode 100644 index 0000000000..bf58220e36 --- /dev/null +++ b/packages/openneuro-components/src/search-page/FiltersBlock.tsx @@ -0,0 +1,8 @@ +import React from 'react' +import './filters-block.scss' + +export interface FiltersBlockProps {} + +export const FiltersBlock = ({}: FiltersBlockProps) => { + return <>filters block +} diff --git a/packages/openneuro-components/src/search-page/ModalityHeader.tsx b/packages/openneuro-components/src/search-page/ModalityHeader.tsx index 99b2a44559..788277d3d4 100644 --- a/packages/openneuro-components/src/search-page/ModalityHeader.tsx +++ b/packages/openneuro-components/src/search-page/ModalityHeader.tsx @@ -20,7 +20,6 @@ export const ModalityHeader = ({ swoopBackgroundColorLight, swoopBackgroundColorDark, }: ModalityHeaderProps) => { - console.log(hexBackgroundImage) return (
    + renderSearchFacets: () => React.ReactNode + renderSearchResults: () => React.ReactNode + renderSortBy: () => React.ReactNode } -export const SearchPage = ({ portalContent }: SearchPageProps) => { +export const SearchPage = ({ + portalContent, + renderSearchFacets, + renderSearchResults, + renderSortBy, +}: SearchPageProps) => { return ( <> -
    +
    {portalContent ? ( <> {portalContent.portalName ? ( @@ -42,48 +50,22 @@ export const SearchPage = ({ portalContent }: SearchPageProps) => { ) : null} -
    -
    -
    -

    - {portalContent ? 'Search MRI Portal' : 'Search all Dataset'} -

    -
    - -
    -
    -
    -
    - - 100 Datasets found for "MRI" - -
    -
    -
    - -
    -
    -
    -
    +
    +
    +

    + {portalContent ? 'Search MRI Portal' : 'Search all Dataset'} +

    +
    -
    - -
    -
    - -
    - - 100 Datasets found for "MRI" - -
    +
    +
    + {renderSortBy()}
    -
    -
    +
    {renderSearchFacets()}
    +
    {renderSearchResults()}
    +
    +
    ) } diff --git a/packages/openneuro-components/src/search-page/SearchPageContainer.tsx b/packages/openneuro-components/src/search-page/SearchPageContainer.tsx new file mode 100644 index 0000000000..2b18eae1e9 --- /dev/null +++ b/packages/openneuro-components/src/search-page/SearchPageContainer.tsx @@ -0,0 +1,71 @@ +import React from 'react' +import { FacetSelect } from '../facets/FacetSelect' +import { SearchResults } from './SearchResults' +import { FiltersBlock } from './FiltersBlock' +import { SearchPage } from './SearchPage' +import { SearchSortContainer } from './SearchSortContainer' + +import { sortBy } from '../mock-content/sortby-list' +import { modalities } from '../mock-content/facet-content' + +import './search-page.scss' + +export interface SearchContainereProps { + portalContent?: Record + searchResults + profile?: Record +} + +export const SearchPageContainer = ({ + searchResults, + portalContent, + profile, +}: SearchContainereProps) => { + return ( +
    + ( + <> +
    +
    + + 100 Datasets found for "MRI" + +
    +
    +
    + +
    +
    + + )} + renderSearchFacets={() => ( + <> + + + + )} + renderSearchResults={() => ( + <> + +
    + + 100 Datasets found for "MRI" + +
    + + )} + /> +
    + ) +} diff --git a/packages/openneuro-components/src/search-page/SearchResult.tsx b/packages/openneuro-components/src/search-page/SearchResult.tsx index acd68505c8..fcaca72949 100644 --- a/packages/openneuro-components/src/search-page/SearchResult.tsx +++ b/packages/openneuro-components/src/search-page/SearchResult.tsx @@ -93,8 +93,6 @@ export interface SearchResultProps { } export const SearchResult = ({ node, profile }: SearchResultProps) => { - console.log(node) - const heading = node.draft.description.Name const summary = node.draft.summary const numSessions = summary.sessions.length > 0 ? summary.sessions.length : 1 diff --git a/packages/openneuro-components/src/search-page/SearchResults.tsx b/packages/openneuro-components/src/search-page/SearchResults.tsx new file mode 100644 index 0000000000..4ac9bf139c --- /dev/null +++ b/packages/openneuro-components/src/search-page/SearchResults.tsx @@ -0,0 +1,19 @@ +import React from 'react' + +import { SearchResult } from './SearchResult' + +import './search-page.scss' + +export interface SearchResultsProps { + items + profile?: Record +} +export const SearchResults = ({ items, profile }: SearchResultsProps) => { + return ( +
    + {items.map((item, index) => ( + + ))} +
    + ) +} diff --git a/packages/openneuro-components/src/search-page/SearchSort.stories.tsx b/packages/openneuro-components/src/search-page/SearchSort.stories.tsx index 31cf8d03d9..28255df92e 100644 --- a/packages/openneuro-components/src/search-page/SearchSort.stories.tsx +++ b/packages/openneuro-components/src/search-page/SearchSort.stories.tsx @@ -1,19 +1,15 @@ import React from 'react' import { Story, Meta } from '@storybook/react' -import { SearchSort, SearchSortProps } from './SearchSort' +import { SearchSortContainer } from './SearchSortContainer' export default { title: 'Components/Search', - component: SearchSort, + component: SearchSortContainer, } as Meta -const SearchSortTemplate: Story = ({ items }) => { - const [selected, setSelected] = React.useState(items[0]) - - return ( - - ) +const SearchSortTemplate: Story = ({ items }) => { + return } const menuItems = [ diff --git a/packages/openneuro-components/src/search-page/SearchSort.tsx b/packages/openneuro-components/src/search-page/SearchSort.tsx index 170ac242c6..253ec55f1d 100644 --- a/packages/openneuro-components/src/search-page/SearchSort.tsx +++ b/packages/openneuro-components/src/search-page/SearchSort.tsx @@ -4,12 +4,11 @@ import '../dropdown/dropdown.scss' import './search-sort.scss' export interface SearchSortProps { - items: [ - { - label: string - value: string - }, - ] + items: { + label: string + value: string + }[] + selected: { label: string value: string diff --git a/packages/openneuro-components/src/search-page/SearchSortContainer.tsx b/packages/openneuro-components/src/search-page/SearchSortContainer.tsx new file mode 100644 index 0000000000..e57cb21883 --- /dev/null +++ b/packages/openneuro-components/src/search-page/SearchSortContainer.tsx @@ -0,0 +1,11 @@ +import React from 'react' +import { Story, Meta } from '@storybook/react' + +import { SearchSort } from './SearchSort' + +export const SearchSortContainer = ({ items }) => { + const [selected, setSelected] = React.useState(items[0]) + return ( + + ) +} diff --git a/packages/openneuro-components/src/search-page/filters-block.scss b/packages/openneuro-components/src/search-page/filters-block.scss new file mode 100644 index 0000000000..e69de29bb2 From 9d77a50a33241fa339965fb33c5f3e6e050a218e Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Sat, 29 May 2021 16:31:00 -0700 Subject: [PATCH 26/37] working on adding containers --- .../src/facets/FacetRadio.tsx | 54 +++++++++++++++++++ .../src/mock-content/facet-content.jsx | 20 +++++++ .../src/mock-content/radio-content.jsx | 17 ------ .../src/radio/Radio.stories.tsx | 6 +-- .../src/radio/RadioGroup.tsx | 14 +++-- .../src/search-page/FacetBlockContainer.tsx | 40 ++++++++++++++ .../src/search-page/FiltersBlock.tsx | 21 +++++++- .../src/search-page/FiltersBlockContainer.tsx | 7 +++ .../src/search-page/KeywordInputContainer.tsx | 20 +++++++ .../src/search-page/SearchPageContainer.tsx | 26 +++------ .../src/search-page/SearchSortContainer.tsx | 2 - .../src/search-page/filters-block.scss | 34 ++++++++++++ .../src/search-page/search-page.scss | 2 +- 13 files changed, 213 insertions(+), 50 deletions(-) create mode 100644 packages/openneuro-components/src/facets/FacetRadio.tsx delete mode 100644 packages/openneuro-components/src/mock-content/radio-content.jsx create mode 100644 packages/openneuro-components/src/search-page/FacetBlockContainer.tsx create mode 100644 packages/openneuro-components/src/search-page/FiltersBlockContainer.tsx create mode 100644 packages/openneuro-components/src/search-page/KeywordInputContainer.tsx diff --git a/packages/openneuro-components/src/facets/FacetRadio.tsx b/packages/openneuro-components/src/facets/FacetRadio.tsx new file mode 100644 index 0000000000..f27b409ae8 --- /dev/null +++ b/packages/openneuro-components/src/facets/FacetRadio.tsx @@ -0,0 +1,54 @@ +import React from 'react' +import { AccordionTab } from '../accordion/AccordionTab' +import { AccordionWrap } from '../accordion/AccordionWrap' +import { RadioGroup } from '../radio/RadioGroup' +import './facet.scss' + +export interface FacetRadioProps { + radioArr: { + label: string + onChange?: React.MouseEventHandler + checked: boolean + value: string + }[] + layout: string + name: string + accordionStyle: string + startOpen: boolean + label: string + dropdown: boolean + active: number + setActive: (index) => void +} + +export const FacetRadio = ({ + radioArr, + layout, + name, + startOpen, + label, + accordionStyle, + dropdown, + active, + setActive, +}: FacetRadioProps) => { + return ( + + +
    + +
    +
    +
    + ) +} diff --git a/packages/openneuro-components/src/mock-content/facet-content.jsx b/packages/openneuro-components/src/mock-content/facet-content.jsx index 7a521829c9..7dca2bff3e 100644 --- a/packages/openneuro-components/src/mock-content/facet-content.jsx +++ b/packages/openneuro-components/src/mock-content/facet-content.jsx @@ -69,3 +69,23 @@ export const modalities = [ ], }, ] + +export const showDatasetsRadio = [ + { + label: 'All', + value: 'All', + }, + + { + label: 'Following', + value: 'following', + }, + { + label: 'My Datasets', + value: 'datasets', + }, + { + label: 'My Bookmarks', + value: 'bookmarks', + }, +] diff --git a/packages/openneuro-components/src/mock-content/radio-content.jsx b/packages/openneuro-components/src/mock-content/radio-content.jsx deleted file mode 100644 index d183766078..0000000000 --- a/packages/openneuro-components/src/mock-content/radio-content.jsx +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react' - -export const RadioContent = [ - { - label: 'All', - value: 'All', - }, - - { - label: 'My Bookmarks', - value: 'mybookmarks', - }, - { - label: 'Shared with me', - value: 'shared', - }, -] diff --git a/packages/openneuro-components/src/radio/Radio.stories.tsx b/packages/openneuro-components/src/radio/Radio.stories.tsx index c966caac66..293e82416a 100644 --- a/packages/openneuro-components/src/radio/Radio.stories.tsx +++ b/packages/openneuro-components/src/radio/Radio.stories.tsx @@ -3,7 +3,7 @@ import { Story, Meta } from '@storybook/react' import { RadioGroup, RadioGroupProps } from './RadioGroup' -import { RadioContent } from '../mock-content/radio-content.jsx' +import { showDatasetsRadio } from '../mock-content/facet-content' export default { title: 'Components/Form/Radio', @@ -25,14 +25,14 @@ const RadioTemplate: Story = ({ radioArr, layout, name }) => { export const RowRadio = RadioTemplate.bind({}) RowRadio.args = { - radioArr: RadioContent, + radioArr: showDatasetsRadio, layout: 'row', name: 'radio-row', } export const ColumnRadio = RadioTemplate.bind({}) ColumnRadio.args = { - radioArr: RadioContent, + radioArr: showDatasetsRadio, layout: 'column', name: 'radio-column', } diff --git a/packages/openneuro-components/src/radio/RadioGroup.tsx b/packages/openneuro-components/src/radio/RadioGroup.tsx index fc6559abf0..8f9c5218f0 100644 --- a/packages/openneuro-components/src/radio/RadioGroup.tsx +++ b/packages/openneuro-components/src/radio/RadioGroup.tsx @@ -5,14 +5,12 @@ import './radio.scss' export interface RadioGroupProps { layout: string - radioArr: [ - { - label: string - onChange?: React.MouseEventHandler - checked: boolean - value: string - }, - ] + radioArr: { + label: string + onChange?: React.MouseEventHandler + checked: boolean + value: string + }[] name: string active: number setActive: (index) => void diff --git a/packages/openneuro-components/src/search-page/FacetBlockContainer.tsx b/packages/openneuro-components/src/search-page/FacetBlockContainer.tsx new file mode 100644 index 0000000000..984120bf9f --- /dev/null +++ b/packages/openneuro-components/src/search-page/FacetBlockContainer.tsx @@ -0,0 +1,40 @@ +import React from 'react' + +import { FacetSelect } from '../facets/FacetSelect' +import { FacetRadio } from '../facets/FacetRadio' +import { modalities, showDatasetsRadio } from '../mock-content/facet-content' + +export const FacetBlockContainer = () => { + const [selected, setSelected] = React.useState() + const [active, setActive] = React.useState(0) + return ( + <> + + + + + ) +} diff --git a/packages/openneuro-components/src/search-page/FiltersBlock.tsx b/packages/openneuro-components/src/search-page/FiltersBlock.tsx index bf58220e36..946d40ece2 100644 --- a/packages/openneuro-components/src/search-page/FiltersBlock.tsx +++ b/packages/openneuro-components/src/search-page/FiltersBlock.tsx @@ -1,8 +1,27 @@ import React from 'react' +import { Button } from '../button/Button' import './filters-block.scss' export interface FiltersBlockProps {} export const FiltersBlock = ({}: FiltersBlockProps) => { - return <>filters block + return ( + <> +
      +
    • + Modality:Functional× +
    • +
    • + Gender:Male× +
    • +
    • + Task:Coordsystems× +
    • +
    • + Age:20-40× +
    • +
    +
    ) } diff --git a/packages/openneuro-components/src/search-page/FiltersBlockContainer.tsx b/packages/openneuro-components/src/search-page/FiltersBlockContainer.tsx deleted file mode 100644 index f8f08de22f..0000000000 --- a/packages/openneuro-components/src/search-page/FiltersBlockContainer.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import React from 'react' - -import { FiltersBlock } from './FiltersBlock' - -export const FiltersBlockContainer = () => { - return -} diff --git a/packages/openneuro-components/src/search-page/KeywordInputContainer.tsx b/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx similarity index 68% rename from packages/openneuro-components/src/search-page/KeywordInputContainer.tsx rename to packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx index 4e595f7ec7..440ac80908 100644 --- a/packages/openneuro-components/src/search-page/KeywordInputContainer.tsx +++ b/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx @@ -1,9 +1,9 @@ import React from 'react' import { Input } from '../input/Input' -export const KeywordInputContainer = () => { - const [value, setValue] = React.useState() - +export const KeywordInputContainerExample = ({ searchValue }) => { + const [value, setValue] = React.useState(searchValue) + console.log(value) return ( <> - searchResults - profile?: Record -} - -export const SearchPageContainer = ({ - searchResults, - portalContent, - profile, -}: SearchContainereProps) => { - return ( -
    - ( - <> -
    - - 100 Datasets found for "MRI" - -
    -
    -
    - -
    -
    - - )} - renderSearchFacets={() => ( - <> - - - - - )} - renderSearchResults={() => ( - <> - -
    - - 100 Datasets found for "MRI" - -
    - - )} - /> -
    - ) -} diff --git a/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx b/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx new file mode 100644 index 0000000000..e72931270f --- /dev/null +++ b/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx @@ -0,0 +1,203 @@ +import React from 'react' +import { FacetBlockContainerExample } from './FacetBlockContainerExample' +import { SearchResults } from './SearchResults' +import { FiltersBlock } from './FiltersBlock' +import { SearchPage } from './SearchPage' +import { SearchSortContainerExample } from './SearchSortContainerExample' +import { KeywordInputContainerExample } from './KeywordInputContainerExample' +import { sortBy } from '../mock-content/sortby-list' +import { FacetSelect } from '../facets/FacetSelect' +import { FacetRadio } from '../facets/FacetRadio' +import { FacetRange } from '../facets/FacetRange' + +import { + modalities, + show_available, + showMyUploads_available, + diagnosis, + task, + author_pi, + gender, + species, + section, + domain, +} from '../mock-content/facet-content' +import { AccordionWrap } from '../accordion/AccordionWrap' +import { AccordionTab } from '../accordion/AccordionTab' + +import './search-page.scss' + +export interface SearchContainereProps { + portalContent?: Record + searchResults + profile?: Record +} + +export const SearchPageContainerExample = ({ + searchResults, + portalContent, + profile, +}: SearchContainereProps) => { + const [selected, setSelected] = React.useState() + const [active, setActive] = React.useState(0) + const [newvalue, setNewValue] = React.useState([0, 20]) + console.log(active) + return ( +
    + ( + <> +
    + + 100 Datasets found for "MRI" + +
    +
    +
    + +
    +
    + + )} + renderSearchFacets={() => ( + <> + + + + + + + + {active == 2 ? ( + + ) : null} + + + + + + + + + + + + + + + + + )} + renderSearchResults={() => ( + <> + +
    + + 100 Datasets found for "MRI" + +
    + + )} + /> +
    + ) +} diff --git a/packages/openneuro-components/src/search-page/SearchResults.stories.tsx b/packages/openneuro-components/src/search-page/SearchResults.stories.tsx index 24007a9124..e11bd23674 100644 --- a/packages/openneuro-components/src/search-page/SearchResults.stories.tsx +++ b/packages/openneuro-components/src/search-page/SearchResults.stories.tsx @@ -12,8 +12,8 @@ export default { const SearchResultsTemplate: Story = ({ items, profile }) => { return (
    - {items.map((item, index) => ( - + {items.map(({ node }) => ( + ))}
    ) diff --git a/packages/openneuro-components/src/search-page/SearchResults.tsx b/packages/openneuro-components/src/search-page/SearchResults.tsx index 4ac9bf139c..2a62312489 100644 --- a/packages/openneuro-components/src/search-page/SearchResults.tsx +++ b/packages/openneuro-components/src/search-page/SearchResults.tsx @@ -11,8 +11,8 @@ export interface SearchResultsProps { export const SearchResults = ({ items, profile }: SearchResultsProps) => { return (
    - {items.map((item, index) => ( - + {items.map(({ node }, index) => ( + ))}
    ) diff --git a/packages/openneuro-components/src/search-page/SearchSort.stories.tsx b/packages/openneuro-components/src/search-page/SearchSort.stories.tsx index 28255df92e..cedab8ae1d 100644 --- a/packages/openneuro-components/src/search-page/SearchSort.stories.tsx +++ b/packages/openneuro-components/src/search-page/SearchSort.stories.tsx @@ -1,15 +1,15 @@ import React from 'react' import { Story, Meta } from '@storybook/react' -import { SearchSortContainer } from './SearchSortContainer' +import { SearchSortContainerExample } from './SearchSortContainerExample' export default { title: 'Components/Search', - component: SearchSortContainer, + component: SearchSortContainerExample, } as Meta const SearchSortTemplate: Story = ({ items }) => { - return + return } const menuItems = [ diff --git a/packages/openneuro-components/src/search-page/SearchSortContainer.tsx b/packages/openneuro-components/src/search-page/SearchSortContainerExample.tsx similarity index 79% rename from packages/openneuro-components/src/search-page/SearchSortContainer.tsx rename to packages/openneuro-components/src/search-page/SearchSortContainerExample.tsx index ea736713b2..db9418e176 100644 --- a/packages/openneuro-components/src/search-page/SearchSortContainer.tsx +++ b/packages/openneuro-components/src/search-page/SearchSortContainerExample.tsx @@ -1,7 +1,7 @@ import React from 'react' import { SearchSort } from './SearchSort' -export const SearchSortContainer = ({ items }) => { +export const SearchSortContainerExample = ({ items }) => { const [selected, setSelected] = React.useState(items[0]) return ( diff --git a/packages/openneuro-components/src/search-page/filters-block.scss b/packages/openneuro-components/src/search-page/filters-block.scss index d64a10b221..5a730c4e3a 100644 --- a/packages/openneuro-components/src/search-page/filters-block.scss +++ b/packages/openneuro-components/src/search-page/filters-block.scss @@ -4,30 +4,42 @@ display: block; border: 1px solid; width: 100%; + background-color: #fff; transition: background-color 0.3s; &:hover { text-decoration: none; - background-color: #eee; + background-color: #dfdfdf; } } - .active-filters { - padding: 0; + .filters-block { + background-color: #eee; + padding: 30px 20px; margin: 10px 0; - list-style: none; - display: flex; - flex-wrap: wrap; - li { + .active-filters { + padding: 0; + margin: 0 0 20px; + list-style: none; display: flex; - align-items: center; - margin-right: 10px; - strong { - margin-right: 10px; - } - span { - color: $current-theme-primary; - font-size: 22px; - margin-left: 8px; + flex-wrap: wrap; + li { + display: flex; + align-items: center; + margin-right: 30px; + font-size: 13px; + line-height: 1.7em; + + strong { + margin-right: 10px; + text-transform: uppercase; + color: #777; + } + span { + color: $current-theme-primary; + font-size: 22px; + margin-left: 8px; + margin-top: -1px; + } } } } diff --git a/packages/openneuro-components/src/search-page/search-page.scss b/packages/openneuro-components/src/search-page/search-page.scss index 9f15e07899..5cf83f40c8 100644 --- a/packages/openneuro-components/src/search-page/search-page.scss +++ b/packages/openneuro-components/src/search-page/search-page.scss @@ -176,3 +176,11 @@ color: $current-theme-primary; } } + +.on-accordion-wrapper .search-facets-more { + .accordion-title { + font-size: 12px; + font-weight: 600; + text-transform: uppercase; + } +} From 6a0956cf09744f8612e276fd608da1238b64945c Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Sun, 30 May 2021 16:00:29 -0700 Subject: [PATCH 28/37] adding array type to children --- packages/openneuro-components/src/facets/FacetSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/openneuro-components/src/facets/FacetSelect.tsx b/packages/openneuro-components/src/facets/FacetSelect.tsx index 8f9b69e285..9016806d48 100644 --- a/packages/openneuro-components/src/facets/FacetSelect.tsx +++ b/packages/openneuro-components/src/facets/FacetSelect.tsx @@ -9,7 +9,7 @@ export interface FacetSelectProps { value: string count: number children?: null | { label: string; value: string; count: number }[] - } + }[] accordionStyle: string startOpen: boolean label: string From 5db491247478682ac11d7c7fde812206be7de763 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Sun, 30 May 2021 19:54:42 -0700 Subject: [PATCH 29/37] update to setSeclected on Radio --- .../src/facets/FacetRadio.tsx | 13 +-- .../src/facets/FacetRange.tsx | 9 +- .../src/facets/FacetSelect.tsx | 8 +- .../src/mock-content/facet-content.jsx | 37 ++---- .../src/radio/RadioGroup.tsx | 15 ++- .../KeywordInputContainerExample.tsx | 1 - .../SearchPageContainerExample.tsx | 105 ++++++++++-------- 7 files changed, 86 insertions(+), 102 deletions(-) diff --git a/packages/openneuro-components/src/facets/FacetRadio.tsx b/packages/openneuro-components/src/facets/FacetRadio.tsx index 393749e597..a6a890f163 100644 --- a/packages/openneuro-components/src/facets/FacetRadio.tsx +++ b/packages/openneuro-components/src/facets/FacetRadio.tsx @@ -8,7 +8,6 @@ export interface FacetRadioProps { radioArr: { label: string onChange?: React.MouseEventHandler - checked: boolean value: string }[] layout: string @@ -17,8 +16,8 @@ export interface FacetRadioProps { startOpen: boolean label: string dropdown?: boolean - active: number - setActive: (index) => void + selected: string + setSelected: (value) => void } export const FacetRadio = ({ @@ -29,8 +28,8 @@ export const FacetRadio = ({ label, accordionStyle, dropdown, - active, - setActive, + selected, + setSelected, }: FacetRadioProps) => { return ( @@ -41,8 +40,8 @@ export const FacetRadio = ({ dropdown={dropdown}>
    void } @@ -48,6 +48,7 @@ export const FacetRange = ({ max={max} step={step} dots={dots} + marks={marks} pushable={pushable} defaultValue={defaultValue} newvalue={newvalue} diff --git a/packages/openneuro-components/src/facets/FacetSelect.tsx b/packages/openneuro-components/src/facets/FacetSelect.tsx index 9016806d48..6bc5c7108c 100644 --- a/packages/openneuro-components/src/facets/FacetSelect.tsx +++ b/packages/openneuro-components/src/facets/FacetSelect.tsx @@ -7,18 +7,18 @@ export interface FacetSelectProps { items: { label: string value: string - count: number + count?: number children?: null | { label: string; value: string; count: number }[] }[] accordionStyle: string startOpen: boolean label: string - dropdown: boolean + dropdown?: boolean selected: { label: string value: string - count: number - children: React.ReactNode + count?: number + children?: React.ReactNode } setSelected: (selected: { label: string; value: string }) => void } diff --git a/packages/openneuro-components/src/mock-content/facet-content.jsx b/packages/openneuro-components/src/mock-content/facet-content.jsx index 63fb7592ff..85b1c29167 100644 --- a/packages/openneuro-components/src/mock-content/facet-content.jsx +++ b/packages/openneuro-components/src/mock-content/facet-content.jsx @@ -32,7 +32,6 @@ export const modalities = [ label: 'EEG', value: 'EEG', count: 303, - children: null, }, { label: 'iEEG', @@ -55,7 +54,6 @@ export const modalities = [ label: 'MEG', value: 'MEG', count: 330, - children: null, }, { label: 'PET', @@ -83,127 +81,108 @@ export const show_available = [ { label: 'My Bookmarks', value: 'bookmarked' }, ] -export const showMyUploads_available = [ +export const dataset_type = [ { label: 'Public', value: 'public' }, { label: 'Shared with Me', value: 'shared_with_me' }, { label: 'Invalid', value: 'invalid' }, ] -export const diagnosis = [ +export const diagnosis_list = [ { label: "Alzheimer's", value: 'alzheimers', - children: null, }, { label: 'Another', value: 'Another', - children: null, }, { label: 'Other', value: 'Other', - children: null, }, ] -export const task = [ +export const task_list = [ { label: 'Rest', value: 'rest', - children: null, }, { label: 'Another', value: 'Another', - children: null, }, { label: 'Other', value: 'Other', - children: null, }, ] -export const author_pi = [ +export const author_pi_list = [ { label: 'Author 1', value: 'author-1', - children: null, }, { label: 'Author 2', value: 'author-2', - children: null, }, { label: 'Author 3', value: 'author-3', - children: null, }, ] -export const gender = [ +export const gender_list = [ { label: 'All', value: 'all' }, { label: 'Male', value: 'male' }, { label: 'Female', value: 'female' }, ] -export const species = [ +export const species_list = [ { label: 'Human', value: 'human', - children: null, }, { label: 'Pig', value: 'pig', - children: null, }, { label: 'Rat', value: 'rat', - children: null, }, { label: 'Other', value: 'other', - children: null, }, ] -export const section = [ +export const section_list = [ { label: 'Cross', value: 'cross', - children: null, }, { label: 'Longitudinal', value: 'longitudinal', - children: null, }, { label: 'Other', value: 'other', - children: null, }, ] -export const domain = [ +export const domain_list = [ { label: 'Domain 1', value: '1', - children: null, }, { label: 'Domain 2', value: '2', - children: null, }, { label: 'Ontology', value: 'ontology', - children: null, }, ] diff --git a/packages/openneuro-components/src/radio/RadioGroup.tsx b/packages/openneuro-components/src/radio/RadioGroup.tsx index 8f9c5218f0..cb4359c4ca 100644 --- a/packages/openneuro-components/src/radio/RadioGroup.tsx +++ b/packages/openneuro-components/src/radio/RadioGroup.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import React from 'react' import { Radio } from './Radio' import './radio.scss' @@ -8,20 +8,19 @@ export interface RadioGroupProps { radioArr: { label: string onChange?: React.MouseEventHandler - checked: boolean value: string }[] name: string - active: number - setActive: (index) => void + selected: string + setSelected: (value) => void } export const RadioGroup = ({ radioArr, layout, name, - active, - setActive, + selected, + setSelected, }: RadioGroupProps) => { return (
    @@ -31,8 +30,8 @@ export const RadioGroup = ({ name={name} value={item.value} label={item.label} - checked={active === index} - onChange={() => setActive(index)} + checked={selected === item.value} + onChange={e => setSelected(e.target.value)} /> ))}
    diff --git a/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx b/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx index 440ac80908..bdf6a3ebd3 100644 --- a/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx +++ b/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx @@ -3,7 +3,6 @@ import { Input } from '../input/Input' export const KeywordInputContainerExample = ({ searchValue }) => { const [value, setValue] = React.useState(searchValue) - console.log(value) return ( <> { - const [selected, setSelected] = React.useState() - const [active, setActive] = React.useState(0) - const [newvalue, setNewValue] = React.useState([0, 20]) - console.log(active) + const [modality, setModality] = React.useState() + const [datasetsType, setDatasetsType] = React.useState('all') + const [datasetStatus, setDatasetStatus] = React.useState() + const [ageRange, setAgeRange] = React.useState([0, 20]) + const [subjectRange, setSubjectRange] = React.useState([0, 20]) + const [author_pi, setAuthor_pi] = React.useState() + const [gender, setGender] = React.useState('all') + const [task, setTask] = React.useState() + const [diagnosis, setDiagnosis] = React.useState() + const [section, setSection] = React.useState(0) + const [species, setSpecies] = React.useState() + const [domain, setDomain] = React.useState() + return (
    - {active == 2 ? ( + {datasetsType == 2 ? ( Date: Sun, 30 May 2021 20:15:40 -0700 Subject: [PATCH 30/37] adding mock data for filters block --- .../src/search-page/FiltersBlock.tsx | 65 +++++++++++++++---- .../SearchPageContainerExample.tsx | 15 +++-- .../src/search-page/SearchResult.tsx | 3 - 3 files changed, 62 insertions(+), 21 deletions(-) diff --git a/packages/openneuro-components/src/search-page/FiltersBlock.tsx b/packages/openneuro-components/src/search-page/FiltersBlock.tsx index 205187a918..6334f796c5 100644 --- a/packages/openneuro-components/src/search-page/FiltersBlock.tsx +++ b/packages/openneuro-components/src/search-page/FiltersBlock.tsx @@ -2,24 +2,61 @@ import React from 'react' import { Button } from '../button/Button' import './filters-block.scss' -export interface FiltersBlockProps {} +export interface FiltersBlockProps { + modality?: string + datasetsType?: string + datasetStatus?: string + ageRange?: [number, number] + subjectRange?: [number, number] + author_pi?: string + gender?: string + task?: string + diagnosis?: string + section?: string + species?: string + domain?: string +} -export const FiltersBlock = ({}: FiltersBlockProps) => { +export const FiltersBlock = ({ + modality, + datasetsType, + datasetStatus, + ageRange, + subjectRange, + author_pi, + gender, + task, + diagnosis, + section, + species, + domain, +}: FiltersBlockProps) => { + const _listItem = (type, item) => { + return ( + <> +
  • + {type}: + {item} + × +
  • + + ) + } return (
      -
    • - Modality:Functional× -
    • -
    • - Gender:Male× -
    • -
    • - Task:Coordsystems× -
    • -
    • - Age:20-40× -
    • + {modality && _listItem('modality', modality)} + {datasetsType && _listItem('datasetsType', datasetsType)} + {datasetStatus && _listItem('datasetStatus', datasetStatus)} + {ageRange && _listItem('ageRange', ageRange)} + {subjectRange && _listItem('subjectRange', subjectRange)} + {author_pi && _listItem('author_pi', author_pi)} + {gender && _listItem('gender', gender)} + {task && _listItem('task', task)} + {diagnosis && _listItem('diagnosis', diagnosis)} + {section && _listItem('section', section)} + {species && _listItem('species', species)} + {domain && _listItem('domain', domain)}
    diff --git a/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx b/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx index 02d4482dda..76c19fb667 100644 --- a/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx +++ b/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx @@ -57,7 +57,7 @@ export const SearchPageContainerExample = ({ <>
    - 100 Datasets found for "MRI" + 100 Datasets found for "Forrest Gump"
    @@ -69,8 +69,15 @@ export const SearchPageContainerExample = ({ )} renderSearchFacets={() => ( <> - - + +
    - 100 Datasets found for "MRI" + 100 Datasets found for "Forrest Gump"
    diff --git a/packages/openneuro-components/src/search-page/SearchResult.tsx b/packages/openneuro-components/src/search-page/SearchResult.tsx index fcaca72949..b18fce6e63 100644 --- a/packages/openneuro-components/src/search-page/SearchResult.tsx +++ b/packages/openneuro-components/src/search-page/SearchResult.tsx @@ -212,9 +212,6 @@ export const SearchResult = ({ node, profile }: SearchResultProps) => { ) const _list = (type, items) => { - function wrapWords(str) { - return str.replace(/\w+/g, '$&') - } if (items && items.length > 0) { return ( <> From 99fe342d257c83b5d9bdaa66303e20f1efdfa619 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Sun, 30 May 2021 20:20:15 -0700 Subject: [PATCH 31/37] update labels for filters block --- .../src/search-page/FiltersBlock.tsx | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/openneuro-components/src/search-page/FiltersBlock.tsx b/packages/openneuro-components/src/search-page/FiltersBlock.tsx index 6334f796c5..134470f0c7 100644 --- a/packages/openneuro-components/src/search-page/FiltersBlock.tsx +++ b/packages/openneuro-components/src/search-page/FiltersBlock.tsx @@ -36,7 +36,9 @@ export const FiltersBlock = ({ <>
  • {type}: - {item} + {type === 'Age' || type === 'Subjects' + ? item[0] + ' - ' + item[1] + : item} ×
  • @@ -45,18 +47,18 @@ export const FiltersBlock = ({ return (
      - {modality && _listItem('modality', modality)} - {datasetsType && _listItem('datasetsType', datasetsType)} - {datasetStatus && _listItem('datasetStatus', datasetStatus)} - {ageRange && _listItem('ageRange', ageRange)} - {subjectRange && _listItem('subjectRange', subjectRange)} - {author_pi && _listItem('author_pi', author_pi)} - {gender && _listItem('gender', gender)} - {task && _listItem('task', task)} - {diagnosis && _listItem('diagnosis', diagnosis)} - {section && _listItem('section', section)} - {species && _listItem('species', species)} - {domain && _listItem('domain', domain)} + {modality && _listItem('Modality', modality)} + {datasetsType && _listItem('Type', datasetsType)} + {datasetStatus && _listItem('Status', datasetStatus)} + {ageRange && _listItem('Age', ageRange)} + {subjectRange && _listItem('Subjects', subjectRange)} + {author_pi && _listItem('Author/PI', author_pi)} + {gender && _listItem('Gender', gender)} + {task && _listItem('Task', task)} + {diagnosis && _listItem('Diagnosis', diagnosis)} + {section && _listItem('Section', section)} + {species && _listItem('Species', species)} + {domain && _listItem('Domain', domain)}
    From 3e07a2e480e4a6d4cdcbdd6a835226dbc984167a Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Sun, 30 May 2021 21:02:24 -0700 Subject: [PATCH 32/37] update theme variables to use css var --- .../src/count-toggle/count-toggle.scss | 2 +- .../src/facets/FacetRange.tsx | 2 +- .../openneuro-components/src/facets/facet.scss | 17 ++++++++++++----- .../src/page/Page.stories.tsx | 4 ++-- .../openneuro-components/src/radio/radio.scss | 6 ++++-- .../openneuro-components/src/range/range.scss | 6 +++--- .../src/scss/_variables.scss | 7 ++++++- .../openneuro-components/src/scss/global.scss | 4 ++-- .../search-page/SearchPageContainerExample.tsx | 4 ++-- .../src/search-page/filters-block.scss | 3 ++- .../src/search-page/search-page.scss | 2 +- .../src/search-page/search-result.scss | 4 ++-- 12 files changed, 38 insertions(+), 23 deletions(-) diff --git a/packages/openneuro-components/src/count-toggle/count-toggle.scss b/packages/openneuro-components/src/count-toggle/count-toggle.scss index f7d2b4e7aa..e14da1aa2f 100644 --- a/packages/openneuro-components/src/count-toggle/count-toggle.scss +++ b/packages/openneuro-components/src/count-toggle/count-toggle.scss @@ -24,7 +24,7 @@ &.active { i { - color: $current-theme-primary; + color: var(--current-theme-primary); } } } diff --git a/packages/openneuro-components/src/facets/FacetRange.tsx b/packages/openneuro-components/src/facets/FacetRange.tsx index 278dc234d0..24eb291ae0 100644 --- a/packages/openneuro-components/src/facets/FacetRange.tsx +++ b/packages/openneuro-components/src/facets/FacetRange.tsx @@ -42,7 +42,7 @@ export const FacetRange = ({ label={label} startOpen={startOpen} dropdown={dropdown}> -
    +
    .label, > .label span { - color: $current-theme-primary; + color: var(--current-theme-primary); } } .label { @@ -38,7 +39,7 @@ span { margin-left: 10px; display: inline-block; - color: #444; + color: #666; font-size: 14px; } } @@ -46,6 +47,8 @@ } .level-1 > li { margin-bottom: 10px; + border-top: 1px solid #dfdfdf; + padding: 10px 10px 0; } .level-2 > li { display: flex; @@ -65,11 +68,15 @@ font-weight: 500; } &.selected-facet > .label { - color: $on-light-aqua; + color: var(--current-theme-primary); span { - color: $on-light-aqua; + color: var(--current-theme-primary); } } } } + +.facet-range { + margin: 20px 0; +} diff --git a/packages/openneuro-components/src/page/Page.stories.tsx b/packages/openneuro-components/src/page/Page.stories.tsx index 80ec447945..9020b98860 100644 --- a/packages/openneuro-components/src/page/Page.stories.tsx +++ b/packages/openneuro-components/src/page/Page.stories.tsx @@ -29,7 +29,7 @@ SearchPageExample.args = { ), headerArgs: HeaderStories.LoggedOut.args, - className: 'search-page search-page-mri', + className: 'search-page', } export const MRIPortalPageExample = Template.bind({}) MRIPortalPageExample.args = { @@ -40,5 +40,5 @@ MRIPortalPageExample.args = { /> ), headerArgs: HeaderStories.LoggedOut.args, - className: 'search-page', + className: 'search-page search-page-mri', } diff --git a/packages/openneuro-components/src/radio/radio.scss b/packages/openneuro-components/src/radio/radio.scss index 723c592682..269a272ca0 100644 --- a/packages/openneuro-components/src/radio/radio.scss +++ b/packages/openneuro-components/src/radio/radio.scss @@ -1,6 +1,7 @@ @import '../scss/variables'; .custom-radio { + margin: 10px 0 20px; [type='radio']:checked, [type='radio']:not(:checked) { position: absolute; @@ -8,8 +9,9 @@ } [type='radio']:checked + label, [type='radio']:not(:checked) + label { + font-size: 14px; position: relative; - padding-left: 28px; + padding-left: 25px; cursor: pointer; line-height: 20px; display: inline-block; @@ -32,7 +34,7 @@ content: ''; width: 12px; height: 12px; - background: $current-theme-primary; + background: var(--current-theme-primary); position: absolute; top: 4px; left: 4px; diff --git a/packages/openneuro-components/src/range/range.scss b/packages/openneuro-components/src/range/range.scss index d5e791da3b..870720fb87 100644 --- a/packages/openneuro-components/src/range/range.scss +++ b/packages/openneuro-components/src/range/range.scss @@ -13,14 +13,14 @@ label { font-size: 14px; margin: 40px 0 0; - color: $current-theme-primary; + color: var(--current-theme-primary); } .rc-slider-handle, .rc-slider-dot-active { - border-color: $current-theme-primary; + border-color: var(--current-theme-primary); } .rc-slider-track { - background-color: $current-theme-primary; + background-color: var(--current-theme-primary); } } diff --git a/packages/openneuro-components/src/scss/_variables.scss b/packages/openneuro-components/src/scss/_variables.scss index 4ada6fb6ee..c1cbf112d9 100644 --- a/packages/openneuro-components/src/scss/_variables.scss +++ b/packages/openneuro-components/src/scss/_variables.scss @@ -29,6 +29,8 @@ $primary: $on-dark-aqua; --asl-theme: #{$asl-theme}; --meg-theme: #{$meg-theme}; --on-light-green: #{on-light-green}; + --current-theme-primary: #{$on-dark-aqua}; + --current-theme-primary-hover: #{$on-light-aqua}; } .mri-theme { @@ -77,4 +79,7 @@ $screen-sm: 480px; $screen-md: 767px; $screen-lg: 989px; -$current-theme-primary: $on-dark-aqua; +.search-page-mri { + --current-theme-primary: #{$mri-theme}; + --current-theme-primary-hover: lighten(#{$mri-theme}, 10%); +} diff --git a/packages/openneuro-components/src/scss/global.scss b/packages/openneuro-components/src/scss/global.scss index 5730222650..2551aa8e7b 100644 --- a/packages/openneuro-components/src/scss/global.scss +++ b/packages/openneuro-components/src/scss/global.scss @@ -26,11 +26,11 @@ body { a, a:link { - color: $current-theme-primary; + color: var(--current-theme-primary); transition: color 0.3s; cursor: pointer; &:hover { - color: lighten($current-theme-primary, 15%); + color: var(--current-theme-primary-hover); } } .container { diff --git a/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx b/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx index 76c19fb667..a78b4cef95 100644 --- a/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx +++ b/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx @@ -85,14 +85,14 @@ export const SearchPageContainerExample = ({ items={modalities} accordionStyle="plain" label="Modalities" - startOpen={false} + startOpen={true} /> Date: Mon, 31 May 2021 12:43:34 -0700 Subject: [PATCH 33/37] update to invalid and shared icons in result --- .../openneuro-components/src/search-page/SearchResult.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/openneuro-components/src/search-page/SearchResult.tsx b/packages/openneuro-components/src/search-page/SearchResult.tsx index b18fce6e63..b4fb476b16 100644 --- a/packages/openneuro-components/src/search-page/SearchResult.tsx +++ b/packages/openneuro-components/src/search-page/SearchResult.tsx @@ -237,8 +237,8 @@ export const SearchResult = ({ node, profile }: SearchResultProps) => { const datasetOwenerIcons = (
    {node.public ? publicIcon : null} - {!shared ? sharedWithIcon : null} - {!invalid ? errorsIcon : null} + {shared ? sharedWithIcon : null} + {invalid ? errorsIcon : null}
    ) From 6a26d328455104eb5a20bb94edff01777578024b Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Mon, 31 May 2021 12:45:48 -0700 Subject: [PATCH 34/37] updates to radio --- .../openneuro-components/src/radio/Radio.stories.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/openneuro-components/src/radio/Radio.stories.tsx b/packages/openneuro-components/src/radio/Radio.stories.tsx index 293e82416a..7398f84437 100644 --- a/packages/openneuro-components/src/radio/Radio.stories.tsx +++ b/packages/openneuro-components/src/radio/Radio.stories.tsx @@ -3,7 +3,7 @@ import { Story, Meta } from '@storybook/react' import { RadioGroup, RadioGroupProps } from './RadioGroup' -import { showDatasetsRadio } from '../mock-content/facet-content' +import { show_available } from '../mock-content/facet-content' export default { title: 'Components/Form/Radio', @@ -11,11 +11,11 @@ export default { } as Meta const RadioTemplate: Story = ({ radioArr, layout, name }) => { - const [active, setActive] = React.useState(0) + const [selected, setSelected] = React.useState(0) return ( = ({ radioArr, layout, name }) => { export const RowRadio = RadioTemplate.bind({}) RowRadio.args = { - radioArr: showDatasetsRadio, + radioArr: show_available, layout: 'row', name: 'radio-row', } export const ColumnRadio = RadioTemplate.bind({}) ColumnRadio.args = { - radioArr: showDatasetsRadio, + radioArr: show_available, layout: 'column', name: 'radio-column', } From 38d242a753beea7a75e175a7921083bc9a560725 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Mon, 31 May 2021 12:50:50 -0700 Subject: [PATCH 35/37] spacing for keyword and filters block --- .../src/search-page/KeywordInputContainerExample.tsx | 4 ++-- .../openneuro-components/src/search-page/filters-block.scss | 2 +- .../openneuro-components/src/search-page/search-page.scss | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx b/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx index bdf6a3ebd3..5b7e1f38bf 100644 --- a/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx +++ b/packages/openneuro-components/src/search-page/KeywordInputContainerExample.tsx @@ -4,7 +4,7 @@ import { Input } from '../input/Input' export const KeywordInputContainerExample = ({ searchValue }) => { const [value, setValue] = React.useState(searchValue) return ( - <> +
    { value={value} setValue={setValue} /> - +
    ) } diff --git a/packages/openneuro-components/src/search-page/filters-block.scss b/packages/openneuro-components/src/search-page/filters-block.scss index b0865a1090..938ab9dbe2 100644 --- a/packages/openneuro-components/src/search-page/filters-block.scss +++ b/packages/openneuro-components/src/search-page/filters-block.scss @@ -15,7 +15,7 @@ .filters-block { background-color: #eee; padding: 30px 20px; - margin: 10px 0; + margin: 0 0 30px; .active-filters { padding: 0; margin: 0 0 20px; diff --git a/packages/openneuro-components/src/search-page/search-page.scss b/packages/openneuro-components/src/search-page/search-page.scss index 167461ea2d..49860cbcff 100644 --- a/packages/openneuro-components/src/search-page/search-page.scss +++ b/packages/openneuro-components/src/search-page/search-page.scss @@ -184,3 +184,7 @@ text-transform: uppercase; } } + +.search-keyword { + margin-bottom: 30px; +} From 465620d56c829d77e4af1470bc3e1cab2bcd460c Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Mon, 31 May 2021 12:53:27 -0700 Subject: [PATCH 36/37] update font weight for selected facet list item --- packages/openneuro-components/src/facets/facet.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/openneuro-components/src/facets/facet.scss b/packages/openneuro-components/src/facets/facet.scss index b987f3b868..0e7dc24972 100644 --- a/packages/openneuro-components/src/facets/facet.scss +++ b/packages/openneuro-components/src/facets/facet.scss @@ -69,9 +69,11 @@ } &.selected-facet > .label { color: var(--current-theme-primary); + font-weight: bold; span { color: var(--current-theme-primary); + font-weight: 400; } } } From 62cee07b7f25b02f613eba5cbb36666bf6e532f5 Mon Sep 17 00:00:00 2001 From: Gregory Noack Date: Mon, 31 May 2021 12:59:11 -0700 Subject: [PATCH 37/37] adding fake load more --- .../src/search-page/SearchPageContainerExample.tsx | 6 +++++- .../src/search-page/search-page.scss | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx b/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx index a78b4cef95..b40190e6c7 100644 --- a/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx +++ b/packages/openneuro-components/src/search-page/SearchPageContainerExample.tsx @@ -9,6 +9,7 @@ import { sortBy } from '../mock-content/sortby-list' import { FacetSelect } from '../facets/FacetSelect' import { FacetRadio } from '../facets/FacetRadio' import { FacetRange } from '../facets/FacetRange' +import { Button } from '../button/Button' import { modalities, @@ -206,9 +207,12 @@ export const SearchPageContainerExample = ({
    - 100 Datasets found for "Forrest Gump" + Showing 25 of 100 Datasets found for "Forrest Gump"
    +
    +
    )} /> diff --git a/packages/openneuro-components/src/search-page/search-page.scss b/packages/openneuro-components/src/search-page/search-page.scss index 49860cbcff..edb34d34c4 100644 --- a/packages/openneuro-components/src/search-page/search-page.scss +++ b/packages/openneuro-components/src/search-page/search-page.scss @@ -188,3 +188,17 @@ .search-keyword { margin-bottom: 30px; } + +.load-more { + .on-button { + display: block; + border: 1px solid; + width: 100%; + background-color: #fff; + transition: background-color 0.3s; + &:hover { + text-decoration: none; + background-color: #dfdfdf; + } + } +}