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

Fix bad comparison in RCTScrollViewComponentView RTL #39030

Closed
wants to merge 1 commit into from

Conversation

NickGerleman
Copy link
Contributor

Summary:
D29164056 fixed scrollTo coordinate space in RTL, but D38499666 regressed it by adding a comparison before the RTL conversion happens.

This makes scrollTo no-op if we are scrolling from the beginning to the end of the list, since the end of the list is x: 0 in cartesian coordinates, and the start of the list is x: 0 in flow-relative coordinates.

Do coordinate conversion before the early exit check.

Changelog:
[iOS][Fixed] - Fix bad comparison in RCTScrollViewComponentView RTL

Differential Revision: D48378414

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Aug 16, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48378414

@analysis-bot
Copy link

analysis-bot commented Aug 16, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,948,183 +59
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,541,933 -23
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 676676c
Branch: main

Summary:
Pull Request resolved: facebook#39030

D29164056 fixed `scrollTo` coordinate space in RTL, but D38499666 regressed it by adding a comparison before the RTL conversion happens.

This makes `scrollTo` no-op if we are scrolling from the beginning to the end of the list, since the end of the list is `x: 0` in cartesian coordinates, and the start of the list is `x: 0` in flow-relative coordinates.

Do coordinate conversion before the early exit check.

Changelog:
[iOS][Fixed] - Fix bad comparison in RCTScrollViewComponentView RTL

Reviewed By: rshest

Differential Revision: D48378414

fbshipit-source-id: 4ec9bde1a2f9910f35f4035db008bb8d2e2d6f89
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48378414

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 65b7680.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants