code icon indicating copy to clipboard operation
code copied to clipboard

Position and sorting of content is reset after going back to search results

Open MrRedstoneToGo opened this issue 1 year ago • 2 comments

Describe the bug

After watching a mod/ressourcepack/... and then going back, the order and position of all Minecraft is reset but the page number on which you were before is still the same

Steps to reproduce

  1. Browse a mod pack
  2. Set the button next to "Sort by:" to any except "Relevance"
  3. Scroll down to the last entry
  4. Click on it
  5. Go back to search results. After "Sort by:" is "Relevance" and you're at the top of the page

Expected behavior

When you come back everything is as you left it

System information

Windows 11, Modrinth 0.6.3

Additional context

No response

MrRedstoneToGo avatar Mar 15 '24 20:03 MrRedstoneToGo

Likely caused by the scrollBehavior chosen here: https://github.com/modrinth/theseus/blob/3ff0ff238a4360960a8fee26d45094f92c8fefc5/theseus_gui/src/routes.js#L140C1-L143C5

Not sure why top: 0 was chosen, but this appears to be intended behavior - although I agree that it should be changed in this case. Could change the global behavior (probably the wrong thing to do), or could filter based on routes relevant to the mod pack screen (probably the right thing to do, since this was an intentional change in #127). Maybe @Geometrically could give some insight.

KnifesmithCode avatar Mar 26 '24 14:03 KnifesmithCode

Related to #481

KnifesmithCode avatar Mar 26 '24 18:03 KnifesmithCode