Skip to content

[7.x] Retain pinned filters when loading and clearing saved queries (#54307)#55473

Merged
Bargs merged 1 commit intoelastic:7.xfrom
Bargs:backport/7.x/pr-54307
Jan 22, 2020
Merged

[7.x] Retain pinned filters when loading and clearing saved queries (#54307)#55473
Bargs merged 1 commit intoelastic:7.xfrom
Bargs:backport/7.x/pr-54307

Conversation

@Bargs
Copy link
Copy Markdown
Contributor

@Bargs Bargs commented Jan 21, 2020

Backports the following commits to 7.x:

…c#54307)

When we originally implemented Saved Queries we had them overwrite pinned filters on load and on clear. This caused the issue in elastic#53258. If you have a saved query loaded in Discover for example and you navigate to a different app and then back to Discover, that saved query will get get reloaded since app state is retained when navigating back and forth between apps. If you created a pinned filter in between visits to Discover, it will get removed when the saved query is reloaded.

This issue made me reconsider our previous decision. I think pinned filters should not be affected by loading or clearing a saved query, since they are pinned they should only be removed if the user explicitly asks for it. This solves the reported issue and I also think it makes the UI more intuitive.
@Bargs Bargs added the backport This PR is a backport of another PR label Jan 21, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

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

@Bargs Bargs merged commit baf0cae into elastic:7.x Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants