Skip to content

feat: Unify TextInput autoComplete and textContentType props - #34523

Closed
gabrieldonadel wants to merge 4 commits into
react:mainfrom
gabrieldonadel:feat/redefine-auto-complete
Closed

feat: Unify TextInput autoComplete and textContentType props#34523
gabrieldonadel wants to merge 4 commits into
react:mainfrom
gabrieldonadel:feat/redefine-auto-complete

Conversation

@gabrieldonadel

Copy link
Copy Markdown
Collaborator

Summary

This unifies the Android only autoComplete and the iOS only textContentType TextInput props with the web autoComplete values as requested on #34424. I left the textContentType prop and the current supported autoComplete values untouched in order to avoid having a breaking change. This also updates RNTester to include test cases using the new autoComplete values

Changelog

[General] [Changed] - Unify TextInput autoComplete and textContentType props

Test Plan

  1. Open the RNTester app and navigate to the TextInput page
  2. Test the TextInput component through the Text Auto Complete section
Screen.Recording.2022-08-29.at.00.37.52.mov

@facebook-github-botfacebook-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. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Aug 29, 2022
@analysis-bot

analysis-bot commented Aug 29, 2022

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
ios-universaln/a--

Base commit: b6bf1fd
Branch: main

@analysis-bot

analysis-bot commented Aug 29, 2022

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a7,635,922-2,612
androidhermesarmeabi-v7a7,047,750-3,108
androidhermesx867,937,816-2,470
androidhermesx86_647,909,721-2,583
androidjscarm64-v8a9,512,517+281
androidjscarmeabi-v7a8,287,808-48
androidjscx869,452,091+524
androidjscx86_6410,043,310+679

Base commit: b6bf1fd
Branch: main

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@necolas has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@gabrieldonadel
gabrieldonadelforce-pushed the feat/redefine-auto-complete branch from 6e8761d to 21ba83aCompareAugust 30, 2022 01:30
@gabrieldonadel
gabrieldonadelforce-pushed the feat/redefine-auto-complete branch from 21ba83a to 22b7359CompareAugust 30, 2022 16:23
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@necolas has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@gabrieldonadel

Copy link
Copy Markdown
CollaboratorAuthor

@necolas do you mind checking what is causing internal builds and tests to fail?

@necolas

Copy link
Copy Markdown

Someone else will have to import this PR. I closed that internal diff as I'm away for the rest of September

@necolas

Copy link
Copy Markdown

Ping @cipolleschi or @jacdebug to import

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

}
autoComplete={
Platform.OS === 'android'
? // $FlowFixMe

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is this suppressing? If we do add a suppression, could we suppress the specific error?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Hi @NickGerleman this is suppressing the prop-missing error because the autoCompleteWebToAutoCompleteAndroidMap object does not include all autoComplete keys/values. The reason for this is just because it would make the object super huge and we can just fallback to autoComplete when autoCompleteWebToTextContentTypeMap[autoComplete] is undefined. I've just updated the suppression to specify the prop-missing error tho

@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @gabrieldonadel in 73abcba.

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

@react-native-botreact-native-bot added the Merged This PR has been merged. label Sep 8, 2022
@gabrieldonadel
gabrieldonadel deleted the feat/redefine-auto-complete branch September 8, 2022 17:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.Shared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@gabrieldonadel@analysis-bot@facebook-github-bot@necolas@react-native-bot@NickGerleman