Austenem/CAT-957 Fix shaking viewport #3578
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes bug where scrolling to the top of a processed dataset section led to a shaking viewport.
Explanation: The processed dataset helper panel appears when any part of the processed dataset accordion is visible. In narrower browser windows, opening the helper panel means there is less width for the accordion, so it is moved further down the page. The panel then closes, which causes the accordion to be visible, which opens it again and triggers an infinite loop.
This was resolved by only showing the helper panel when 10% or more of the accordion is visible, and only hiding the panel when the accordion is completely off-screen.
Design Documentation/Original Tickets
CAT-957 Jira ticket
Testing
Attempted to reproduce bug in Chrome/Safari on browsers of varying widths on pages with one or several processed datasets.
Screenshots/Video
Original bug on prod:
Screen.Recording.2024-10-22.at.2.13.19.PM.mov
Local:
chrome-local.mov
Checklist
CHANGELOG-your-feature-name-here.md
is present in the root directory, describing the change(s) in full sentences.