Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Adjusted source of QueryStringManager functions for flyout. #8864
base: main
Are you sure you want to change the base?
Adjusted source of QueryStringManager functions for flyout. #8864
Changes from 2 commits
da36888
9867fe8
b0a31bc
654fa32
7864ebd
b4e32f7
3013ed8
c6e6441
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should refactor this component. we shouldn't need to fire a request to get all saved queries if the user opened saved queries and then switched to template queries and then switch back to saved queries and fire a request. we already have their saved queries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes i think we already noticed the queries taking way longer to show up than they should
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required? line 89 should be covering it right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jowg-amazon could you clarify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were noticing that the getAllSavedQueries call can take a little while to return. If a user switches tabs before this call is finished, we were seeing that
setSavedQueries(mutableSavedQueries)
was overwriting the saved queries incorrectly. This check makes sure that we're still on the mutable saved queries tab.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of just have a state variable that sets a boolean if it
hasTemplateQueries
, why don't we just have a state variable for templateQueries and a state variable mutableSavedQueries.Or even more so just set saved queries to all queries and then in the component if the selected tab is template-saved-queries you filter out all the saved queries not matching template-saved-queries etc.
Check failure on line 99 in src/plugins/data/public/ui/saved_query_flyouts/open_saved_query_flyout.tsx
GitHub Actions / Lint and validate
Check failure on line 99 in src/plugins/data/public/ui/saved_query_flyouts/open_saved_query_flyout.tsx
GitHub Actions / Lint and validate
Check failure on line 41 in src/plugins/data/public/ui/search_bar/search_bar.tsx
GitHub Actions / Lint and validate