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] ensure any existing layers get cleared when previewing a new one #31973

Merged
merged 1 commit into from
Feb 26, 2019

Conversation

thomasneirynck
Copy link
Contributor

Closes #31962

@thomasneirynck thomasneirynck added [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v6.7.0 v7.2.0 v6.7.1 labels Feb 25, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis

//many source editors allow users to modify the settings in the add-source wizard
//this triggers a new request for preview. Any existing transient layers need to be cleared before the new one can be added.
await dispatch(setSelectedLayer(null));
await dispatch(removeTransientLayer());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@kindsun
Copy link
Contributor

kindsun commented Feb 25, 2019

"many source editors allow users to modify the settings in the add-source wizard", that is very true. Nice catch @nickpeihl @thomasneirynck !

lgtm!
code review

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
code review, tested in chrome

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, Lets move these to

setTransientLayer since they are really part of that action creator

@nickpeihl
Copy link
Member

lgtm! thanks!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@thomasneirynck
Copy link
Contributor Author

thomasneirynck commented Feb 26, 2019

@nreese

setTransientLayer since they are really part of that action creator

Agreed, but let's do this in separate PR imho. when moving to setTransientLayer, we need to make sure we disentangle these from setSelectedLayer (transient-layers and selected-layers are managed separately). I think we need to be careful then that we correctly order the calls, and await where appropriate, something the code right now glosses over easily. That improvement would also tie in with #31532

@thomasneirynck thomasneirynck merged commit 79a26ae into elastic:master Feb 26, 2019
thomasneirynck added a commit to thomasneirynck/kibana that referenced this pull request Feb 26, 2019
thomasneirynck added a commit to thomasneirynck/kibana that referenced this pull request Feb 26, 2019
thomasneirynck added a commit to thomasneirynck/kibana that referenced this pull request Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v6.7.0 v6.7.1 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants