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

Searching while on a later page incorrectly shows that there are no results. #3176

Closed
2 tasks done
GroxicTinch opened this issue Jan 21, 2025 · 0 comments · Fixed by #3192
Closed
2 tasks done

Searching while on a later page incorrectly shows that there are no results. #3176

GroxicTinch opened this issue Jan 21, 2025 · 0 comments · Fixed by #3192
Labels
bug Something isn't working web Relates to Modrinth.com web frontend

Comments

@GroxicTinch
Copy link

Please confirm the following.

What browsers are you seeing the problem on?

Firefox

Describe the bug

Example: Going to page 8 of shaders and then searching for "Insanity" shows no shaders exist, but going to page one and searching the same thing correctly shows the two shaders in the list that contain the phrase "Insanity"

This happens because q=Insanity is appended to the parameter page=8 when a search text is entered.

Steps to reproduce

  1. Go to Discover > Shaders > Page 8
  2. Input search text, in this example use Insanity, the url is now https://modrinth.com/shaders?q=Insanity&page=8 with an error message "No results found for your query!"
  3. Remove &page=8 from url
  4. Notice the shaders shown

Expected behavior

  1. Go to Discover > Shaders > Page 8
  2. Input search text, in this example use Insanity, the url should now be https://modrinth.com/shaders?q=Insanity&page=1

Additional context

No response

@GroxicTinch GroxicTinch added bug Something isn't working web Relates to Modrinth.com web frontend labels Jan 21, 2025
Erb3 added a commit to Erb3-forked/modrinth that referenced this issue Jan 26, 2025
Fixes modrinth#3176

**Changes**:

- Sets the pagination to page one if the search is updated. This is the norm on most websites, and how users expect it to work.
- Join `setPage` into `updateSearchResults`
  - Take a page number in `updateSearchResults`
- Remove unused param to `updateSearchResults`
- Update `watch` to not double requests
- use `scrollToTop` utility function
github-merge-queue bot pushed a commit that referenced this issue Jan 29, 2025
Fixes #3176

**Changes**:

- Sets the pagination to page one if the search is updated. This is the norm on most websites, and how users expect it to work.
- Join `setPage` into `updateSearchResults`
  - Take a page number in `updateSearchResults`
- Remove unused param to `updateSearchResults`
- Update `watch` to not double requests
- use `scrollToTop` utility function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web Relates to Modrinth.com web frontend
Development

Successfully merging a pull request may close this issue.

1 participant