[flow-strict] Flow strict ScrollView; get rid of InternalScrollViewType#22301
[flow-strict] Flow strict ScrollView; get rid of InternalScrollViewType#22301thymikee wants to merge 3 commits intofacebook:masterfrom
Conversation
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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! |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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 :) |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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 |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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.
facebook-github-bot
left a comment
There was a problem hiding this comment.
@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
$FlowFixMes 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
InternalScrollViewTypebecause we have better typings in originalScrollViewnow.Test Plan
Flow passes.
Changelog
[General] [Fixed] - Stricter Flow typings for ScrollView