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

Fix Roles in Browse Testimony Search #1667

Open
Mephistic opened this issue Jan 8, 2025 · 1 comment · May be fixed by #1673
Open

Fix Roles in Browse Testimony Search #1667

Mephistic opened this issue Jan 8, 2025 · 1 comment · May be fixed by #1673
Assignees
Labels
bug Something isn't working frontend Frontend development good first issue Good for newcomers

Comments

@Mephistic
Copy link
Collaborator

Describe the bug
On the Browse Testimony page, if you flip between the "All", "Individual", and "Org" tabs - you will see a different testimony counts between when the page is first loaded and after navigating away from and back to the same tab.

This is because of the way we handle the tab filtering - the role check we use only accounts for "user" and "org" roles - not other roles like "admin". We should update the role filter in https://github.com/codeforboston/maple/blob/main/components/search/testimony/TestimonySearch.tsx#L106 so that we don't erroneously filter out testimony from non-"user"/"org" users on subsequent tab loads.

For more info, see the investigation result ticket: #1613 (comment)

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Browse Testimony'
  2. Note the initial result count
  3. Click on 'Individuals' tab
  4. Click on 'All' tab
  5. See that the new result count (For the same tab as when the page first loaded) is now different

Expected behavior
Navigating back and forth between tabs should not change the result count within the same tab.

Actual Results + Screenshots
First page load:
Screenshot 2025-01-08 at 7 58 18 AM

After navigating away from and back to tab:
Screenshot 2025-01-08 at 7 58 25 AM

@Mephistic Mephistic added bug Something isn't working good first issue Good for newcomers frontend Frontend development labels Jan 8, 2025
@ananyasinghz
Copy link

hello, I would like to work on this issue.

@ananyasinghz ananyasinghz linked a pull request Jan 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Frontend development good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants