Skip to content
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

feat: add switching logic when map type get changed #127

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

ArmanpreetGhotra
Copy link
Collaborator

@ArmanpreetGhotra ArmanpreetGhotra commented Dec 11, 2024

if the country data is available, the map would stay in the same position, if not then it will back in global view. I'm checking in the mapOperations.tsx, if the data of the country for specific type of map is available or not. All the 3 maps has slightly different approach to check data.

Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for wfp-hungermap ready!

Name Link
🔨 Latest commit b4a7b5a
🔍 Latest deploy log https://app.netlify.com/sites/wfp-hungermap/deploys/675ffbf4dc482c0008d601f3
😎 Deploy Preview https://deploy-preview-127--wfp-hungermap.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@Tschonti Tschonti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally good direction for sure. The switch seems kinda slow, but I don't see any unnecessary network calls or anything, so I guess we can't do anything about it.

I found one major bug tho: If you click on a country that doesn't have ipc data, then switch to ipc you get put on the global map. If you now click on a country, the regions get loaded but you're not zoomed to the country. And this happens with the other maps too.

src/components/Map/Map.tsx Outdated Show resolved Hide resolved
src/components/Map/Map.tsx Outdated Show resolved Hide resolved
@ArmanpreetGhotra
Copy link
Collaborator Author

ArmanpreetGhotra commented Dec 14, 2024

it's fixed now, the pr was in draft/progress, because i was having issue with double click and bohdan said like i can draft pr so that he can have look on that. But now all issues are fixed @Tschonti

@ArmanpreetGhotra ArmanpreetGhotra marked this pull request as ready for review December 14, 2024 18:05
Copy link
Collaborator

@Tschonti Tschonti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

maybe we could also zoom out on the vegetation and rainfall map, not sure

@ArmanpreetGhotra
Copy link
Collaborator Author

@Tschonti maybe we could add "Global View" button when the map type is vegetation or rainfall ?

Copy link
Collaborator

@bohdangarchu bohdangarchu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@bohdangarchu
Copy link
Collaborator

@Tschonti maybe we could add "Global View" button when the map type is vegetation or rainfall ?

its already there afaik

Copy link
Collaborator

@marinovl7 marinovl7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall good job! However some things are wrong and need to be redone. The adm1data request sending is super important to be the first one, as this slows the performance if it's not the first one

src/components/Map/Map.tsx Outdated Show resolved Hide resolved
src/operations/map/MapOperations.tsx Outdated Show resolved Hide resolved
src/operations/map/MapOperations.tsx Outdated Show resolved Hide resolved
@ArmanpreetGhotra
Copy link
Collaborator Author

@Tschonti maybe we could add "Global View" button when the map type is vegetation or rainfall ?

its already there afaik

@bohdangarchu it's not in vegetation and in rainfall

@bohdangarchu
Copy link
Collaborator

@Tschonti maybe we could add "Global View" button when the map type is vegetation or rainfall ?

its already there afaik

@bohdangarchu it's not in vegetation and in rainfall

image

@ArmanpreetGhotra
Copy link
Collaborator Author

ArmanpreetGhotra commented Dec 16, 2024

@Tschonti maybe we could add "Global View" button when the map type is vegetation or rainfall ?

its already there afaik

@bohdangarchu it's not in vegetation and in rainfall

image

it's the current version

Screenshot 2024-12-16 at 09 05 17

@bohdangarchu
Copy link
Collaborator

@Tschonti maybe we could add "Global View" button when the map type is vegetation or rainfall ?

its already there afaik

@bohdangarchu it's not in vegetation and in rainfall

image

it's the current version Screenshot 2024-12-16 at 09 05 17

yes bc you are in global view. but when you switch to veg or rainfall in country view then the button is there

@marinovl7 marinovl7 merged commit b62899b into main Dec 16, 2024
5 checks passed
@marinovl7 marinovl7 deleted the feature/f-171-switch-country-view branch December 16, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants