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

Use Mapbox Layer for Cases and User Markers in Microplanning Map #35535

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

zandre-eng
Copy link
Contributor

@zandre-eng zandre-eng commented Dec 18, 2024

Product Description

The markers themselves will now look slightly different as shown below:

Old:
Screenshot from 2024-12-18 12-16-08

New:
Screenshot from 2024-12-18 12-15-17

Technical Summary

Link to ticket here.
Related tech spec doc can be found here.

This PR introduces a core change to the Microplanning Map page in the form of completely changing how markers are loaded onto the map. Previously, the markers were created as separate HTML elements which were then added onto the map, however this caused performance issues if there were a lot of markers on the map (e.g. 1000) and ultimately limited the scalability of this feature.

The marker logic has been reworked to use a single Mapbox data source with two layers, one for users and one for cases. The markers themselves are shown on the map with a simple image which gets loaded in when initializing the map. Using a map layer instead of individual HTML elements for the markers allows the page to achieve greater performance which, in turn, will allow for displaying more markers on the map at any given time.

In addition to the above implementation, this PR also resolves the following two bugs on the Microplanning Map page:

  • Reviewing assignment results with polygon filtering applied resulted in a JS exception being thrown in the browser.
  • Running a new disbursement does not remove the previous disbursement results from the assignment popup.

Feature Flag

MICROPLANNING

Safety Assurance

Safety story

  • Local testing
  • QA to be done

End-to-end testing was done locally for both the Microplanning Map and Case Clustering Map pages to ensure that all functionality still works as expected. Additionally, QA will be doing end-to-end testing on these two pages as well to make sure all features still work.

Automated test coverage

N/A

QA Plan

QA to be completed. Ticket can be viewed here.

Rollback instructions

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@zandre-eng zandre-eng added awaiting QA QA in progress. Do not merge product/feature-flag Change will only affect users who have a specific feature flag enabled labels Dec 18, 2024
@zandre-eng
Copy link
Contributor Author

Keeping this PR in draft until the related Jira ticket to determine what size to increase the pagination to has been implemented in this PR as well. QA will also be held off until that has been completed.

@zandre-eng zandre-eng marked this pull request as ready for review December 20, 2024 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting QA QA in progress. Do not merge product/feature-flag Change will only affect users who have a specific feature flag enabled
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant