Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
0c34482
fix(helm): Improve compatiblity with EKS 1.19
nellh May 12, 2021
403ed7c
fix(helm): Correct zfs-localpv volume balancing
nellh May 18, 2021
33dcdda
updates to landing header and facet refactor
thinknoack May 25, 2021
61f0d57
pixel adjustment for hex bg
thinknoack May 25, 2021
db72edb
front hero cube adjustments
thinknoack May 25, 2021
a6fa63e
weird merge issue and some commit mess fixes
thinknoack May 25, 2021
3777f10
speed up modal exit/hide
thinknoack May 25, 2021
28c6c65
speed up modal exit/hide
thinknoack May 25, 2021
a5cb1ef
adding some placeholder search itmes
thinknoack May 26, 2021
d32399e
update to modal timing
thinknoack May 26, 2021
8763a0e
conflict updates
thinknoack May 26, 2021
0597e3a
update to search and merge master
thinknoack May 26, 2021
5692856
update to search and merge master
thinknoack May 26, 2021
150c9b3
Merge branch 'master' into landingheader
thinknoack May 26, 2021
433fe93
refactor to landing page header
thinknoack May 26, 2021
4a9dfaa
update toggleClick
thinknoack May 26, 2021
16aaf9d
Merge pull request #2142 from OpenNeuroOrg/landingheader
thinknoack May 26, 2021
62db408
merge master
thinknoack May 27, 2021
b83d259
fix(helm): Production configuration fixes for eks 1.19 update
nellh May 27, 2021
3f0e9ba
Merge branch 'helm-1.19-compatibility'
nellh May 27, 2021
fc68e1d
Add endpoints for enabling/disabling features.
david-nishi May 27, 2021
17d9f7a
Enable toggle for feature `redesign_2021`.
david-nishi May 27, 2021
eb198f9
Make feature consistent with enable/disable urls.
david-nishi May 27, 2021
2311e93
Simplify enable/disable urls.
david-nishi May 27, 2021
75b5508
Redesign endpoints redirect to homepage.
david-nishi May 27, 2021
03a60fd
add feature to FeatureToggleProps
david-nishi May 28, 2021
1d80289
Have FeatureToggle return jsx.
david-nishi May 28, 2021
dcf0312
fix(helm): Raise CPU limit for dataset worker container
nellh May 28, 2021
60a871c
Merge pull request #2144 from OpenNeuroOrg/107-feature-flag
nellh May 28, 2021
d68b7de
adding search page and results
thinknoack May 28, 2021
346df91
minor updates for PR 2146
thinknoack May 29, 2021
b7ec7ad
update in props [string] to string[]
thinknoack May 29, 2021
ec33901
update after master merge
thinknoack May 29, 2021
38b551d
adding searchpagecontainer and some other cleanup
thinknoack May 29, 2021
9d77a50
working on adding containers
thinknoack May 29, 2021
4a1415f
refactor and updates to search
thinknoack May 30, 2021
6a0956c
adding array type to children
thinknoack May 30, 2021
5db4912
update to setSeclected on Radio
thinknoack May 31, 2021
252059b
adding mock data for filters block
thinknoack May 31, 2021
99fe342
update labels for filters block
thinknoack May 31, 2021
3e07a2e
update theme variables to use css var
thinknoack May 31, 2021
562a62e
update to invalid and shared icons in result
thinknoack May 31, 2021
6a26d32
updates to radio
thinknoack May 31, 2021
38d242a
spacing for keyword and filters block
thinknoack May 31, 2021
465620d
update font weight for selected facet list item
thinknoack May 31, 2021
62cee07
adding fake load more
thinknoack May 31, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const singleTabAccordion = (
<AccordionTab
accordionStyle="plain"
name="single"
tabId="tab1"
id="tab1"
label="Single Tab"
children="This is a single accordion"
/>
Expand Down
11 changes: 5 additions & 6 deletions packages/openneuro-components/src/accordion/AccordionTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import './accordion.scss'

export interface AccordionTabProps {
children: React.ReactNode
tabId: string
id: string
className: string
label: string
plainStyle: boolean
startOpen: boolean
dropdown: boolean
startOpen?: boolean
dropdown?: boolean
accordionStyle: 'plain' | 'file-tree' | 'bids-wrappper'
}

Expand All @@ -20,7 +19,7 @@ export interface AccordionTabProps {
*/
export const AccordionTab: React.FC<AccordionTabProps> = ({
children,
tabId,
id,
label,
className,
accordionStyle,
Expand All @@ -37,7 +36,7 @@ export const AccordionTab: React.FC<AccordionTabProps> = ({

return (
<>
<span className={`${accordionStyle}` + ' ' + `${className}`} id={tabId}>
<span className={`${accordionStyle}` + ' ' + `${className}`} id={id}>
<div
className={`accordion-title ${isOpen ? 'open' : ''}`}
onClick={() => setOpen(!isOpen)}>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/openneuro-components/src/facets/FacetRadio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface FacetRadioProps {
accordionStyle: string
startOpen: boolean
label: string
dropdown: boolean
dropdown?: boolean
active: number
setActive: (index) => void
}
Expand Down
60 changes: 60 additions & 0 deletions packages/openneuro-components/src/facets/FacetRange.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import React from 'react'
import { AccordionTab } from '../accordion/AccordionTab'
import { AccordionWrap } from '../accordion/AccordionWrap'
import { TwoHandleRange } from '../range/TwoHandleRange'
import './facet.scss'

export interface FacetRangeProps {
accordionStyle: string
startOpen: boolean
label: string
dropdown?: boolean
min: number
max: number
step: number
dots: boolean
pushable: boolean
defaultValue: [number, number]
marks: { number: string }
newvalue: [number, number]
setNewValue: (newvalue) => void
}

export const FacetRange = ({
startOpen,
label,
accordionStyle,
dropdown,
min,
max,
step,
dots,
pushable,
defaultValue,
marks,
newvalue,
setNewValue,
}: FacetRangeProps) => {
return (
<AccordionWrap className="facet-accordion">
<AccordionTab
accordionStyle={accordionStyle}
label={label}
startOpen={startOpen}
dropdown={dropdown}>
<div className="facet-radio">
<TwoHandleRange
min={min}
max={max}
step={step}
dots={dots}
pushable={pushable}
defaultValue={defaultValue}
newvalue={newvalue}
setNewValue={setNewValue}
/>
</div>
</AccordionTab>
</AccordionWrap>
)
}
2 changes: 1 addition & 1 deletion packages/openneuro-components/src/facets/FacetSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface FacetSelectProps {
value: string
count: number
Comment thread
thinknoack marked this conversation as resolved.
Outdated
children?: null | { label: string; value: string; count: number }[]
}
}[]
accordionStyle: string
startOpen: boolean
label: string
Expand Down
4 changes: 4 additions & 0 deletions packages/openneuro-components/src/input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const Input: React.FC<InputProps> = ({
name,
labelStyle,
setValue,
value,
}) => {
return (
<>
Expand All @@ -27,6 +28,7 @@ export const Input: React.FC<InputProps> = ({
<input
type={type}
name={name}
value={value}
placeholder={placeholder}
onChange={e => setValue(e.target.value)}
/>
Expand All @@ -36,6 +38,7 @@ export const Input: React.FC<InputProps> = ({
<div className="form-control inline">
{label ? <label htmlFor={name}>{label}</label> : null}
<input
value={value}
type={type}
name={name}
placeholder={placeholder}
Expand All @@ -46,6 +49,7 @@ export const Input: React.FC<InputProps> = ({
<div className="form-control ">
{label ? <label htmlFor={name}>{label}</label> : null}
<input
value={value}
type={type}
name={name}
placeholder={placeholder}
Expand Down
20 changes: 16 additions & 4 deletions packages/openneuro-components/src/input/input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,29 @@ textarea {
box-sizing: border-box;
border-radius: 0;
border: 0.1rem solid #ddd;
padding: 12px;
padding: 10px 12px;
max-width: 100%;
line-height: 12px;
&:focus {
border-color: rgb(76, 104, 230);
}

&::placeholder {
/* Chrome, Firefox, Opera, Safari 10.1+ */
color: rgb(160, 160, 160);

opacity: 1; /* Firefox */
}
}

input[type='search'] {
&::-webkit-search-cancel-button {
-webkit-appearance: none;
background: url('../assets/close-button.png') no-repeat center;
background-size: contain;
height: 10px;
width: 10px;
}
}

select {
border-radius: 0;
}
Expand All @@ -51,6 +60,10 @@ input[type='submit'] {
.form-control {
display: flex;
flex-direction: column;
label {
font-size: 14px;
margin-bottom: 10px;
}
}

.form-control.inline {
Expand Down Expand Up @@ -121,4 +134,3 @@ input[type='submit'] {
}
}
}

136 changes: 127 additions & 9 deletions packages/openneuro-components/src/mock-content/facet-content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export const modalities = [
label: 'EEG',
value: 'EEG',
count: 303,
children: null,
},
{
label: 'iEEG',
value: 'iEEG',
count: 303,
children: [
{
label: 'ECoG',
Expand Down Expand Up @@ -70,22 +76,134 @@ export const modalities = [
},
]

export const showDatasetsRadio = [
export const show_available = [
{ label: 'All', value: 'all' },
{ label: 'Following', value: 'following' },
{ label: 'My Uploads', value: 'my_uploads' },
{ label: 'My Bookmarks', value: 'bookmarked' },
]

export const showMyUploads_available = [
{ label: 'Public', value: 'public' },
{ label: 'Shared with Me', value: 'shared_with_me' },
{ label: 'Invalid', value: 'invalid' },
]

export const diagnosis = [
{
label: "Alzheimer's",
value: 'alzheimers',
children: null,
Comment thread
thinknoack marked this conversation as resolved.
Outdated
},
{
label: 'Another',
value: 'Another',
children: null,
},
{
label: 'Other',
value: 'Other',
children: null,
},
]

export const task = [
{
label: 'Rest',
value: 'rest',
children: null,
},
{
label: 'Another',
value: 'Another',
children: null,
},
{
label: 'Other',
value: 'Other',
children: null,
},
]

export const author_pi = [
{
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 = [
{ label: 'All', value: 'all' },
{ label: 'Male', value: 'male' },
{ label: 'Female', value: 'female' },
]

export const species = [
{
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 = [
{
label: 'All',
value: 'All',
label: 'Cross',
value: 'cross',
children: null,
},
{
label: 'Longitudinal',
value: 'longitudinal',
children: null,
},
{
label: 'Other',
value: 'other',
children: null,
},
]

export const domain = [
{
label: 'Following',
value: 'following',
label: 'Domain 1',
value: '1',
children: null,
},
{
label: 'My Datasets',
value: 'datasets',
label: 'Domain 2',
value: '2',
children: null,
},
{
label: 'My Bookmarks',
value: 'bookmarks',
label: 'Ontology',
value: 'ontology',
children: null,
},
]
3 changes: 2 additions & 1 deletion packages/openneuro-components/src/modal/UserModalInner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ export const UserModalInner: React.FC = ({}) => {
/>
<AccordionWrap>
<AccordionTab
name="single"
tabId="orcid-info-accordion"
tabLable="What is this?"
label="What is this?"
children={
<>
ORCID users are identified and connected to their
Expand Down
8 changes: 5 additions & 3 deletions packages/openneuro-components/src/page/Page.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Story, Meta } from '@storybook/react'

import { Page, PageProps } from './Page'
import { FrontPage } from '../front-page/FrontPage'
import { SearchPageContainer } from '../search-page/SearchPageContainer'
import { SearchPageContainerExample } from '../search-page/SearchPageContainerExample'
import * as HeaderStories from '../header/Header.stories'

import { MRIPortalContent } from '../mock-content/portal-content'
Expand All @@ -25,14 +25,16 @@ FrontPageExample.args = {

export const SearchPageExample = Template.bind({})
SearchPageExample.args = {
children: <SearchPageContainer searchResults={mri.data.datasets.edges} />,
children: (
<SearchPageContainerExample searchResults={mri.data.datasets.edges} />
),
headerArgs: HeaderStories.LoggedOut.args,
className: 'search-page search-page-mri',
}
export const MRIPortalPageExample = Template.bind({})
MRIPortalPageExample.args = {
children: (
<SearchPageContainer
<SearchPageContainerExample
searchResults={mri.data.datasets.edges}
portalContent={MRIPortalContent}
/>
Expand Down
Loading