open-sauced / app

🍕 Insights into your entire open source ecosystem.
https://pizza.new
Apache License 2.0
418 stars 222 forks source link

Bug: Toggling hide bots on lottery factor on repository page causes page to jump back to the top #3910

Closed nickytonline closed 2 months ago

nickytonline commented 2 months ago

Toggling the hide bots on lottery factor on a repository page causes the page to jump back to the top.

You can see an example of this for the remix-run/remix repository page.

CleanShot 2024-08-10 at 16 39 33

The hidebots state is in the querystring (a good thing), e.g. https://app.opensauced.pizza/s/remix-run/remix?hideBots=false, but we're not leveraging the Next.js router's keep scroll position setting.

This can be leverage using the setQueryParams function, e.g. https://github.com/open-sauced/app/blob/b79f9746e7715287506d8d8723d28bac60bf073b/pages/workspaces/%5BworkspaceId%5D/contributor-insights/%5BlistId%5D/overview.tsx#L114

Also, the useState code for managing this state can be removed, i.e. https://github.com/open-sauced/app/blob/b79f9746e7715287506d8d8723d28bac60bf073b/pages/s/%5Borg%5D/%5Brepo%5D/index.tsx#L99-L101

as well as the useEffect code.

https://github.com/open-sauced/app/blob/b79f9746e7715287506d8d8723d28bac60bf073b/pages/s/%5Borg%5D/%5Brepo%5D/index.tsx#L109-L111

github-actions[bot] commented 2 months ago

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please comment on this issue.

For full info on how to contribute, please check out our contributors guide.

open-sauced[bot] commented 2 months ago

:tada: This issue has been resolved in version 2.55.0-beta.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

open-sauced[bot] commented 2 months ago

:tada: This issue has been resolved in version 2.55.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: