Skip to content

Scheduling Profiler: Extract and test scroll state from horizontal pan and zoom view#19682

Merged
bvaughn merged 3 commits intofacebook:masterfrom
taneliang:extract-scroll-state
Sep 3, 2020
Merged

Scheduling Profiler: Extract and test scroll state from horizontal pan and zoom view#19682
bvaughn merged 3 commits intofacebook:masterfrom
taneliang:extract-scroll-state

Conversation

@taneliang
Copy link
Copy Markdown
Contributor

Summary

  1. Extract scroll state from HorizontalPanAndZoomView and VerticalScrollView into a bunch of functions.
  2. Add tests for extracted code.

Also fixes this issue where zooming in/out results in offset jumps:

ezgif com-video-to-gif

cc @bvaughn, @kartikcho

Test Plan

  • CI
  • Reload the app while zoomed out (browser zoom) to ensure no black bars appear on app start
  • Zoom out to ensure no black areas appear on viewport resize
  • Ensure vertical and horizontal scroll directions are unchanged

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci Bot commented Aug 24, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9cd6e4b:

Sandbox Source
React Configuration

@sizebot
Copy link
Copy Markdown

sizebot commented Aug 24, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against 9cd6e4b

@sizebot
Copy link
Copy Markdown

sizebot commented Aug 24, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against 9cd6e4b

@taneliang taneliang force-pushed the extract-scroll-state branch from abb1462 to 9cd6e4b Compare August 24, 2020 17:32
@bvaughn bvaughn self-assigned this Aug 31, 2020
@bvaughn
Copy link
Copy Markdown
Contributor

bvaughn commented Sep 1, 2020

This is in my queue to review. I was on PTO last week though and I have a lot of catch up to do. I'll try to get to it sometime in the next couple of days. 😄

Copy link
Copy Markdown
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

👍

@bvaughn bvaughn merged commit e945489 into facebook:master Sep 3, 2020
@taneliang taneliang deleted the extract-scroll-state branch September 4, 2020 14:58
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
…n and zoom view (facebook#19682)

* Extract reusable scroll logic from HorizontalPanAndZoomView

* Change VerticalScrollView to use scrollState

* Clarify test name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants