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

Docs for TextInput don't say what styles it can take, incorrectly hint that they can handle all Text styles #7070

Closed
seanparsons opened this issue Apr 19, 2016 · 19 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@seanparsons
Copy link

According to the docs for TextInput it supports the same styling options as Text. In testing this at the bare minimum all of the shadow and line decoration options aren't supported.

This can be seen in this playground:
https://rnplay.org/apps/sdqbqw
If the Text element is replaced with a TextInput element with the same style the shadow is lost.

I can imagine that the native text input element isn't conducive to supporting shadows, which is why this is happening.

@seanparsons
Copy link
Author

@dimitrovskif So far I've only tested this on iOS.

@seanparsons
Copy link
Author

@dimitrovskif I've not, but since it works for Text and not TextInput it doesn't really matter either way. The docs list it as being possible when it isn't.

@seanparsons
Copy link
Author

@dimitrovskif I'm really not sure what point you're trying to make, it shouldn't make any difference what Apple or Google support natively in their controls. The docs should represent what is supported by React Native, leaving everyone to find it out blindly (some of them are explicitly listed as being only available on iOS as well) isn't a great experience for anyone.

@grabbou
Copy link
Contributor

grabbou commented Apr 23, 2016

@dimitrovskif in fact, our docs are saying it accepts the same style https://facebook.github.io/react-native/docs/textinput.html#style

@seanparsons you can wrap your <TextInput /> children with <Text /> and that will give you all these things. Here's the relevant line in example app: https://github.com/facebook/react-native/blob/master/Examples/UIExplorer/TextInputExample.ios.js#L228. You can find it in the app under -> TextInput -> Attributed text (at the end)

I think docs need some clarifying.

Here's the rnplay: https://rnplay.org/apps/EdJtJQ

And image:
screen shot 2016-04-23 at 17 46 05

@lacker lacker changed the title [TextInput] doesn't appear to support all of the styling of [Text] Docs for TextInput don't say what styles it can take, incorrectly hint that they can handle all Text styles Oct 21, 2016
@lacker
Copy link
Contributor

lacker commented Oct 21, 2016

Yeah, these docs are pretty bad right now - in particular https://facebook.github.io/react-native/docs/textinput.html#style says nothing but that should probably be a concise description of which styles work and which don't.

xixixao added a commit to xixixao/react-native that referenced this issue Dec 26, 2016
Bandaid for facebook#7070. Until this is fixed, the docs should at least be honest the state they're in, so people don't have to go search and wonder.
facebook-github-bot pushed a commit that referenced this issue Dec 26, 2016
Summary:
Bandaid for #7070. Until this is fixed, the docs should at least be honest the state they're in, so people don't have to go search and wonder.
Closes #11626

Differential Revision: D4366925

Pulled By: mkonicek

fbshipit-source-id: 082a8a9916ad0f8fbb2955cffbf61142fa2a98a1
nicktate pushed a commit to nicktate/react-native that referenced this issue Dec 30, 2016
Summary:
Bandaid for facebook#7070. Until this is fixed, the docs should at least be honest the state they're in, so people don't have to go search and wonder.
Closes facebook#11626

Differential Revision: D4366925

Pulled By: mkonicek

fbshipit-source-id: 082a8a9916ad0f8fbb2955cffbf61142fa2a98a1
DanielMSchmidt pushed a commit to DanielMSchmidt/react-native that referenced this issue Jan 4, 2017
Summary:
Bandaid for facebook#7070. Until this is fixed, the docs should at least be honest the state they're in, so people don't have to go search and wonder.
Closes facebook#11626

Differential Revision: D4366925

Pulled By: mkonicek

fbshipit-source-id: 082a8a9916ad0f8fbb2955cffbf61142fa2a98a1
@hramos
Copy link
Contributor

hramos commented May 25, 2017

Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why.

@hramos hramos closed this as completed May 25, 2017
@ajostergaard
Copy link

Given that the docs still don't actually say which styles will actually work don't you think closing the issue is premature?

@hramos
Copy link
Contributor

hramos commented May 25, 2017

Good point. I've been tackling docs issues, so I'll just assign this to myself.

@hramos hramos reopened this May 25, 2017
@hramos hramos self-assigned this May 25, 2017
@xaviervia
Copy link

Coming here from the documentation about TextField: it seems that replacing the font family is not working on Android. Is this one of the styles that is not supported? I’m surprised that I did not find any issue specifically about that, so I think I might have missed something.

@RUIFERNANDE5
Copy link

I'm having trouble setting in paddingVertical on multiline inputs. Any known issue?

@Amurmurmur
Copy link

@RUIFERNANDE5 use marginVertical 👍

@zeddysoft
Copy link

Hi @hramos ! I am new to Open Source and want to dive into this issue, though i could see you have assigned it to yourself, it is possible you re-assign it to me so i can get started with contributing.

@hramos
Copy link
Contributor

hramos commented Jul 26, 2017

Sure! Thanks for volunteering 🙌

@hramos hramos removed their assignment Jul 26, 2017
@hramos
Copy link
Contributor

hramos commented Jul 26, 2017

All yours

@zeddysoft
Copy link

zeddysoft commented Jul 27, 2017

Hi @hramos , to get started, i guess i would have to check out Text styles that do not work for TextInput component and list them because the doc has already being updated with the below hint:

'Note that not all Text styles are supported, see Issue#7070 for more detail.'

@pull-bot
Copy link

pull-bot commented Oct 9, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Oct 9, 2017
@hramos hramos closed this as completed Oct 9, 2017
@marcind
Copy link
Contributor

marcind commented Oct 12, 2017

Hi, this is still not resolved: http://facebook.github.io/react-native/releases/0.50/docs/textinput.html Please reopen and throw together a simple bullet point list of what is supported.

@hramos
Copy link
Contributor

hramos commented Oct 12, 2017

@marcind please open a PR and I'll take a look

@marcind
Copy link
Contributor

marcind commented Oct 12, 2017

Sorry, I'm not familiar with the internal workings of react-native so wouldn't know where to start to figure this out (other than trying every style property in some sample to see what works and what does not). I was hoping that someone who maintains this project has enough knowledge to quickly provide a list.
I found this issue while trying to determine why my code was not working and was dismayed that it keeps getting closed by a bot.
Anyway, here's the PR: #16346

facebook-github-bot pushed a commit that referenced this issue Oct 14, 2017
Summary:
References #7070

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Docs are incomplete, start filling them out

N/A
Closes #16346

Differential Revision: D6057501

Pulled By: hramos

fbshipit-source-id: c30d3369fa1a73ef6a93c2ed8f8c53af5a1af7ee
@facebook facebook locked as resolved and limited conversation to collaborators Oct 9, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests