Remove outdated multiline single-side border caveat from TextInput docs - #5200
Open
theprantadutta wants to merge 1 commit into
Open
Remove outdated multiline single-side border caveat from TextInput docs#5200theprantadutta wants to merge 1 commit into
theprantadutta wants to merge 1 commit into
Conversation
Collaborator
|
Hey @theprantadutta, thanks for picking it up and providing a bit more context. I was able to verify that the border styles are applied correctly to multiline text inputs on hardware device for both platforms using Expo SDK 54, so React Native 0.81, using this Snack example: Can you also update all versioned docs, starting from 0.81 onwards? The doc files are located here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5151
The TextInput page states:
This removes that sentence. Two separate problems with it:
1. The workaround it promises is never shown. The sentence ends in a colon introducing the example below it, but that example is a plain multiline
TextInputstyled withborderColor/borderWidth— an all-sides border, applied directly to theTextInput, with no wrappingViewanywhere. So the text promises a demonstration the example does not contain, regardless of whether the limitation itself is still real. This part needs no runtime check to confirm; it's visible in the page as it stands.2. The limitation looks outdated. It came in with the original "Known issues" section in #649 (December 2018), well before the New Architecture reworked border rendering. On Android today,
ReactEditText— the view backingTextInput, multiline included — applies borders through the same per-edge path as any other view:That's
BackgroundStyleApplicator.setBorderWidth, taking aLogicalEdge, and there is no multiline special-casing in the applicator. The reporter of #5151 also tested single-side borders on a multiline input in Snack across Android, iOS, and Web and found they applied as expected.What I could not verify
I want to be straight about this rather than imply more than I did: I did not run a Snack myself. I don't have an Android SDK on this machine, so points above are source-level reading plus the reporter's testing, not my own end-to-end run on a current release.
If you'd like empirical confirmation before merging, that's completely fair — either the reporter can share their Snack, or I'm happy to have this sit until someone can check it on a device. Problem 1 stands on its own either way, so if you'd rather keep a corrected version of the limitation note, I can instead reword it and add an example that actually demonstrates the wrapping-
Viewworkaround. Just say which you prefer.I've edited only
docs/textinput.mdand left the versioned copies underwebsite/versioned_docs/alone, since those describe released versions.For disclosure: I use an AI assistant in my work, and I review and verify everything before it goes out.