-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[flow-strict] Flow strict ScrollView; get rid of InternalScrollViewType #22301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RSNara has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@facebook-github-bot shipit |
Thank you for sending this PR and to all the reviewers! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grabbou is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This may require some internal work to update some internal callsites to ensure Flow check does not fail. |
Understood. The typings around ScrollView increased significantly with this PR (by just removing the |
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
42b29ee
to
745cd31
Compare
Summary: As a part of #22301 it turned out that we need to first convert `ScrollView` to class component. As a first step to do so, here's removal of using `mixins` API, in favor of populating `_scrollResponder` field with `ScrollResponder.Mixin` (still used) methods. Pull Request resolved: #22374 Reviewed By: TheSavior Differential Revision: D13307775 Pulled By: RSNara fbshipit-source-id: 16be1df8a0bf9ccc5cc32f3a017a1279f99268ed
Updated the diff, but didn't test it on RNTester yet. Feel free to comment on Flow typings though :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpojer has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Let's see if this passes Flow internally. |
@RSNara @TheSavior I've tested this on RNTester for unexpected regressions and it seems just fine. Typings also work, e.g. when you add There are still open questions (e.g. whether |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RSNara has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
6cf4028
to
f69046d
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RSNara has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was successfully merged by @thymikee in fe533a4. When will my fix make it into a release? | Upcoming Releases |
Summary
Relates to #22100.
I left 2
$FlowFixMe
s as I was not sure how to handle genericReact.Element<>
and which native props can I pass to ScrollView (would be cool to document it once we got proper types there).I also got rid of
InternalScrollViewType
because we have better typings in originalScrollView
now.Test Plan
Flow passes.
Changelog
[General] [Fixed] - Stricter Flow typings for ScrollView