-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/f 52 current food consumption country view #48
Feature/f 52 current food consumption country view #48
Conversation
✅ Deploy Preview for wfp-hungermap ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
LGTM! Some functionality feedback still to come + some code style issues, but just a few. Generally I noticed a bug where if I click on egypt then Lybia then Egypt again there are no tooltips shown instead when I click on a region the loading animation is shown in the accordion. Also if we have alerts activated we should deactivate them, so not only the active map layer, but also the alerts.
Small note, selectCountryId could be reworked in the future.
src/components/Map/FcsAccordion.tsx
Outdated
const deltaOneMonth = countryData?.fcsMinus1 ? countryData.fcs - countryData.fcsMinus1 : undefined; | ||
const deltaThreeMonth = countryData?.fcsMinus3 ? countryData.fcs - countryData.fcsMinus3 : 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.
useMemo here
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.
can we avoid using useMemo for simple number subtraction?
New changes:
|
hmm I still see the bug with going back from country to country in the preview, although locally everything works... not sure why this can happen but I'll look into it |
the context looks good to me, a few questions/findings:
|
should be fixed now |
should be fixed now
should be also fixed now, I filter out countries without fcs data |
countries.features | ||
.filter((countryData) => countryData.properties.interactive) | ||
.filter((countryData) => countryData.properties.fcs !== null) | ||
.map((countryData) => ( |
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.
maybe not the scope of this task, but we should use this condition on the global map to display countries as interactive or disabled. Maybe we could look into whether we can change which countries are clickable on each map, because I assume it will be different on the IPC map for example
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.
yeah, we could do this as a separate task, once for all map types. Here is the link
oh and please merge main again to resolve the conflicts |
Some examples: