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

AndroidTextInputNativeComponent: Make event properties ReadOnly #26469

Conversation

empyrical
Copy link
Contributor

@empyrical empyrical commented Sep 17, 2019

Summary

This pull request makes properties of events' Flow types in AndroidTextInputNativeComponent be $ReadOnly.

This will make them more compatible with the callback types in TextInput.

Changelog

[Internal] [Changed] - Made properties of events' Flow types in AndroidTextInputNativeComponent readonly

Test Plan

yarn flow-check-ios and yarn flow-check-android both pass.

No regressions to running scripts/generate-rncore.sh have been noted.

@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. Contributor A React Native contributor. labels Sep 17, 2019
@react-native-bot react-native-bot added Component: TextInput Related to the TextInput component. Platform: Android Android applications. labels Sep 17, 2019
@elicwhite
Copy link
Member

elicwhite commented Sep 17, 2019

Thanks! Can you run the codegen script as part of your test plan? Just checking that flow passes isn’t sufficient to know that the codegen supports these readonlys.

I think this is the script https://github.com/facebook/react-native/blob/master/scripts/generate-rncore.sh

@empyrical
Copy link
Contributor Author

That script needs some modification to work (missing the positional argument "module spec name" to generate-tests.js) but I notice no difference in behaviour before or after this modification to AndroidTextInputNativeComponent.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @empyrical in e98a4b5.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 17, 2019
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. Component: TextInput Related to the TextInput component. Contributor A React Native contributor. Merged This PR has been merged. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants