-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(quantic, searchbox): Issue with searchbox suggestions list flashi…
…ng after selecting recent query (#4401) [SFINT-5606](https://coveord.atlassian.net/browse/SFINT-5606) ### ISSUE: - After selecting a recent query, the suggestion list was "flashing". This was caused because the state of the suggestions is not cleared after selecting a recent query. So it would display first the "old" suggestions, then because we focused on the input it would THEN display the suggestions based on the input value. You can see the issue here: https://go.screenpal.com/watch/cZ1tYTV8YbT ### SOLUTION: - We are now loading the actions `loadQuerySuggestActions` in the `quanticSearchbox` in order to allow us to dispatch: `clearQuerySuggest ` after clicking on a recent query. For this we must pass the id of the suggestion as payload and therefore we needed to add `querySuggestionId ` in the state. - This allows us to clear the query suggestions state after clicking on a recent query and therefore prevent the flashing effect. Tested multiple cases where we select suggestions, recent queries, clear the recent queries, fast network, slow network, etc. Solution seems to work well without the "flashing" happening. ### DEMO: https://github.com/user-attachments/assets/c4f6a4ae-81c8-4677-af4f-b72fafded061 TESTS: <img width="431" alt="Screenshot 2024-09-16 at 2 42 28 PM" src="https://github.com/user-attachments/assets/f8a9c399-b705-42d5-80ae-53ccc0d27443"> [SFINT-5606]: https://coveord.atlassian.net/browse/SFINT-5606?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information
1 parent
037b2ca
commit 6f75ad6
Showing
11 changed files
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters