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

IA-3026: In the org unit search, the loading of the map tab should only start when we switch to the map tab #1832

Merged
merged 6 commits into from
Dec 3, 2024

Conversation

beygorghor
Copy link
Collaborator

@beygorghor beygorghor commented Nov 27, 2024

Currently, if you go to the org unit list, and click search, you’ll see in the requests that it loads tiles and up to 3000 org units to display on the map, while it should only load the org units needed for the list.

These requests should only start when the map is visible on screen.

Related JIRA tickets : IA-3026

Self proofreading checklist

  • Did I use eslint and black formatters
  • Is my code clear enough and well documented
  • Are my typescript files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Changes

  • refactor the use of react query
  • only fetch map data if on map tab
  • fix a bug while deleting a tab (deleting a non selected tab is leading to an inconsistent behaviour)
  • fix fit to bound while changing results

How to test

Play with the org units search and multi tab.
Make sure it makes only call for the map while on the map.
Order, pagination, filters, try to break it please

Print screen / video

Nothing to show here as everything should be the same but better

Notes

⚠️ There is a blsq-component PR here to use with it

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

@beygorghor beygorghor added the release Should be released in production at next deploy label Nov 28, 2024
Copy link
Member

@quang-le quang-le left a comment

Choose a reason for hiding this comment

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

When switching datasources and zooming in on the map, the map crashes

Screen.Recording.2024-11-28.at.17.06.37.mov

Switching back to list tab will refetch groups and validation status dropdowns. Same on staging, so not blocking. But strange: only these 2 are refetched. The query keys look ok, and playing with staleTime and cacheTime won't fix it.

Screen.Recording.2024-11-28.at.17.42.30.mov

Only the map crash is blocking

@beygorghor beygorghor requested a review from quang-le December 2, 2024 12:51
@beygorghor
Copy link
Collaborator Author

beygorghor commented Dec 2, 2024

@quang-le
i have fixed the zoom issue, for the double call this is a bit weird... maybe should be part of another PR

@beygorghor beygorghor merged commit 4257006 into main Dec 3, 2024
3 checks passed
@beygorghor beygorghor deleted the IA-3026-OU-search-v3 branch December 3, 2024 09:16
@butofleury butofleury added the user tested Has already been tested on staging label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Should be released in production at next deploy Released user tested Has already been tested on staging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants