Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 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
97 changes: 12 additions & 85 deletions .pnp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/openneuro-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
7 changes: 6 additions & 1 deletion packages/openneuro-components/src/accordion/AccordionTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface AccordionTabProps {
label: string
plainStyle: boolean
startOpen: boolean
dropdown: boolean
accordionStyle: 'plain' | 'file-tree' | 'bids-wrappper'
}

Expand All @@ -24,6 +25,7 @@ export const AccordionTab: React.FC<AccordionTabProps> = ({
className,
accordionStyle,
startOpen,
dropdown,
}) => {
const [isOpen, setOpen] = React.useState(startOpen)
const fileTreeIcon = accordionStyle == 'file-tree' && (
Expand All @@ -41,7 +43,10 @@ export const AccordionTab: React.FC<AccordionTabProps> = ({
onClick={() => setOpen(!isOpen)}>
{fileTreeIcon} {label}
</div>
<div className={`accordion-item ${!isOpen ? 'collapsed' : ''}`}>
<div
className={`accordion-item ${!isOpen ? ' collapsed' : ''} ${
dropdown ? ' dropdown-style' : ''
}`}>
<div className="accordion-content">{children}</div>
</div>
</span>
Expand Down
11 changes: 11 additions & 0 deletions packages/openneuro-components/src/accordion/accordion.scss
Original file line number Diff line number Diff line change
@@ -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);
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ const CountToggleTemplate: Story<CountToggleProps> = ({
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 (
<CountToggle
label={label}
icon={icon}
disabled={disabled}
onClick={onClick}
toggleClick={toggleClick}
tooltip={tooltip}
displayOptions={displayOptions}
setDisplayOptions={setDisplayOptions}
clicked={clicked}
showClicked={showClicked}
count={count}
/>
)
Expand Down
31 changes: 12 additions & 19 deletions packages/openneuro-components/src/count-toggle/CountToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,62 +10,55 @@ 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 = ({
label,
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 = (
<span className="toggle-counter">
<Button
className={displayOptions ? 'toggle-btn active' : 'toggle-btn'}
className={clicked ? 'toggle-btn active' : 'toggle-btn'}
iconSize="12px"
icon={'fa ' + icon}
onClick={() => toggleClick()}>
onClick={toggleClick}>
{label} <span>{count}</span>
</Button>
</span>
)
const disabledToggleButton = (
<span className="toggle-counter disabled">
<Button
className={displayOptions ? 'toggle-btn active' : 'toggle-btn'}
className={clicked ? 'toggle-btn active' : 'toggle-btn'}
iconSize="12px"
icon={'fa ' + icon}
onClick={() => toggleLogin()}>
onClick={toggleLogin}>
{label} <span>{count}</span>
</Button>
</span>
)

const button = disabled ? disabledToggleButton : toggleButton
return (
<>
<div className="toggle-counter-wrap">
{tooltip ? (
<Tooltip flow="up" tooltip={tooltip}>
{disabled ? disabledToggleButton : toggleButton}
{button}
</Tooltip>
) : disabled ? (
disabledToggleButton
) : (
toggleButton
button
)}
</div>
<Modal isOpen={isOpen} toggle={toggleLogin} closeText="Close">
Expand Down
Loading