react-native
react-native copied to clipboard
chore: Deprecate TextInput editable prop
Summary
This is a follow-up PR of https://github.com/facebook/react-native/pull/34444 and it adds a deprecation warning regarding the TextInput
component editable
prop as requested by @lunaleaps here -> https://github.com/facebook/react-native/pull/34444#discussion_r952952614
Changelog
[General] [Deprecated] - Adds deprecation warning to TextInput editable prop
Test Plan
- Open the RNTester app and navigate to the TextInput page
- Observe the warning
https://user-images.githubusercontent.com/11707729/186525140-5203c0c9-40ca-4c9d-8dbb-47388973c77c.mov
Platform | Engine | Arch | Size (bytes) | Diff |
---|---|---|---|---|
android | hermes | arm64-v8a | 7,617,191 | +73 |
android | hermes | armeabi-v7a | 7,031,532 | +98 |
android | hermes | x86 | 7,917,346 | +49 |
android | hermes | x86_64 | 7,891,041 | +46 |
android | jsc | arm64-v8a | 9,494,876 | +56 |
android | jsc | armeabi-v7a | 8,272,588 | +82 |
android | jsc | x86 | 9,432,769 | +42 |
android | jsc | x86_64 | 10,025,821 | +40 |
Base commit: f3def13a92f0fce72a76d9fc5bdcf619e94688af Branch: main
Platform | Engine | Arch | Size (bytes) | Diff |
---|---|---|---|---|
ios | - | universal | n/a | -- |
Base commit: f3def13a92f0fce72a76d9fc5bdcf619e94688af Branch: main
@lunaleaps has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Hey @gabrieldonadel, sorry for the delay -- we're actively discussing this approach in how we want to do deprecations. I think we want to give folks one more release before they get warned. Still figuring out the best way to do that. We need to clean up our deprecation policy and make it more visible. Is it alright if close this PR for now?
Hey @gabrieldonadel, sorry for the delay -- we're actively discussing this approach in how we want to do deprecations. I think we want to give folks one more release before they get warned. Still figuring out the best way to do that. We need to clean up our deprecation policy and make it more visible. Is it alright if close this PR for now?
Hey @lunaleaps no worries, I'm closing this and removing the deprecation warning from my PR on the react-native-website repo right now
@lunaleaps did the internal discussion continue? Currently the documentation doesn't show any indication that readOnly
is preferred over editable
:
- https://reactnative.dev/docs/textinput#editable
- https://reactnative.dev/docs/textinput#readonly
In fact, since editable
comes first in the list this is what I first implemented when looking for an equivalent for disabled
on the Web (which I now realise might not be exactly what readOnly
is though 🤔).