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

Austenem/CAT-957 Fix shaking viewport #3578

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

austenem
Copy link
Collaborator

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

  • Code follows the project's coding standards
    • Lint checks pass locally
    • New CHANGELOG-your-feature-name-here.md is present in the root directory, describing the change(s) in full sentences.
  • Unit tests covering the new feature have been added
  • All existing tests pass
  • Any relevant documentation in JIRA/Confluence has been updated to reflect the new feature
  • Any new functionalities have appropriate analytics functionalities added

Copy link
Collaborator

@NickAkhmetov NickAkhmetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clever fix, nicely caught!

I am curious if it's possible to animate the changing dimensions for the page content so the panel doesn't pop in as abruptly, but it's definitely on the "nice to have" side of things rather than a blocker.

@austenem
Copy link
Collaborator Author

Clever fix, nicely caught!

I am curious if it's possible to animate the changing dimensions for the page content so the panel doesn't pop in as abruptly, but it's definitely on the "nice to have" side of things rather than a blocker.

That's a good idea! I'll look into that as a future improvement.

@austenem austenem merged commit 8f136b3 into main Oct 22, 2024
8 checks passed
@austenem austenem deleted the austenem/cat-954-fix-shaking-viewport branch October 22, 2024 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants