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

Avoid scroll jump #41962

Closed
wants to merge 1 commit into from
Closed

Conversation

rafpaf
Copy link
Contributor

@rafpaf rafpaf commented Apr 29, 2024

TL;DR

This pull request addresses a visual issue related to toggling filters by adding a scrolling behavior to the 'BrowseModels' component.

What changed?

Additional Hooks and Context were introduced to manage the scrollable state of the viewport. The overflowY style attribute of the viewport is saved when the component is rendered and then set to 'scroll'. This style setting is then restored to its original value when the component is unmounted. This stops the page from 'jumping' when filters are toggled.

How to test?

Navigate to the component and toggle the filters to observe the updated behavior. The page should no longer 'jump' when filters are toggled.

Why make this change?

The change improves the user experience by reducing visual disruptions that may disorient users while interacting with the component.

@rafpaf rafpaf added the no-backport Do not backport this PR to any branch label Apr 29, 2024
@rafpaf
Copy link
Contributor Author

rafpaf commented Apr 30, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport Do not backport this PR to any branch .Team/AdminWebapp Admin and Webapp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant