-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
base: master
Are you sure you want to change the base?
Conversation
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. |
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.
Overall looks good to me. Nice refactors along the way. Left a couple of minor comments.
Just wanted to confirm that as we removed the old markers logic in this PR, does the Case Clustering map works correctly (specifically the Lock Case Grouping functionality) ?
That map also uses the html markers currently and will eventually be replaced to layers as well as part of its own upcoming scaling effort.
@ajeety4 I have done local testing on this page to ensure all functionality still works as expected. Additionally, QA is also taking a pass at this page to do end-to-end testing of all the features on this page. It should be noted that the Case Clustering page has its own models for the markers and such, and so is not affected by the removal of the ones from |
Got it. Thanks for confirming on this. |
@zandre-eng When merging master, I got a lint failure email and realized that the linter can't parse |
@orangejenny It seems the big culprit here is the eslint ecmaVersion we are currently using (v6), as this version doesn't support declaring async functions. Since we only declare a JS async function in this one place in the codebase, I've created a separate PR here which refactors the problem function to use promise chaining instead. This effectively resolves the linting issue. |
@zandre-eng Thank you! |
Product Description
The markers themselves will now look slightly different as shown below:
Old:
New:
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:
Feature Flag
MICROPLANNING
Safety Assurance
Safety story
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
Labels & Review