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

[maps] clean up maps app state #73337

Merged
merged 19 commits into from
Jul 30, 2020
Merged

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jul 27, 2020

This PR cleans up MapsAppView state by removing time, query, refreshConfig, and prevIndexPatternIds. time, query, and refreshConfig 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.

@nreese nreese added chore [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Jul 27, 2020
@nreese nreese requested a review from kindsun July 27, 2020 18:58
@nreese nreese requested a review from a team as a code owner July 27, 2020 18:58
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

_getAppStateFilters = () => {
return this._appStateManager.getFilters() || [];
};

_syncAppAndGlobalState = () => {
Copy link
Contributor Author

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

@nreese
Copy link
Contributor Author

nreese commented Jul 27, 2020

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented Jul 28, 2020

@elasticmachine merge upstream

@nreese
Copy link
Contributor Author

nreese commented Jul 28, 2020

@elasticmachine merge upstream

@nreese nreese requested a review from kindsun July 29, 2020 17:49
Copy link
Contributor

@kindsun kindsun left a 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

@nreese
Copy link
Contributor Author

nreese commented Jul 30, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
maps 3.8MB -3.4KB 3.8MB

page load bundle size

id value diff baseline
maps 284.0KB -491.0B 284.5KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@nreese nreese merged commit d8d8306 into elastic:master Jul 30, 2020
nreese added a commit to nreese/kibana that referenced this pull request Jul 30, 2020
* [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>
nreese added a commit that referenced this pull request Jul 30, 2020
* [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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants