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

[DT-900] Get search working again #2703

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

fboulnois
Copy link
Contributor

@fboulnois fboulnois commented Oct 30, 2024

Addresses

https://broadworkbench.atlassian.net/browse/DT-900

Summary

Fixes the search bar, and ensure that it works properly with any combination of filters and when clearing the search.

To do this the searchRef was removed and the search input is treated as if it was any other filter. The only difference is that the input changes must also be reflected to the user, so we need to set the state when the user types or clears the filters.


Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@fboulnois fboulnois force-pushed the fb-dt-900-fix-data-library-search branch from d394bdd to c790330 Compare October 30, 2024 19:44
const searchModifier = [
{
'multi_match': {
'query': searchTerm,
'query': filters.search[filters.search.length - 1],
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this change if searchTerm is being set in filterHandler?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For reasons I don't completely understand searchTerm at this line reflects the previous searchTerm state (for example if your current input was hello, searchTerm would be hell)

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if something similar could be done everywhere searchTerm is used to eliminate the need for that variable at all - not sure if that would work right though

@fboulnois fboulnois force-pushed the fb-dt-900-fix-data-library-search branch from c790330 to 3a21303 Compare October 30, 2024 20:03
@fboulnois fboulnois force-pushed the fb-dt-900-fix-data-library-search branch from 3a21303 to 58a5d3f Compare October 30, 2024 20:03
@fboulnois fboulnois marked this pull request as ready for review October 31, 2024 14:13
@fboulnois fboulnois requested a review from a team as a code owner October 31, 2024 14:13
@fboulnois fboulnois requested review from rushtong and snf2ye and removed request for a team October 31, 2024 14:13
Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

👍🏽

@fboulnois fboulnois merged commit 455cfe9 into develop Nov 1, 2024
9 checks passed
@fboulnois fboulnois deleted the fb-dt-900-fix-data-library-search branch November 1, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants