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

Fixed search issue - always return all records #321

Merged
merged 1 commit into from
May 20, 2024

Conversation

chuanlin2018
Copy link
Collaborator

Original ticket: https://sgitlab.nist.gov/oar-odd/science-data-portal/-/issues/13

Fixes:

  1. When the search box on focus, select all. This will avoid the leading space.
  2. Disabled one search function in field watch function in filters component which is not necessary.
  3. Moved one search function from field watch function to ngOnInit in results component.
  4. Moved toFieldItems() function from searchfields-list service to advanced search component. This fixed a new problem I discovered: Customize View dropdown missing fields.
  5. Fixed unit test.

Should only see three queries when user do a search: one for field list, one for filters and one for result page.

To test it locally, run npm start.

@chuanlin2018 chuanlin2018 requested review from RayPlante and deoyani May 17, 2024 14:24
Copy link
Collaborator

@RayPlante RayPlante left a comment

Choose a reason for hiding this comment

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

Tested this under oar-docker locally. Confirmed that we have eliminated unnecessary queries to the RMM, and searches from various origins result in appropriate matches, including from:

  • search box on home page
  • search box on results page
  • advanced search
  • clicking on topic area box on home page

@RayPlante RayPlante merged commit b1f8cdb into integration May 20, 2024
1 check passed
@RayPlante RayPlante deleted the fix/ODD13-search branch May 20, 2024 14:54
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.

2 participants