@openneuro/app 4.36.1 → 4.37.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -3
- package/src/scripts/components/accordion/accordion.scss +1 -1
- package/src/scripts/components/activity-slider/ActivitySlider.tsx +4 -22
- package/src/scripts/components/activity-slider/slider.scss +1 -82
- package/src/scripts/components/button/button.scss +1 -1
- package/src/scripts/components/count-toggle/count-toggle.scss +1 -1
- package/src/scripts/components/dropdown/dropdown.scss +1 -1
- package/src/scripts/components/facets/facet.scss +5 -4
- package/src/scripts/components/footer/footer.scss +1 -1
- package/src/scripts/components/front-page/front-page.scss +1 -1
- package/src/scripts/components/header/header.scss +1 -1
- package/src/scripts/components/input/input.scss +1 -1
- package/src/scripts/components/input/term-search.scss +1 -1
- package/src/scripts/components/loading/loading.scss +1 -1
- package/src/scripts/components/modal/modal.scss +1 -1
- package/src/scripts/components/modality-cube/ModalityHexagon.tsx +29 -0
- package/src/scripts/components/modality-cube/modality-cube.scss +1 -1
- package/src/scripts/components/modality-cube/modality-hexagon.scss +93 -0
- package/src/scripts/components/page/page.scss +1 -1
- package/src/scripts/components/progress-bar/progress-bar.scss +1 -1
- package/src/scripts/components/radio/radio.scss +2 -2
- package/src/scripts/components/range/TwoHandleRange.scss +3 -3
- package/src/scripts/components/read-more/read-more.scss +1 -1
- package/src/scripts/components/scss/upload-modal.scss +1 -1
- package/src/scripts/components/tooltip/tooltip.scss +1 -1
- package/src/scripts/dataset/__tests__/__snapshots__/snapshot-container.spec.tsx.snap +132 -128
- package/src/scripts/dataset/__tests__/draft-container.spec.tsx +136 -0
- package/src/scripts/dataset/common/follow-toggles.tsx +1 -1
- package/src/scripts/dataset/components/DatasetHeader.tsx +13 -16
- package/src/scripts/dataset/components/DatasetToolButton.tsx +6 -7
- package/src/scripts/dataset/components/DatasetTools.tsx +6 -2
- package/src/scripts/dataset/draft-container.tsx +30 -24
- package/src/scripts/dataset/files/{file-display.jsx → file-display.tsx} +32 -19
- package/src/scripts/dataset/routes/tab-routes-draft.tsx +6 -1
- package/src/scripts/dataset/routes/tab-routes-snapshot.tsx +5 -1
- package/src/scripts/dataset/snapshot-container.tsx +37 -43
- package/src/scripts/scss/dataset/dataset-page.scss +44 -120
- package/src/scripts/scss/variables.scss +65 -13
- package/src/scripts/{components/search-page → search}/__tests__/NuerobagelSearch.spec.tsx +1 -1
- package/src/scripts/search/components/DatasetsRadioTabs.tsx +103 -0
- package/src/scripts/{components/search-page → search/components}/FilterListItem.tsx +1 -1
- package/src/scripts/{components/search-page → search/components}/FiltersBlock.tsx +5 -8
- package/src/scripts/search/components/MetaListItemList.tsx +31 -0
- package/src/scripts/{components/search-page → search/components}/SearchPage.tsx +15 -8
- package/src/scripts/search/components/SearchResultDetails.tsx +167 -0
- package/src/scripts/{components/search-page → search/components}/SearchResultItem.tsx +57 -173
- package/src/scripts/search/components/SearchResultsList.tsx +45 -0
- package/src/scripts/{components/search-page → search/components}/SearchSort.tsx +2 -2
- package/src/scripts/search/filters-block-container.tsx +1 -1
- package/src/scripts/search/inputs/index.ts +0 -4
- package/src/scripts/search/inputs/sliding-radio-group.tsx +127 -0
- package/src/scripts/search/inputs/sort-by-select.tsx +1 -1
- package/src/scripts/{components/search-page → search/scss}/filters-block.scss +1 -1
- package/src/scripts/{components/search-page → search/scss}/search-page.scss +123 -92
- package/src/scripts/search/scss/search-result-details.scss +70 -0
- package/src/scripts/{components/search-page → search/scss}/search-result.scss +29 -56
- package/src/scripts/{components/search-page → search/scss}/search-sort.scss +1 -1
- package/src/scripts/search/scss/sliding-radio-group.scss +115 -0
- package/src/scripts/search/search-container.tsx +90 -24
- package/src/scripts/search/use-search-results.tsx +3 -0
- package/src/scripts/users/github-auth-button.tsx +1 -1
- package/src/scripts/components/scss/_variables.scss +0 -245
- package/src/scripts/components/search-page/SearchResultsList.tsx +0 -29
- package/src/scripts/dataset/files/index.tsx +0 -6
- package/src/scripts/search/inputs/admin-allDatasets-toggle.tsx +0 -47
- package/src/scripts/search/inputs/show-datasets-radios.tsx +0 -74
- /package/src/scripts/{components/search-page → search/components}/CommunityHeader.tsx +0 -0
- /package/src/scripts/{components/search-page → search/components}/FacetBlockContainerExample.tsx +0 -0
- /package/src/scripts/{components/search-page → search/components}/FilterDateItem.tsx +0 -0
- /package/src/scripts/{components/search-page → search/components}/ModalityHeader.tsx +0 -0
- /package/src/scripts/{components/search-page → search/components}/NeurobagelSearch.tsx +0 -0
- /package/src/scripts/{components/search-page → search/components}/SearchSortContainerExample.tsx +0 -0
- /package/src/scripts/{components/search-page → search/components}/TermListItem.tsx +0 -0
- /package/src/scripts/{components/search-page → search/components}/neurobagel_logo.svg +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useContext } from "react"
|
|
2
|
-
import PropTypes from "prop-types"
|
|
3
2
|
import { useParams } from "react-router-dom"
|
|
4
3
|
import FileView from "./file-view.jsx"
|
|
5
4
|
import { apiPath } from "./file"
|
|
@@ -23,10 +22,16 @@ const PathBreadcrumb = styled.div`
|
|
|
23
22
|
}
|
|
24
23
|
`
|
|
25
24
|
|
|
25
|
+
interface FileDisplayBreadcrumbProps {
|
|
26
|
+
filePath: string
|
|
27
|
+
}
|
|
28
|
+
|
|
26
29
|
/**
|
|
27
30
|
* Create dataset -> dir -> filename breadcrumbs
|
|
28
31
|
*/
|
|
29
|
-
export const FileDisplayBreadcrumb = (
|
|
32
|
+
export const FileDisplayBreadcrumb = (
|
|
33
|
+
{ filePath }: FileDisplayBreadcrumbProps,
|
|
34
|
+
) => {
|
|
30
35
|
const tokens = filePath.split(":")
|
|
31
36
|
return (
|
|
32
37
|
<>
|
|
@@ -51,13 +56,23 @@ export const FileDisplayBreadcrumb = ({ filePath }) => {
|
|
|
51
56
|
)
|
|
52
57
|
}
|
|
53
58
|
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
interface FileDisplayFileArray {
|
|
60
|
+
filename: string
|
|
61
|
+
directory: boolean
|
|
62
|
+
urls: string[]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface FileDisplayProps {
|
|
66
|
+
datasetId: string
|
|
67
|
+
files: FileDisplayFileArray[]
|
|
68
|
+
snapshotTag?: string
|
|
69
|
+
filePath?: string
|
|
56
70
|
}
|
|
57
71
|
|
|
58
|
-
const FileDisplay = (
|
|
72
|
+
const FileDisplay = (
|
|
73
|
+
{ datasetId, files, snapshotTag = null, filePath }: FileDisplayProps,
|
|
74
|
+
) => {
|
|
59
75
|
const { fetchMore } = useContext(DatasetQueryContext)
|
|
60
|
-
const files = snapshotTag ? dataset.files : dataset.draft.files
|
|
61
76
|
const datasetFile = files.find((file) => file.filename === filePath)
|
|
62
77
|
// If no file matches, we are missing data, load the next missing parent
|
|
63
78
|
if (!datasetFile) {
|
|
@@ -66,7 +81,7 @@ const FileDisplay = ({ dataset, snapshotTag = null, filePath }) => {
|
|
|
66
81
|
const path = components.slice(0, i).join(":")
|
|
67
82
|
const file = files.find((file) => file.filename === path)
|
|
68
83
|
if (file && file.directory) {
|
|
69
|
-
fetchMoreDirectory(fetchMore,
|
|
84
|
+
fetchMoreDirectory(fetchMore, datasetId, snapshotTag, file)
|
|
70
85
|
break
|
|
71
86
|
}
|
|
72
87
|
}
|
|
@@ -80,7 +95,7 @@ const FileDisplay = ({ dataset, snapshotTag = null, filePath }) => {
|
|
|
80
95
|
)
|
|
81
96
|
} else {
|
|
82
97
|
const url = datasetFile?.urls?.[0] ||
|
|
83
|
-
apiPath(
|
|
98
|
+
apiPath(datasetId, snapshotTag, filePath)
|
|
84
99
|
return (
|
|
85
100
|
<DatasetPageBorder className="dataset-form display-file">
|
|
86
101
|
<PathBreadcrumb>
|
|
@@ -106,25 +121,23 @@ const FileDisplay = ({ dataset, snapshotTag = null, filePath }) => {
|
|
|
106
121
|
}
|
|
107
122
|
}
|
|
108
123
|
|
|
109
|
-
|
|
110
|
-
datasetId:
|
|
111
|
-
|
|
112
|
-
snapshotTag
|
|
124
|
+
interface FileDisplayRouteProps {
|
|
125
|
+
datasetId: string
|
|
126
|
+
files: FileDisplayFileArray[]
|
|
127
|
+
snapshotTag?: string
|
|
113
128
|
}
|
|
114
129
|
|
|
115
|
-
export const FileDisplayRoute = (
|
|
130
|
+
export const FileDisplayRoute = (
|
|
131
|
+
{ datasetId, files, snapshotTag }: FileDisplayRouteProps,
|
|
132
|
+
) => {
|
|
116
133
|
return (
|
|
117
134
|
<FileDisplay
|
|
118
|
-
|
|
135
|
+
datasetId={datasetId}
|
|
136
|
+
files={files}
|
|
119
137
|
snapshotTag={snapshotTag}
|
|
120
138
|
{...useParams()}
|
|
121
139
|
/>
|
|
122
140
|
)
|
|
123
141
|
}
|
|
124
142
|
|
|
125
|
-
FileDisplayRoute.propTypes = {
|
|
126
|
-
datasetId: PropTypes.string,
|
|
127
|
-
snapshotTag: PropTypes.string,
|
|
128
|
-
}
|
|
129
|
-
|
|
130
143
|
export default FileDisplay
|
|
@@ -64,7 +64,12 @@ export const TabRoutesDraft = ({ dataset, hasEdit }) => {
|
|
|
64
64
|
/>
|
|
65
65
|
<Route
|
|
66
66
|
path="file-display/:filePath"
|
|
67
|
-
element={
|
|
67
|
+
element={
|
|
68
|
+
<FileDisplayRoute
|
|
69
|
+
datasetId={dataset.id}
|
|
70
|
+
files={dataset.draft.files}
|
|
71
|
+
/>
|
|
72
|
+
}
|
|
68
73
|
/>
|
|
69
74
|
<Route path="metadata" element={<AddMetadata dataset={dataset} />} />
|
|
70
75
|
</Routes>
|
|
@@ -39,7 +39,11 @@ export const TabRoutesSnapshot = ({ dataset, snapshot }) => {
|
|
|
39
39
|
<Route
|
|
40
40
|
path="file-display/:filePath"
|
|
41
41
|
element={
|
|
42
|
-
<FileDisplayRoute
|
|
42
|
+
<FileDisplayRoute
|
|
43
|
+
datasetId={dataset.id}
|
|
44
|
+
files={snapshot.files}
|
|
45
|
+
snapshotTag={snapshot.tag}
|
|
46
|
+
/>
|
|
43
47
|
}
|
|
44
48
|
/>
|
|
45
49
|
<Route path="metadata" element={<AddMetadata dataset={dataset} />} />
|
|
@@ -93,11 +93,23 @@ export const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
93
93
|
className={`dataset dataset-draft dataset-page dataset-page-${modality?.toLowerCase()}`}
|
|
94
94
|
>
|
|
95
95
|
{summary && (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
<DatasetHeader
|
|
97
|
+
pageHeading={description.Name}
|
|
98
|
+
modality={summary?.modalities[0]}
|
|
99
|
+
datasetHeaderTools={
|
|
100
|
+
<div className="dataset-tool-buttons">
|
|
101
|
+
<DatasetTools
|
|
102
|
+
hasEdit={hasEdit}
|
|
103
|
+
isPublic={dataset.public}
|
|
104
|
+
datasetId={datasetId}
|
|
105
|
+
snapshotId={snapshot.tag}
|
|
106
|
+
isAdmin={isAdmin}
|
|
107
|
+
isDatasetAdmin={isDatasetAdmin}
|
|
108
|
+
hasDerivatives={hasDerivatives}
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
111
|
+
}
|
|
112
|
+
datasetUserActions={
|
|
101
113
|
<FollowToggles>
|
|
102
114
|
<FollowDataset
|
|
103
115
|
profile={profile !== null}
|
|
@@ -112,8 +124,8 @@ export const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
112
124
|
stars={dataset.stars.length}
|
|
113
125
|
/>
|
|
114
126
|
</FollowToggles>
|
|
115
|
-
|
|
116
|
-
|
|
127
|
+
}
|
|
128
|
+
/>
|
|
117
129
|
)}
|
|
118
130
|
{!dataset.public && isDatasetAdmin && (
|
|
119
131
|
<DatasetAlertPrivate
|
|
@@ -156,17 +168,6 @@ export const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
156
168
|
}
|
|
157
169
|
/>
|
|
158
170
|
</div>
|
|
159
|
-
<div className="dataset-tool-buttons">
|
|
160
|
-
<DatasetTools
|
|
161
|
-
hasEdit={hasEdit}
|
|
162
|
-
isPublic={dataset.public}
|
|
163
|
-
datasetId={datasetId}
|
|
164
|
-
snapshotId={snapshot.tag}
|
|
165
|
-
isAdmin={isAdmin}
|
|
166
|
-
isDatasetAdmin={isDatasetAdmin}
|
|
167
|
-
hasDerivatives={hasDerivatives}
|
|
168
|
-
/>
|
|
169
|
-
</div>
|
|
170
171
|
<DatasetPageTabContainer>
|
|
171
172
|
<TabRoutesSnapshot dataset={dataset} snapshot={snapshot} />
|
|
172
173
|
</DatasetPageTabContainer>
|
|
@@ -263,18 +264,17 @@ export const SnapshotContainer: React.FC<SnapshotContainerProps> = ({
|
|
|
263
264
|
/>
|
|
264
265
|
</>
|
|
265
266
|
))}
|
|
266
|
-
{!isAnonymousReviewer &&
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
)}
|
|
267
|
+
{!isAnonymousReviewer && (
|
|
268
|
+
<MetaDataBlock
|
|
269
|
+
heading="Uploaded by"
|
|
270
|
+
item={
|
|
271
|
+
<>
|
|
272
|
+
<Username user={dataset.uploader} /> on{" "}
|
|
273
|
+
<DateDistance date={dataset.created} />
|
|
274
|
+
</>
|
|
275
|
+
}
|
|
276
|
+
/>
|
|
277
|
+
)}
|
|
278
278
|
|
|
279
279
|
{dataset.snapshots.length && (
|
|
280
280
|
<MetaDataBlock
|
|
@@ -362,16 +362,13 @@ export interface SnapshotLoaderProps {
|
|
|
362
362
|
const SnapshotLoader: React.FC<SnapshotLoaderProps> = ({ dataset }) => {
|
|
363
363
|
const { tag } = useParams()
|
|
364
364
|
const { loading, error, data, fetchMore, stopPolling, startPolling } =
|
|
365
|
-
useQuery(
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
datasetId: dataset.id,
|
|
370
|
-
tag,
|
|
371
|
-
},
|
|
372
|
-
errorPolicy: "all",
|
|
365
|
+
useQuery(getSnapshotDetails, {
|
|
366
|
+
variables: {
|
|
367
|
+
datasetId: dataset.id,
|
|
368
|
+
tag,
|
|
373
369
|
},
|
|
374
|
-
|
|
370
|
+
errorPolicy: "all",
|
|
371
|
+
})
|
|
375
372
|
if (loading) {
|
|
376
373
|
return (
|
|
377
374
|
<div className="loading-dataset">
|
|
@@ -392,10 +389,7 @@ const SnapshotLoader: React.FC<SnapshotLoaderProps> = ({ dataset }) => {
|
|
|
392
389
|
startPolling,
|
|
393
390
|
}}
|
|
394
391
|
>
|
|
395
|
-
<SnapshotContainer
|
|
396
|
-
dataset={dataset}
|
|
397
|
-
snapshot={data.snapshot}
|
|
398
|
-
/>
|
|
392
|
+
<SnapshotContainer dataset={dataset} snapshot={data.snapshot} />
|
|
399
393
|
</DatasetQueryContext.Provider>
|
|
400
394
|
)
|
|
401
395
|
}
|
|
@@ -1,26 +1,55 @@
|
|
|
1
1
|
@import '../variables.scss';
|
|
2
2
|
.dataset {
|
|
3
3
|
.dataset-header {
|
|
4
|
-
|
|
4
|
+
.ds-header-inner {
|
|
5
5
|
display: flex;
|
|
6
6
|
align-items: center;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@media (max-width: 767px) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
flex-wrap: wrap;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
@media screen and (max-width: 767px) {
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
justify-content: flex-start;
|
|
12
|
+
align-items: center;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
.ds-inner-left {
|
|
15
|
+
max-width: 70%;
|
|
16
|
+
@media screen and (max-width: 767px) {
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
}
|
|
19
|
+
h1 a {
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
.ds-inner-right {
|
|
24
|
+
max-width: 30%;
|
|
25
|
+
@media screen and (max-width: 767px) {
|
|
26
|
+
max-width: 100%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
h1 {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
color: #fff;
|
|
33
|
+
font-size: 24px;
|
|
34
|
+
margin: 10px 0;
|
|
35
|
+
@media (max-width: 767px) {
|
|
36
|
+
font-size: 20px;
|
|
37
|
+
flex-wrap: wrap;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
.hexagon-wrapper {
|
|
42
|
+
@media (max-width: 767px) {
|
|
43
|
+
width: 56px;
|
|
44
|
+
height: 56px;
|
|
45
|
+
div.label {
|
|
46
|
+
font-size: 17px;
|
|
47
|
+
}
|
|
22
48
|
}
|
|
23
49
|
}
|
|
50
|
+
.dataset-tool-buttons {
|
|
51
|
+
flex-basis: 100%;
|
|
52
|
+
}
|
|
24
53
|
}
|
|
25
54
|
}
|
|
26
55
|
|
|
@@ -144,106 +173,6 @@
|
|
|
144
173
|
}
|
|
145
174
|
}
|
|
146
175
|
|
|
147
|
-
.dataset {
|
|
148
|
-
.hexagon-wrapper {
|
|
149
|
-
text-align: center;
|
|
150
|
-
margin: 20px auto;
|
|
151
|
-
position: relative;
|
|
152
|
-
display: inline-block;
|
|
153
|
-
width: 45px;
|
|
154
|
-
height: 45px;
|
|
155
|
-
div.label {
|
|
156
|
-
position: absolute;
|
|
157
|
-
top: 0;
|
|
158
|
-
text-align: center;
|
|
159
|
-
width: 100%;
|
|
160
|
-
left: 0;
|
|
161
|
-
right: 0;
|
|
162
|
-
bottom: 0;
|
|
163
|
-
display: flex;
|
|
164
|
-
justify-content: center;
|
|
165
|
-
align-items: center;
|
|
166
|
-
font-weight: 600;
|
|
167
|
-
font-size: 13px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.hexagon {
|
|
171
|
-
height: 100%;
|
|
172
|
-
width: calc(100% * 0.57735);
|
|
173
|
-
display: inline-block;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.hexagon:before {
|
|
177
|
-
position: absolute;
|
|
178
|
-
top: 0;
|
|
179
|
-
right: calc((100% / 2) - ((100% * 0.57735) / 2));
|
|
180
|
-
background-color: inherit;
|
|
181
|
-
height: inherit;
|
|
182
|
-
width: inherit;
|
|
183
|
-
content: '';
|
|
184
|
-
transform: rotateZ(60deg);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.hexagon:after {
|
|
188
|
-
position: absolute;
|
|
189
|
-
top: 0;
|
|
190
|
-
right: calc((100% / 2) - ((100% * 0.57735) / 2));
|
|
191
|
-
background-color: inherit;
|
|
192
|
-
height: inherit;
|
|
193
|
-
width: inherit;
|
|
194
|
-
content: '';
|
|
195
|
-
transform: rotateZ(-60deg);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
a {
|
|
200
|
-
.hexagon {
|
|
201
|
-
transition: color 0.3s;
|
|
202
|
-
background-color: #fff;
|
|
203
|
-
|
|
204
|
-
&.mri {
|
|
205
|
-
color: $mri-theme;
|
|
206
|
-
}
|
|
207
|
-
&.eeg {
|
|
208
|
-
color: $eeg-theme;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
&.pet {
|
|
212
|
-
color: $pet-theme;
|
|
213
|
-
}
|
|
214
|
-
&.ieeg {
|
|
215
|
-
color: $ieeg-theme;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
&.meg {
|
|
219
|
-
color: $meg-theme;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
&:hover {
|
|
223
|
-
.hexagon {
|
|
224
|
-
color: lighten($on-dark-aqua, 15%);
|
|
225
|
-
&.mri {
|
|
226
|
-
color: lighten($mri-theme, 10%);
|
|
227
|
-
}
|
|
228
|
-
&.eeg {
|
|
229
|
-
color: lighten($eeg-theme, 10%);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
&.pet {
|
|
233
|
-
color: lighten($pet-theme, 10%);
|
|
234
|
-
}
|
|
235
|
-
&.ieeg {
|
|
236
|
-
color: lighten($ieeg-theme, 10%);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
&.meg {
|
|
240
|
-
color: lighten($meg-theme, 10%);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
176
|
.sidebar .dataset-meta-block {
|
|
248
177
|
margin-bottom: 25px;
|
|
249
178
|
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,
|
|
@@ -356,11 +285,6 @@
|
|
|
356
285
|
.dataset-page {
|
|
357
286
|
.dataset-header {
|
|
358
287
|
background-color: var(--current-theme-header);
|
|
359
|
-
background: linear-gradient(
|
|
360
|
-
16deg,
|
|
361
|
-
var(--current-theme-header-dark),
|
|
362
|
-
var(--current-theme-header)
|
|
363
|
-
);
|
|
364
288
|
}
|
|
365
289
|
}
|
|
366
290
|
|
|
@@ -7,14 +7,11 @@ $mine-shaft: #222;
|
|
|
7
7
|
$stanford-red: #8c1515;
|
|
8
8
|
$coral: #eb472c;
|
|
9
9
|
$salmon: #ec7764;
|
|
10
|
-
|
|
11
10
|
$rock: #5f574f;
|
|
12
11
|
$stone: #928b81;
|
|
13
12
|
$driftwood: #b6b1a9;
|
|
14
13
|
$misty: #dad7cb;
|
|
15
|
-
|
|
16
14
|
$fuchsia: #9169a7;
|
|
17
|
-
|
|
18
15
|
$ocean: #00505c;
|
|
19
16
|
$algae: #175e54;
|
|
20
17
|
$sky: rgb(0, 124, 146);
|
|
@@ -23,64 +20,81 @@ $persian-green: #00b489;
|
|
|
23
20
|
$night: #012a30;
|
|
24
21
|
$jungle-mist: #b5cbd3;
|
|
25
22
|
$dodger-blue: #5890ff;
|
|
26
|
-
|
|
27
23
|
$yellow: #ffd820;
|
|
28
24
|
$honey: #fffcee;
|
|
29
|
-
|
|
30
25
|
$success: #24c85e;
|
|
31
26
|
$info: #24c8c8;
|
|
32
27
|
$warning: #f7ba4b;
|
|
33
28
|
$danger: #c82424;
|
|
34
|
-
|
|
35
29
|
$notification-green: #77e6a3;
|
|
36
|
-
|
|
37
30
|
$warning-orange-cream: #ffefdb;
|
|
38
31
|
$warning-orange: #df7600;
|
|
39
|
-
|
|
40
32
|
//end old vars
|
|
41
33
|
|
|
34
|
+
// gray colors
|
|
42
35
|
$charcoal: #333;
|
|
43
36
|
$newspaper: #dfdfdf;
|
|
37
|
+
$cloud: #F8F8F8;
|
|
44
38
|
|
|
45
39
|
/* SCSS RGB */
|
|
46
40
|
$on-light-aqua: rgb(55, 188, 210);
|
|
47
41
|
$on-dark-aqua: rgba(32, 78, 90, 1);
|
|
48
42
|
$on-secondary: #196583;
|
|
49
|
-
$on-
|
|
43
|
+
$on-light: #8bc8d4;
|
|
44
|
+
$on-ultralight: adjust-color($on-dark-aqua, $lightness: 72%);
|
|
50
45
|
|
|
51
46
|
$mri-theme: rgba(79, 51, 130, 1);
|
|
52
47
|
$mri-hover: adjust-color($mri-theme, $lightness: 10%);
|
|
53
48
|
$mri-dark: darken($mri-theme, 25%);
|
|
54
49
|
$mri-secondary: adjust-color($mri-theme, $lightness: 15%);
|
|
55
50
|
$mri-light: adjust-color($mri-theme, $lightness: 45%);
|
|
51
|
+
$mri-ultralight: adjust-color($mri-theme, $lightness: 62%);
|
|
56
52
|
|
|
57
53
|
$eeg-theme: rgba(134, 31, 55, 1);
|
|
58
54
|
$eeg-hover: adjust-color($eeg-theme, $lightness: 10%);
|
|
59
55
|
$eeg-dark: darken($eeg-theme, 25%);
|
|
60
56
|
$eeg-secondary: adjust-color($eeg-theme, $lightness: 15%);
|
|
61
57
|
$eeg-light: adjust-color($eeg-theme, $lightness: 45%);
|
|
58
|
+
$eeg-ultralight: adjust-color($eeg-theme, $lightness: 65%);
|
|
62
59
|
|
|
63
60
|
$pet-theme: rgba(0, 105, 192, 1);
|
|
64
61
|
$pet-hover: adjust-color($pet-theme, $lightness: 10%);
|
|
65
62
|
$pet-dark: darken($pet-theme, 25%);
|
|
66
63
|
$pet-secondary: adjust-color($pet-theme, $lightness: 15%);
|
|
67
64
|
$pet-light: adjust-color($pet-theme, $lightness: 45%);
|
|
65
|
+
$pet-ultralight: adjust-color($pet-theme, $lightness: 60%);
|
|
68
66
|
|
|
69
67
|
$ieeg-theme: rgba(18, 109, 62, 1);
|
|
70
68
|
$ieeg-hover: adjust-color($ieeg-theme, $lightness: 10%);
|
|
71
69
|
$ieeg-dark: darken($ieeg-theme, 25%);
|
|
72
70
|
$ieeg-secondary: adjust-color($ieeg-theme, $lightness: 15%);
|
|
73
71
|
$ieeg-light: rgb(200, 212, 153);
|
|
72
|
+
$ieeg-ultralight: adjust-color($ieeg-theme, $lightness: 72%);
|
|
74
73
|
|
|
75
74
|
$meg-theme: rgba(156, 57, 0, 1);
|
|
76
75
|
$meg-hover: adjust-color($meg-theme, $lightness: 10%);
|
|
77
76
|
$meg-dark: darken($meg-theme, 25%);
|
|
78
77
|
$meg-secondary: adjust-color($meg-theme, $lightness: 15%);
|
|
79
78
|
$meg-light: adjust-color($meg-theme, $lightness: 45%);
|
|
79
|
+
$meg-ultralight: adjust-color($meg-theme, $lightness: 68%);
|
|
80
|
+
|
|
81
|
+
$nih-theme: rgb(34, 133, 148);
|
|
82
|
+
$nih-hover: adjust-color($nih-theme, $lightness: 10%);
|
|
83
|
+
$nih-dark: rgba(32, 85, 138, 1);
|
|
84
|
+
$nih-secondary: adjust-color($nih-theme, $lightness: 15%);
|
|
85
|
+
$nih-light: rgba(155, 211, 221, 1);
|
|
86
|
+
|
|
87
|
+
$nirs-theme: rgb(166 21 40);
|
|
88
|
+
$nirs-hover: adjust-color($nirs-theme, $lightness: 10%);
|
|
89
|
+
$nirs-dark: darken($nirs-theme, 25%);
|
|
90
|
+
$nirs-secondary: adjust-color($nirs-theme, $lightness: 15%);
|
|
91
|
+
$nirs-light: adjust-color($nirs-theme, $lightness: 45%);
|
|
92
|
+
$nirs-ultralight: adjust-color($nirs-theme, $lightness: 61%);
|
|
80
93
|
|
|
81
94
|
$on-light-green: #00eeb5;
|
|
82
95
|
$on-light-red: #c00342;
|
|
83
96
|
$on-light-orange: rgb(255, 110, 43);
|
|
97
|
+
$text-cite: #509145;
|
|
84
98
|
|
|
85
99
|
$primary: $on-dark-aqua;
|
|
86
100
|
|
|
@@ -95,7 +109,6 @@ $screen-lg: 989px;
|
|
|
95
109
|
|
|
96
110
|
$border-radius-default: 4px;
|
|
97
111
|
|
|
98
|
-
|
|
99
112
|
/* CSS HEX */
|
|
100
113
|
:root {
|
|
101
114
|
--mri-theme: #{$mri-theme};
|
|
@@ -103,7 +116,8 @@ $border-radius-default: 4px;
|
|
|
103
116
|
--pet-theme: #{$pet-theme};
|
|
104
117
|
--ieeg-theme: #{$ieeg-theme};
|
|
105
118
|
--meg-theme: #{$meg-theme};
|
|
106
|
-
|
|
119
|
+
--nirs-theme: #{$nirs-theme};
|
|
120
|
+
--nih-theme: #{$nih-theme};
|
|
107
121
|
--on-light-aqua: #{$on-light-aqua};
|
|
108
122
|
--on-dark-aqua: #{$on-dark-aqua};
|
|
109
123
|
--on-light-green: #{on-light-green};
|
|
@@ -112,12 +126,15 @@ $border-radius-default: 4px;
|
|
|
112
126
|
--current-theme-primary-hover: #{$on-light-aqua};
|
|
113
127
|
--current-theme-secondary: #{$on-secondary};
|
|
114
128
|
--current-theme-primary-dark: #{$on-dark-aqua};
|
|
115
|
-
--current-theme-primary-light: #{$on-
|
|
129
|
+
--current-theme-primary-light: #{$on-light};
|
|
130
|
+
--current-theme-primary-ultralight: #{$on-ultralight};
|
|
116
131
|
--current-theme-header: #333;
|
|
117
132
|
--current-theme-header-dark: #333;
|
|
118
133
|
--font-sans: #{$font-sans};
|
|
119
134
|
--border-radius-default: #{$border-radius-default};
|
|
120
135
|
--newspaper: #{$newspaper};
|
|
136
|
+
--cloud: #{$cloud};
|
|
137
|
+
--text-citation: #{$text-cite};
|
|
121
138
|
}
|
|
122
139
|
|
|
123
140
|
.mri-theme {
|
|
@@ -148,11 +165,18 @@ $border-radius-default: 4px;
|
|
|
148
165
|
background-color: $meg-theme;
|
|
149
166
|
}
|
|
150
167
|
|
|
168
|
+
.nih-theme {
|
|
169
|
+
background: $nih-theme;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.nirs-theme {
|
|
173
|
+
background: $nirs-theme;
|
|
174
|
+
}
|
|
175
|
+
|
|
151
176
|
.gray-bg {
|
|
152
177
|
background: #f3f3f3;
|
|
153
178
|
}
|
|
154
179
|
|
|
155
|
-
|
|
156
180
|
.search-page-mri,
|
|
157
181
|
.dataset-page-mri {
|
|
158
182
|
--current-theme-primary: #{$mri-theme};
|
|
@@ -162,6 +186,7 @@ $border-radius-default: 4px;
|
|
|
162
186
|
--current-theme-primary-light: #{$mri-light};
|
|
163
187
|
--current-theme-header: #{$mri-theme};
|
|
164
188
|
--current-theme-header-dark: #{$mri-dark};
|
|
189
|
+
--current-theme-primary-ultralight: #{$mri-ultralight};
|
|
165
190
|
}
|
|
166
191
|
|
|
167
192
|
.search-page-eeg,
|
|
@@ -173,6 +198,7 @@ $border-radius-default: 4px;
|
|
|
173
198
|
--current-theme-primary-light: #{$eeg-light};
|
|
174
199
|
--current-theme-header: #{$eeg-theme};
|
|
175
200
|
--current-theme-header-dark: #{$eeg-dark};
|
|
201
|
+
--current-theme-primary-ultralight: #{$eeg-ultralight};
|
|
176
202
|
}
|
|
177
203
|
|
|
178
204
|
.search-page-pet,
|
|
@@ -184,6 +210,7 @@ $border-radius-default: 4px;
|
|
|
184
210
|
--current-theme-primary-light: #{$pet-light};
|
|
185
211
|
--current-theme-header: #{$pet-theme};
|
|
186
212
|
--current-theme-header-dark: #{$pet-dark};
|
|
213
|
+
--current-theme-primary-ultralight: #{$pet-ultralight};
|
|
187
214
|
}
|
|
188
215
|
|
|
189
216
|
.search-page-ieeg,
|
|
@@ -195,6 +222,7 @@ $border-radius-default: 4px;
|
|
|
195
222
|
--current-theme-primary-light: #{$ieeg-light};
|
|
196
223
|
--current-theme-header: #{$ieeg-theme};
|
|
197
224
|
--current-theme-header-dark: #{$ieeg-dark};
|
|
225
|
+
--current-theme-primary-ultralight: #{$ieeg-ultralight};
|
|
198
226
|
}
|
|
199
227
|
|
|
200
228
|
.search-page-meg,
|
|
@@ -206,4 +234,28 @@ $border-radius-default: 4px;
|
|
|
206
234
|
--current-theme-primary-light: #{$meg-light};
|
|
207
235
|
--current-theme-header: #{$meg-theme};
|
|
208
236
|
--current-theme-header-dark: #{$meg-dark};
|
|
237
|
+
--current-theme-primary-ultralight: #{$meg-ultralight};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.search-page-nirs,
|
|
241
|
+
.dataset-page-nirs {
|
|
242
|
+
--current-theme-primary: #{$nirs-theme};
|
|
243
|
+
--current-theme-primary-hover: #{$nirs-hover};
|
|
244
|
+
--current-theme-primary-dark: #{$nirs-dark};
|
|
245
|
+
--current-theme-secondary: #{$nirs-secondary};
|
|
246
|
+
--current-theme-primary-light: #{$nirs-light};
|
|
247
|
+
--current-theme-header: #{$nirs-theme};
|
|
248
|
+
--current-theme-header-dark: #{$nirs-dark};
|
|
249
|
+
--current-theme-primary-ultralight: #{$nirs-ultralight};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.search-page-nih,
|
|
253
|
+
.dataset-page-nih {
|
|
254
|
+
--current-theme-primary: #{$nih-theme};
|
|
255
|
+
--current-theme-primary-hover: #{$nih-hover};
|
|
256
|
+
--current-theme-primary-dark: #{$nih-dark};
|
|
257
|
+
--current-theme-secondary: #{$nih-secondary};
|
|
258
|
+
--current-theme-primary-light: #{$nih-light};
|
|
259
|
+
--current-theme-header: #{$nih-theme};
|
|
260
|
+
--current-theme-header-dark: #{$nih-dark};
|
|
209
261
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { fireEvent, render, screen } from "@testing-library/react"
|
|
3
|
-
import { NeurobagelSearch } from "../NeurobagelSearch"
|
|
3
|
+
import { NeurobagelSearch } from "../components/NeurobagelSearch"
|
|
4
4
|
|
|
5
5
|
describe("NeurobagelSearch component", () => {
|
|
6
6
|
it("? toggle can be clicked", async () => {
|