-
Notifications
You must be signed in to change notification settings - Fork 917
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
[Discover] Dataset search on page load issues #8871
[Discover] Dataset search on page load issues #8871
Conversation
❌ Empty Changelog SectionThe Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section. |
Required a double click on search and then also potentially loading issue. Issue n/a Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
5cb3eb1
to
87f7cc7
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8871 +/- ##
=======================================
Coverage 60.93% 60.94%
=======================================
Files 3800 3800
Lines 90880 90878 -2
Branches 14324 14324
=======================================
Hits 55382 55382
+ Misses 31969 31968 -1
+ Partials 3529 3528 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kawika Avilla <[email protected]>
// A saved search is created on every page load, so we check the ID to see if we're loading a | ||
// previously saved search or if it is just transient | ||
return ( | ||
services.uiSettings.get(SEARCH_ON_PAGE_LOAD_SETTING) || | ||
datasetPreference || | ||
uiSettings.get(SEARCH_ON_PAGE_LOAD_SETTING) || |
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.
why repeat this when part of datasetPreference assignment above?
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.
+1
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.
i believe i was just over thinking. in terms of code it is redundant but i was little bit worried that return true if undefined isn't the most accurate depiction of what should happen.
but with fresh eyes that doesn't really make sense. in terms of the ci taking an hour, could this be a fast follow?
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.
sure, approving
// A saved search is created on every page load, so we check the ID to see if we're loading a | ||
// previously saved search or if it is just transient | ||
return ( | ||
services.uiSettings.get(SEARCH_ON_PAGE_LOAD_SETTING) || | ||
datasetPreference || | ||
uiSettings.get(SEARCH_ON_PAGE_LOAD_SETTING) || |
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.
sure, approving
* Dataset search on page load issues Required a double click on search and then also potentially loading issue. Issue n/a Signed-off-by: Kawika Avilla <[email protected]> * Clean up dependencies Signed-off-by: Kawika Avilla <[email protected]> * Addresses issue Signed-off-by: Kawika Avilla <[email protected]> * add some tests Signed-off-by: Kawika Avilla <[email protected]> * Changeset file for PR #8871 created/updated --------- Signed-off-by: Kawika Avilla <[email protected]> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 42df421) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Dataset search on page load issues Required a double click on search and then also potentially loading issue. Issue n/a * Clean up dependencies * Addresses issue * add some tests * Changeset file for PR #8871 created/updated --------- (cherry picked from commit 42df421) Signed-off-by: Kawika Avilla <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
Required a double click on search and then also potentially loading issue.
Issues Resolved
n/a
Screenshot
Testing the changes
Unit tests. Also was able to recreate the bug. Switch the index pattern type config to not search on page load then switch off settings. I was able to run into the bug that required me to click twice to actually get results
Changelog
Check List
yarn test:jest
yarn test:jest_integration