-
Notifications
You must be signed in to change notification settings - Fork 214
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
EDSC-2673: Lazy load Leaflet #1746
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1746 +/- ##
==========================================
- Coverage 92.01% 92.00% -0.01%
==========================================
Files 744 744
Lines 19769 19760 -9
Branches 4698 4698
==========================================
- Hits 18190 18180 -10
- Misses 1441 1442 +1
Partials 138 138 ☔ View full report in Codecov by Sentry. |
…r it like the other routes
8b7d8db
to
084c8f8
Compare
@@ -1,4 +1,8 @@ | |||
import React, { Component } from 'react' | |||
import React, { |
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.
Taking a look at this bundle coverage while running the production build
@@ -51,6 +52,11 @@ | |||
.route-wrapper--content-page-centered & { | |||
justify-content: center; | |||
} | |||
|
|||
&--dark { |
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.
There were references to this classname before my change i.e. before they existed in some routes I don't think that they were doing anything but, now they do have to be changed correctly
static/src/js/__tests__/App.test.js
Outdated
const { enzymeWrapper } = setup() | ||
const helmet = enzymeWrapper.find(Helmet) | ||
expect(helmet.props().titleTemplate).toEqual('[DEV] %s | Earthdata Search') | ||
// TODO this is just a prop being passed in Helmet its not rendered on DOM so I think that we should remove it for RTL test |
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.
Remove or resolve TODO
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.
Ah thats right. I added this since I wasn't able to migrate this test. Since our overall test coverage on this file has increased and the meta element value is being checked in a different test I am suggesting to delete it
Overview
What is the feature?
Lazy load the
MapContainer.js
componentWhat is the Solution?
Update the imports for
MapContainer.js
so that it is bundled separately, have the error-boundry use theSpinner
with a new class for when the Map is loading. Updated Project component to be a functional component and rendering it the same way as the other routes are. Updated App.test.js for technical debt and to test that the Map is being loaded after being awaited. Updated the project.test.js route tests to RTL for tech debt. Updates class names which were not being used before to the correct ones, add a newscss
modifier for the loading stateWhat areas of the application does this impact?
Search page, Projects page routes. Background color and scss for the other routes
Testing
Ensure that the project page continues to work as expected: create new projects, go to the saved projects page, go to a project from that page, hit the download button from the project page, ensure the form submission works as expected
Attachments
Loading state for /project (throttling connection)
Loading state for /search (throttling connection)
Loaded state for the project page
Loaded state for the /search page
Checklist