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

1871 search activity page #1893

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

jonathanbobel
Copy link
Contributor

@jonathanbobel jonathanbobel commented Aug 21, 2024

A note to PR reviewers: it may be helpful to review our code review documentation to know what to keep in mind while reviewing pull requests.

Description

Adding type-ahead search functionality to the Activity landing page in the Dashboard area

TODO

  • Add search input to Activity page
  • Create javascript to filter results
  • Keyboard and AT test search functionality
  • Write js tests

@jonathanbobel jonathanbobel self-assigned this Aug 21, 2024
@jonathanbobel jonathanbobel marked this pull request as ready for review August 21, 2024 16:06
@jonathanbobel
Copy link
Contributor Author

Pausing on this as it doesn't search the entire dataset, and it should

liveRegion.textContent = `${visibleRowCount} result${visibleRowCount !== 1 ? 's' : ''} found`;

// Check if there are no visible rows
if (visibleRowCount === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is the same code that is in searchActivity regarding business logic, it might make sense to extract this logic to a generic helper file so that we can reuse that same logic in the javascript tests. This way if future updates are needed, it only needs to be done in one place instead of multiple.

I am still learning context and might be missing something here, so ill go ahead and approve, but if you think its a good idea as well then you can make that change!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexjanousekGSA - we're actually waiting on some back end work to provide an endpoint to search against, so this might change. When that happens I'll reach back out to see if it's worth editing for testing-sake.

@heyitsmebev heyitsmebev removed their request for review December 4, 2024 22:35
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