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

Remove scroll jump when applying filters #1024

Open
thansidwell opened this issue Nov 24, 2024 · 2 comments
Open

Remove scroll jump when applying filters #1024

thansidwell opened this issue Nov 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@thansidwell
Copy link
Collaborator

Currently when you apply a filter, it immediately it scrolls up to the top of the filter, making it disorienting for users to use and breaking their concentration.

CleanShot.2024-11-23.at.22.06.19.mp4

When a user clicks on a filter it should not scroll at all, but stay exactly where it was before, so users can have a smooth experience.

@thansidwell thansidwell converted this from a draft issue Nov 24, 2024
@thansidwell thansidwell added the bug Something isn't working label Nov 24, 2024
@thansidwell thansidwell changed the title Fix Jump when applying filters Remove scroll jump when applying filters Nov 24, 2024
@vinhyan
Copy link
Contributor

vinhyan commented Dec 4, 2024

From my initial investigation, this occurs because the filters are being mapped with a unique key, causing React to re-render each time a filter option is selected (and its state is updated). As a result, the scroll position resets to the top of the element after every re-render.

I can look more into this and give it a try. @nlebovits

@nlebovits
Copy link
Collaborator

Thank you! I'll assign you now.

Btw, we'll have high fidelity mocks for the contact page by this weekend. Haven't forgotten that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To Do
Development

No branches or pull requests

3 participants