Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
213359d
adding init updates for search results list/item/render to allow for …
thinknoack Jun 16, 2025
e426686
adding new SearchResutlDetails.tsx
thinknoack Jun 17, 2025
7970662
removing dupe component _variables.scss for default app variables.scs…
thinknoack Jun 17, 2025
d1b1a16
refactor hex scss
thinknoack Jun 17, 2025
728f7f8
update to details layout and component, moving scss for details to ne…
thinknoack Jun 17, 2025
87af605
refactor scss
thinknoack Jun 17, 2025
c9b4814
update to fix lowercase modality for search H1/H2
thinknoack Jun 17, 2025
7325cd3
update text size
thinknoack Jun 20, 2025
7a0a5a9
chore lint/test updates
thinknoack Jun 23, 2025
0e15d4e
adding tab focus for A11y, adjusting layouts and updates to details c…
thinknoack Jun 23, 2025
bf9258f
moving and re-styling dataset filters for logged in users
thinknoack Jun 24, 2025
90750fa
moving search components from general components directory to search/…
thinknoack Jun 24, 2025
3e576a0
update component name
thinknoack Jun 24, 2025
e12467f
adding tabbing to dataset radios
thinknoack Jun 24, 2025
2d49629
Merge branch 'master' into update/search-results-layouts-details-comp…
thinknoack Jun 24, 2025
a74b979
lint fix
thinknoack Jun 24, 2025
421b373
update comment
thinknoack Jun 24, 2025
cc39639
move var above condition and use in conditional
thinknoack Jun 25, 2025
ef04418
check for whitespace in heading for search results
thinknoack Jun 25, 2025
79de8a7
new component for metadata lists in the search details, using modalit…
thinknoack Jun 27, 2025
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
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';
/* Accordion styles */

.on-accordion-wrapper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import type { ArrowProps, ResponsiveType } from "react-multi-carousel/lib/types"
import "react-multi-carousel/lib/styles.css"
import "./slider.scss"
import { ModalityHexagon } from "../../components/modality-cube/ModalityHexagon"

Check warning on line 9 in packages/openneuro-app/src/scripts/components/activity-slider/ActivitySlider.tsx

View check run for this annotation

Codecov / codecov/patch

packages/openneuro-app/src/scripts/components/activity-slider/ActivitySlider.tsx#L9

Added line #L9 was not covered by tests

export interface ActivitySliderProps {
className?: string
Expand Down Expand Up @@ -62,28 +63,9 @@
{data.map(({ node }) => (
<div className="activity-slider-node" key={node.id}>
<div className="ds-modality">
<div className="hexagon-wrapper">
{node.latestSnapshot.summary?.primaryModality
? (
<>
<div
className={"hexagon " +
node.latestSnapshot.summary?.primaryModality
.toLowerCase()}
>
</div>
<div className="label">
{node.latestSnapshot.summary?.primaryModality}
</div>
</>
)
: (
<>
<div className="hexagon no-modality"></div>
<div className="label">N/A</div>
</>
)}
</div>
<ModalityHexagon
primaryModality={node.latestSnapshot.summary?.primaryModality}
/>

Check warning on line 68 in packages/openneuro-app/src/scripts/components/activity-slider/ActivitySlider.tsx

View check run for this annotation

Codecov / codecov/patch

packages/openneuro-app/src/scripts/components/activity-slider/ActivitySlider.tsx#L66-L68

Added lines #L66 - L68 were not covered by tests
</div>
<div className="ds-name">
<h4>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

.activity-slider {
h3 {
Expand Down Expand Up @@ -32,87 +32,6 @@
margin: 10px 0 0;
}
}
.activity-slider-node {
.hexagon-wrapper {
text-align: center;
margin: 20px auto 0;
position: relative;
display: inline-block;
width: 45px;
height: 45px;
div.label {
position: absolute;
top: 0;
text-align: center;
width: 100%;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-weight: 600;
font-size: 13px;
}
}

.hexagon {
height: 100%;
width: calc(100% * 0.57735);
display: inline-block;
}

.hexagon:before {
position: absolute;
top: 0;
right: calc((100% / 2) - ((100% * 0.57735) / 2));
background-color: inherit;
height: inherit;
width: inherit;
content: '';
transform: rotateZ(60deg);
}

.hexagon:after {
position: absolute;
top: 0;
right: calc((100% / 2) - ((100% * 0.57735) / 2));
background-color: inherit;
height: inherit;
width: inherit;
content: '';
transform: rotateZ(-60deg);
}
.hexagon {
transition: background-color 0.3s;
background-color: $on-dark-aqua;

&.mri {
background-color: $mri-theme;
}
&.eeg {
background-color: $eeg-theme;
}

&.pet {
background-color: $pet-theme;
}
&.ieeg {
background-color: $ieeg-theme;
}

&.meg {
background-color: $meg-theme;
}
&.eeg {
background-color: $on-light-green;
}
&.nirs{
background-color: $nirs-theme;
}
}
}
}
.react-multi-carousel-dot--active button {
background-color: var(--current-theme-primary);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

.on-button {
font-family: $font-sans;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

.toggle-btn {
border: 1px solid #aaa;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

.dropdown-wrapper {
display: inline-block;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

.facet-accordion.on-accordion-wrapper {
padding: 0 15px;
Expand Down Expand Up @@ -45,7 +45,7 @@
.level-1 > li {
border-top: 1px solid #dfdfdf;
> span:hover {
background-color: var(--current-theme-primary-light);
background-color: var(--current-theme-primary-ultralight);
}

> .label {
Expand All @@ -60,7 +60,7 @@
display: flex;
justify-content: flex-start;
&:hover {
background-color: var(--current-theme-primary-light);
background-color: var(--current-theme-primary-ultralight);
}

.label {
Expand Down Expand Up @@ -165,7 +165,8 @@
.search-nav .facet-open.modality-facet {
margin: 20px 0;
border: 0;
background: #e5f4f7;
background: var(--current-theme-primary-ultralight);
border: 1px solid var(--current-theme-primary-light);
border-radius: $border-radius-default;
padding: 10px;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

footer {
background: $charcoal;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

body {
font-family: $font-sans;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';
header {
position: relative;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

form,
fieldset {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../scss/variables";
@import "../../scss/variables";

.term-input {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $spinner-hexagon-bg-color: var(--current-theme-primary);
width: $spinner-width;
height: $spinner-height;
border-radius: 0;
background: var(--current-theme-primary-light);
background: var(--current-theme-primary-ultralight);
opacity: 1;
top: $spinner-base-value;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';

.modal-wrapper {
position: fixed;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from "react"
import type { FC } from "react"

import "./modality-hexagon.scss"
interface ModalityHexagonProps {
primaryModality: string | null | undefined
}

//ModalityHexagon component displays a colored hexagon and label
// based on the provided primaryModality.

export const ModalityHexagon: FC<ModalityHexagonProps> = ({
primaryModality,
}) => {
const hexagonClass = primaryModality
? primaryModality.toLowerCase()
: "no-modality"

const labelText = primaryModality?.toLowerCase() === "ieeg"
? "iEEG"

Check warning on line 20 in packages/openneuro-app/src/scripts/components/modality-cube/ModalityHexagon.tsx

View check run for this annotation

Codecov / codecov/patch

packages/openneuro-app/src/scripts/components/modality-cube/ModalityHexagon.tsx#L20

Added line #L20 was not covered by tests
: primaryModality?.toUpperCase() || (
<i className="fa fa-circle-o-notch fa-spin"></i>
)

return (
<div className="hexagon-wrapper">
<div className={`hexagon ${hexagonClass}`}></div>
<div className="label">{labelText}</div>
</div>
)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';
// Variables for hexagonal grid and cube sizes
$hex-width: 240px;
$hex-height: 450px; // Height for the hex grid
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
@import '../../scss/variables';

.hexagon-wrapper {
text-align: center;
position: relative;
display: inline-block;
width: 45px;
height: 45px;

div.label {
position: absolute;
top: 0;
text-align: center;
width: 100%;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
font-weight: 600;
font-size: 13px;
color: #fff; // Default label color
}

.hexagon {
height: 100%;
width: calc(100% * 0.57735);
display: inline-block;
transition: background-color 0.3s;
background-color: $on-dark-aqua; // Default hexagon background

&:before,
&:after {
position: absolute;
top: 0;
right: calc((100% / 2) - ((100% * 0.57735) / 2));
background-color: inherit;
height: inherit;
width: inherit;
content: '';
}

&:before {
transform: rotateZ(60deg);
}

&:after {
transform: rotateZ(-60deg);
}

&.mri { background-color: $mri-theme; }
&.eeg { background-color: $on-light-green; } // EEG uses on-light-green
&.pet { background-color: $pet-theme; }
&.ieeg { background-color: $ieeg-theme; }
&.meg { background-color: $meg-theme; }
&.nirs { background-color: $nirs-theme; }
}
}

a {
.hexagon-wrapper {
margin: 20px auto;

div.label {
color: unset;
}

.hexagon {
transition: color 0.3s;
background-color: #fff;

// Modality specific colors (when inside 'a')
&.mri { background-color: #fff; color: $mri-theme; }
&.eeg { background-color: #fff; color: $eeg-theme; }
&.pet { background-color: #fff; color: $pet-theme; }
&.ieeg { background-color: #fff; color: $ieeg-theme; }
&.meg { background-color: #fff; color: $meg-theme; }
&.nirs { background-color: #fff; color: $nirs-theme; }
}

&:hover {
.hexagon {
color: lighten($on-dark-aqua, 15%);
&.mri { color: lighten($mri-theme, 10%); }
&.eeg { color: lighten($eeg-theme, 10%); }
&.pet { color: lighten($pet-theme, 10%); }
&.ieeg { color: lighten($ieeg-theme, 10%); }
&.meg { color: lighten($meg-theme, 10%); }
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';
@import '../scss//normalize';
@import '../scss//helper-classes';
@import '../scss//flex-grid';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';
// Outer container
.progress {
overflow: hidden;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../scss/variables';
@import '../../scss/variables';
.custom-radio {
margin: 10px 0 20px;
[type='radio']:checked,
Expand Down Expand Up @@ -319,7 +319,7 @@
}
}
[type='radio']:not(:checked) + label:hover {
background-color: var(--current-theme-primary-light);
background-color: var(--current-theme-primary-ultralight);
}
[type='radio']:checked + label {
color: #fff;
Expand Down
Loading
Loading