-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Ui behaves inconsistently across platforms. Some are against RN spec. #2498
Comments
2 is a bug in React Native not web. 3 is only true for text-align, not all text style inheritance. And 1 is easy to change. But you're incorrect in saying static is not supported in RN because it is. |
Thanks for your fast response. But I'm afraid your response to 1 is not true, the official doc says position is enum('absolute', 'relative') And about 2, yeah it kinda sounds right. I expected the RNW behaviour and got surprised when I realized ios/aos behaved the other way. |
The docs are out of date / missing info https://snack.expo.dev/5Lpci2KAd |
Match default Text rendering in React Native. Fix #2498
Set textAlign on the default Text element. Prevents inheritance of textAlign set on a parent View. Fix #2498
Thanks for the clear issue and your attention to detail in finding these issues. 1 & 3 should be fixed by the latest canary release: https://codesandbox.io/s/muddy-frog-o4pkid Please let me know if you encounter any more issues |
Wow that was fast, THANKS A LOT!!! Yes I surely will, and have been always admiring your work. Thanks again! |
Is there an existing issue for this?
Describe the issue
Hi, thanks a lot for this great project! I found some inconsistency across platforms. It would be so much better if the basic UI components behave exactly the same across platforms.
<Text/>
element default prop issue: The<Text/>
element hasposition: 'static'
as a default prop, which is against React Native specification.flexDirection
and position properties inconsistency: If a parent element hasflexDirection: 'row-reverse'
orflexDirection: 'column-reverse'
, theleft
,right
,top
,bottom
,start
, andend
properties behave differently(opposite way) on Android/iOS compared to web.<Text/>
component style inheritance: The<Text/>
component should not inherit styles from its parent elements, but it does on web platform.Expected behavior
<Text />
should haveposition: 'relative'
as defaultflexDirection: 'something-reverse'
, then'left'
,'right'
,'top'
,'bottom'
,'start'
,'end'
should behave the opposit way.<Text />
should not inherit styles from its parentsSteps to reproduce
I created a github repo to demonstrate these:
https://github.com/aliveornot/rn-ui-consistency
Test case
https://codesandbox.io/s/quizzical-hill-x6hgi7?file=/src/App.js
Additional comments
No response
The text was updated successfully, but these errors were encountered: