Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

[BUG] Search on User Rankings page not working #114

Open
1 task done
vneogi199 opened this issue Jan 9, 2024 · 4 comments · Fixed by #129
Open
1 task done

[BUG] Search on User Rankings page not working #114

vneogi199 opened this issue Jan 9, 2024 · 4 comments · Fixed by #129
Assignees
Labels
🛠 goal: fix 🏁 status: ready for dev You can asked for this issue to be assigned (if not already assigned)

Comments

@vneogi199
Copy link
Contributor

Has this bug been raised before?

  • I have checked "open" AND "closed" issues and this is not a duplicate

Where did you find this bug?

production

Description

On the user ratings page, the search does not work.
In the browser console you can see an error:
Uncaught TypeError: t is not a function

Steps to Reproduce

  1. Go to user rankings page.
  2. Search anything in the search bar on the top.
  3. Users are not filtered.
  4. Browser console has an error: Uncaught TypeError: t is not a function

Screenshots

No response

Do you want to work on this issue?

Yes

If "yes" to above, please explain how you would technically implement this

In app/rankings/page.js, we aren't passing setKeyword callback to like we do in app/page.js. Need to pass this callback and filter the Users component with keyword by searching on name of the users

@vneogi199 vneogi199 added 🚦 status: awaiting triage Waiting for maintainers to verify (please do not start work on this yet) 🛠 goal: fix labels Jan 9, 2024
@vneogi199
Copy link
Contributor Author

We have the same issue on Add Ratings page. I think we should hide the search box here as there is nothing to search on this page.

@eddiejaoude eddiejaoude added 🏁 status: ready for dev You can asked for this issue to be assigned (if not already assigned) and removed 🚦 status: awaiting triage Waiting for maintainers to verify (please do not start work on this yet) labels Jan 12, 2024
@eddiejaoude
Copy link
Member

eddiejaoude commented Jan 12, 2024

Thank you for raising the bug.

  • I think on the rankings page we can search the users
  • on the add ratings page, yes I think it would be good to hide the search or disable if easier (we can make further improvements later)

I have assigned it to you

@vneogi199
Copy link
Contributor Author

I have disabled the search on the add ratings page.

But on the rankings page, my approach of searching users by passing setKeyword to SideNav won't work as Rankings page is a server component. Only solution I could find is to set the search keyword in the search params and extract it from there. Based on this I can filter the users. Is that a good solution?

@adityaraute
Copy link
Member

Perhaps on the add ratings page, we could have a Global repo search, such that once a searched repo is selected, the URL can be auto-populated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🛠 goal: fix 🏁 status: ready for dev You can asked for this issue to be assigned (if not already assigned)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants