-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[maps] clean up maps app state #73337
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
_getAppStateFilters = () => { | ||
return this._appStateManager.getFilters() || []; | ||
}; | ||
|
||
_syncAppAndGlobalState = () => { |
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.
Removed _syncAppAndGlobalState
and just inlined into _onQueryChange
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
x-pack/plugins/maps/public/routing/routes/maps_app/maps_app_view.js
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/routing/routes/maps_app/maps_app_view.js
Outdated
Show resolved
Hide resolved
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.
lgtm! Thanks for a much-needed second pass on this 🙏
- code review
- tested locally in chrome
@elasticmachine merge upstream |
💚 Build SucceededBuild metricsasync chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
* [maps] clean up maps app state * remove time, query and refreshConfig from react state * clean up * move getInitialLayersFromUrlParam out of MapsAppView * clean up _updateFromGlobalState to just call _onQueryChange * inline _getAppStateFilters * tslint cleanup and fix refresh config * fix functional test * fix functional tests take 2 * review feedback * fix timing issue by not providing default query context value from props * minor cleanup Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [maps] clean up maps app state * remove time, query and refreshConfig from react state * clean up * move getInitialLayersFromUrlParam out of MapsAppView * clean up _updateFromGlobalState to just call _onQueryChange * inline _getAppStateFilters * tslint cleanup and fix refresh config * fix functional test * fix functional tests take 2 * review feedback * fix timing issue by not providing default query context value from props * minor cleanup Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This PR cleans up
MapsAppView
state by removingtime
,query
,refreshConfig
, andprevIndexPatternIds
.time
,query
, andrefreshConfig
is not needed in state since its stored in redux.prevIndexPatternIds
is moved to an instance member since its used to track changes and does not effect rendering.