Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Fixing the COVID-19 tag, putting it at the top of diseases list #107

Merged
merged 4 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions src/components/diseases.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,10 @@
position: absolute;
z-index: 10000000;
}

& .diseases__featured {
border: 1px solid var(--ruling-color);

}
}

2 changes: 1 addition & 1 deletion src/components/diseases.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function Diseases({ onSubmit, blacklist = [] }) {
>
<ComboboxList persistSelection={true}>
{sorted.map(subject => (
<ComboboxOption key={subject.name} value={format(subject)} />
<ComboboxOption className={subject.featured ? "diseases__featured" : ""} key={subject.name} value={format(subject)} />
))}
</ComboboxList>
</ComboboxPopover>
Expand Down
5 changes: 5 additions & 0 deletions src/components/facets.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
& input {
width: 2em;
}

&-featured {
color: var(--prereview-red);
font-weight: bold;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/facets.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default function Facets({ counts = {}, ranges = {}, isFetching }) {
isFetching || !(counts.subjectName || {})[subject.name]
}
label={
<span className="facets__facet-label">
<span className={`facets__facet-label ${subject.featured ? "facets__facet-label-featured" : ""}`}>
{subject.alternateName ? (
<abbr title={subject.name}>{subject.alternateName}</abbr>
) : (
Expand Down
12 changes: 6 additions & 6 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ export const INDEXED_PREPRINT_PROPS = [

// See https://github.com/PREreview/rapid-prereview/issues/10
export const DISEASES = [
{
name: 'Coronavirus disease 2019',
alternateName: 'COVID-19',
priority: 'red',
featured: true
},
{
name: 'Chikungunya',
priority: 'orange'
Expand Down Expand Up @@ -201,12 +207,6 @@ export const DISEASES = [
priority: 'red'
},

{
name: '2019 novel coronavirus',
alternateName: '2019-nCoV',
priority: 'red'
},

{
name: 'Plague',
priority: 'yellow'
Expand Down