Skip to content

[maps] clean up maps app state#73337

Merged
nreese merged 19 commits intoelastic:masterfrom
nreese:clean_up_maps_app_state
Jul 30, 2020
Merged

[maps] clean up maps app state#73337
nreese merged 19 commits intoelastic:masterfrom
nreese:clean_up_maps_app_state

Conversation

@nreese
Copy link
Copy Markdown
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 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
Copy Markdown
Contributor

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

return this._appStateManager.getFilters() || [];
};

_syncAppAndGlobalState = () => {
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

nreese commented Jul 27, 2020

@elasticmachine merge upstream

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Jul 28, 2020

@elasticmachine merge upstream

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Jul 28, 2020

@elasticmachine merge upstream

@nreese nreese requested a review from kindsun July 29, 2020 17:49
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

nreese commented Jul 30, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
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 release_note:skip Skip the PR/issue when compiling release notes Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants