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

EREGCSC-2459 -- Annotate search results with keyword/subject #1151

Merged
merged 11 commits into from
Jan 30, 2024

Conversation

PhilR8
Copy link
Contributor

@PhilR8 PhilR8 commented Jan 26, 2024

Resolves EREGCSC-2459

Description

In the Policy Repository, adjust the heading of the results column depending on if the user is viewing keyword search results or if the user is viewing the items within a subject.

If the user is viewing only by document type (Public or Internal), the heading to the right side of the screen (the "Results Column") should only display the number of documents labeled as "documents."

If the user is viewing by subject, the Results Column should display a bolded header that contains the subject name (and abbreviation if it exists), and underneath it should display the number of documents labeled as "documents."

It the user is searching with a query string, the Results Column should display a bolded header that reads "Search Results". Underneath, it should display the subject (if one is selected), the search string in bold, and the number of documents labeled as "results."

This pull request changes:

  • Adds additional logic to determine how to construct Policy Repository results column header text

Steps to manually verify this change...

  1. Visit the Policy Repository on the experimental deployment. Select any category from the list.
  2. The Results Column should contain the name of the subject
    • Ex: "ABP | Alternative Benefit Plan"
  3. Below this heading, there should be a count that displays the number of results, and it should be labeled as "documents."
    • Ex: "0 documents."
  4. Type a string into the "Search for a document" input at the top of the left column and press Enter.
  5. The heading in the Results Column should now read "Search Results".
  6. The count that displays the number of results below "Search Results" should now include be labeled as "results" instead of "documents", it should contain the search string in bold, and it should contain the selected subject.
  7. Remove the subject by clicking on the X on the subject chip at the top of the left column. This will remove the subject but keep the search query.
  8. The heading in the Results Column should still read "Search Results".
  9. The count that displays the number of results below "Search Results" should still be labeled as "results" instead of "documents" and it should contain the search string in bold.

Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

@PhilR8 PhilR8 marked this pull request as ready for review January 29, 2024 14:08
@PhilR8 PhilR8 added the Needs Review This PR needs a code review label Jan 29, 2024
Copy link

✨ See the Django Site in action

Copy link

✨ See the Django Site in action

@PhilR8 PhilR8 added Approved and removed Needs Review This PR needs a code review labels Jan 30, 2024
@PhilR8 PhilR8 merged commit b9797c8 into main Jan 30, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants