-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
He updates #654
He updates #654
Changes from 3 commits
36f3518
cca8d0c
2cb69c6
b972ddd
28bf3a7
3ebab75
c105463
c85da6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
width: 80%; | ||
margin-left: 20px; | ||
|
||
.xAxisContainer{ | ||
.xAxisContainer { | ||
width: 100%; | ||
|
||
.xAxisLabelContainer { | ||
|
@@ -63,8 +63,8 @@ | |
.yAxisIndicator { | ||
@extend %bodyText; | ||
color: $alto; | ||
font-size: 18px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you use the variable also here? |
||
} | ||
|
||
} | ||
} | ||
|
||
|
@@ -77,8 +77,8 @@ | |
position: relative; | ||
bottom: 50%; | ||
left: 2px; | ||
font-size: 18px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here |
||
} | ||
|
||
} | ||
|
||
.scatterPlotLegendWrapper { | ||
|
@@ -88,14 +88,15 @@ | |
.legendTitle { | ||
color: $grey-text; | ||
font-weight: 300; | ||
font-size: 13px; | ||
font-size: 17px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, is to have all font-sizes tracked |
||
} | ||
|
||
.legendItem { | ||
align-items: center; | ||
color: $white; | ||
display: flex; | ||
margin: 0; | ||
font-size: 18px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And the last missing |
||
|
||
.legendItemColor { | ||
border-radius: 50%; | ||
|
@@ -158,10 +159,9 @@ | |
.scatterPlotChartWrapper { | ||
width: 100%; | ||
|
||
.xAxisLabelContainer { | ||
padding-left: calc(50% - 165px); | ||
|
||
} | ||
.xAxisLabelContainer { | ||
padding-left: calc(50% - 165px); | ||
} | ||
|
||
.yAxisContainer { | ||
bottom: 300px; | ||
|
@@ -176,7 +176,6 @@ | |
width: 90%; | ||
|
||
.continentsLegendWrapper { | ||
|
||
.legendItemsContainer { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,13 +68,24 @@ function AnalyzeAreasCardComponent({ | |
setAoiHistoryModalOpen(!isAoiHistoryModalOpen); | ||
}; | ||
|
||
const clearFilters = () => { | ||
handleOptionSelection({ slug: 'clear' }); | ||
}; | ||
|
||
return ( | ||
<div | ||
className={cx(styles.sidebarCardContainer, className, { | ||
[styles.onboardingOverlay]: | ||
onboardingType === 'priority-places' && onboardingStep === 2, | ||
})} | ||
> | ||
<button | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know why this button is needed? The Analysis radio button was supposed to have always an option selected. Also, maybe if its closer to the options would be easier to the user to understand its functionality |
||
type="button" | ||
className={styles.clearFilters} | ||
onClick={clearFilters} | ||
> | ||
clear filters | ||
</button> | ||
<h2 className={styles.subtitle}> | ||
{t('Analyze pre-calculated areas or your own custom area.')} | ||
</h2> | ||
|
@@ -128,7 +139,7 @@ function AnalyzeAreasCardComponent({ | |
<RadioButton | ||
id={option.slug} | ||
option={{ ...option, name: option.label }} | ||
checked={selectedOption.slug === option.slug} | ||
checked={selectedOption?.slug === option.slug} | ||
onChange={() => handleOptionSelection(option)} | ||
theme={radioTheme} | ||
/> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,16 +212,28 @@ function AnalyzeAreasContainer(props) { | |
newSelectedOption === WDPA_OECM_FEATURE_LAYER; | ||
|
||
const getLayersToToggle = () => { | ||
const formerSelectedSlug = selectedOption.slug; | ||
const formerSelectedSlug = selectedOption?.slug; | ||
const newLayerCategory = | ||
newSelectedOption === HALF_EARTH_FUTURE_TILE_LAYER | ||
? LAYERS_CATEGORIES.PROTECTION | ||
: undefined; | ||
|
||
let layersToToggle = [ | ||
{ layerId: formerSelectedSlug }, | ||
{ layerId: newSelectedOption, category: newLayerCategory }, | ||
]; | ||
let layersToToggle = []; | ||
|
||
if (newSelectedOption !== 'clear' && formerSelectedSlug !== undefined) { | ||
layersToToggle.push({ layerId: formerSelectedSlug }); | ||
layersToToggle.push({ | ||
layerId: newSelectedOption, | ||
category: newLayerCategory, | ||
}); | ||
} else { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The clear and the selection is not working correctly here in relation to the layers. Two examples:
|
||
activeLayers.forEach((l) => { | ||
layersToToggle.push({ | ||
layerId: l.title, | ||
category: LAYERS_CATEGORIES.PROTECTION, | ||
}); | ||
}); | ||
} | ||
|
||
if (protectedAreasSelected) { | ||
const additionalProtectedAreasLayers = [ | ||
|
@@ -285,8 +297,8 @@ function AnalyzeAreasContainer(props) { | |
}; | ||
|
||
const handleOptionSelection = (option) => { | ||
handleLayerToggle(option.slug); | ||
changeUI({ selectedAnalysisLayer: option.slug }); | ||
handleLayerToggle(option?.slug); | ||
changeUI({ selectedAnalysisLayer: option?.slug }); | ||
setTooltipIsVisible(false); | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ | |
height: 100px; | ||
border: 1px dashed $white; | ||
border-radius: $border-radius-desktop; | ||
.uploadShapeButton{ | ||
.uploadShapeButton { | ||
margin-right: $paragraph-gutter; | ||
} | ||
.label { | ||
|
@@ -189,7 +189,7 @@ | |
} | ||
|
||
input:checked ~ .checkbox { | ||
background-color: #2196F3; | ||
background-color: #2196f3; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be also great to have this as a variable |
||
} | ||
|
||
.checkbox { | ||
|
@@ -203,7 +203,7 @@ | |
background-color: #eee; | ||
|
||
&:after { | ||
content: ""; | ||
content: ''; | ||
position: absolute; | ||
display: none; | ||
} | ||
|
@@ -219,4 +219,18 @@ | |
margin: 0; | ||
padding: 0 0 0 10px; | ||
} | ||
} | ||
} | ||
|
||
.clearFilters { | ||
@extend %title; | ||
background-color: $brand-color-main; | ||
width: 100%; | ||
height: 30px; | ||
padding: 0px 20px; | ||
border-radius: 2px; | ||
margin-top: 10px; | ||
|
||
&:hover { | ||
background-color: $white; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use a variable for this? It's true that we dont have any variable for font-size: 18px. But maybe create a new one on
src/styles/settings.scss