-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add color in the per dashboard and per export #1361
base: develop
Are you sure you want to change the base?
Conversation
|
6bdcb45
to
c6a2d65
Compare
@@ -2,7 +2,7 @@ | |||
height: 20rem; | |||
|
|||
.path { | |||
stroke: var(--go-ui-color-primary-red); | |||
stroke: #236192; |
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.
@frozenhelium shouldn't we use a design token for this as well?
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.
Changed; it was missed.
</div> | ||
), | ||
(priorityComponent) => { | ||
const progressBarColor = priorityComponent.num !== undefined |
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.
Let's use isDefined function instead.
const area = assessmentStats?.topRatedComponents.find( | ||
(component) => component.area.area_num === Number(areaNum), | ||
); | ||
|
||
if (!area) { | ||
return null; | ||
} |
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.
Let's create a dictionary for top rated components instead of using find
inside a map
` | ||
${strings.areaLegend} | ||
${areaNum} | ||
${getFormattedComponentName(area.area)} | ||
` |
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.
Any reason to break these down to new lines?
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.
It exceeds more than 100 so. I will fix it.
app/src/views/PerExport/index.tsx
Outdated
const area = assessmentStats?.topRatedComponents.find( | ||
(component) => component.area.area_num === Number(areaNum), | ||
); | ||
|
||
if (!area) { | ||
return null; | ||
} |
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.
Let's not use find
inside map
app/src/views/PerExport/index.tsx
Outdated
` | ||
${strings.areaLegend} | ||
${areaNum} | ||
${getFormattedComponentName(area.area)} |
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.
Any reason to break into multiple lines?
ae2fb33
to
886317c
Compare
4ea9294
to
bb55bed
Compare
bb55bed
to
a34a362
Compare
a34a362
to
712f3ff
Compare
Addresses:
https://github.com/orgs/IFRCGo/projects/11/views/1filterQuery=is%3Aopen++assignee%3A%40me&pane=issue&itemId=62290081
This PR doesn't introduce:
console.log
meant for debugging