earthdata-search icon indicating copy to clipboard operation
earthdata-search copied to clipboard

EDSC-2673: Lazy load Leaflet

Open mreese84 opened this issue 4 years ago • 5 comments

Description

In an effort to improve initial load times, we should lazy load Leaflet js. We want to be sure to do this in a way that does not degrade the UX of the initial application load.

Acceptance Criteria

  • Leaflet/map javascript is only loaded in pages that render the map (/search/*, /project)
  • Once the map component is mounted/rendered, it should not be remounted

mreese84 avatar Oct 01 '20 16:10 mreese84

Hi, I would like to work on this issue, could you assign me it?

mmayadag avatar Oct 04 '20 23:10 mmayadag

Go for it!

mreese84 avatar Oct 04 '20 23:10 mreese84

Hi @mreese84 , I used lazy react component with "Suspense" for "EdscMapContainer".( search page in static/src/js/App.js & static/src/js/routes/Project/Project.js )

Its improves initial app load times.

  • Nothing changed for map component still has same behaviour.
  • its renders once mounted

Could you give me feedback for it? Do you want me to make another development? Before i create tests, can we setup small 5mins talk for it ? Thanks

mmayadag avatar Oct 12 '20 12:10 mmayadag

If you'd like feedback, please open a Pull Request with your changes. We're not able to chat but we can provide any necessary feedback via the PR.

abbottry avatar Oct 13 '20 14:10 abbottry

If you folks are still interested in getting it resolved I'd like to work on it @abbottry @mreese84

jalajcodes avatar Jan 30 '21 11:01 jalajcodes