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

Fixes issue where query bar reverts changes on save if it hasn't been submitted #47908

Merged
merged 1 commit into from Oct 11, 2019

Conversation

Bargs
Copy link
Contributor

@Bargs Bargs commented Oct 10, 2019

Summary

Fixes #46963
Fixes #47407

I believe the cause of this issue is that we weren't saving the app state after updating it from the saved query. So the new query would be in memory but not in the URL. Something would cause the old app state to get read from the URL and override the changes. Simply adding a call to state.save after changing the query in app state seems to have solved it.

Visualize didn't have this issue, but I'm guessing there was nothing causing the old state to be read from the URL. So I applied this fix to Visualize as well to avoid any issues in the future.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

- [ ] This was checked for cross-browser compatibility, including a check against IE11
- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
- [ ] Documentation was added for features that require explanation or tutorials

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately

string would get reverted in the UI when the query was saved. Instead
saving the query should persist what the user currently sees and submit
the query to get fresh data in case there are any dirty changes.
@Bargs Bargs added release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 v7.5.0 labels Oct 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

I tested the fix in Chrome and it works as expected.
Such a small change makes a huge difference.
LGTM!

@Bargs Bargs merged commit 22e6d3d into elastic:master Oct 11, 2019
Bargs added a commit to Bargs/kibana that referenced this pull request Oct 11, 2019
…lastic#47908)

I believe the cause of this issue is that we weren't saving the app state after updating it from the saved query. So the new query would be in memory but not in the URL. Something would cause the old app state to get read from the URL and override the changes. Simply adding a call to state.save after changing the query in app state seems to have solved it.

Visualize didn't have this issue, but I'm guessing there was nothing causing the old state to be read from the URL. So I applied this fix to Visualize as well to avoid any issues in the future.
Bargs added a commit that referenced this pull request Oct 15, 2019
…47908) (#48034)

I believe the cause of this issue is that we weren't saving the app state after updating it from the saved query. So the new query would be in memory but not in the URL. Something would cause the old app state to get read from the URL and override the changes. Simply adding a call to state.save after changing the query in app state seems to have solved it.

Visualize didn't have this issue, but I'm guessing there was nothing causing the old state to be read from the URL. So I applied this fix to Visualize as well to avoid any issues in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.5.0 v8.0.0
Projects
None yet
3 participants