Comments (11)
@zdpdsy thanks for update, i see that this is fabric related issue. issue is reproducible on current latest rn 0.74.5
with fabric enabled , i was wrong on previous comment i was on old architecture when i said i was not able to reproduce on 0.74.5
sorry about that
from react-native.
@zdpdsy issue lists rn version 0.73.9
but reproducer is on 0.74.5
, I am not able to reproduce the issue on reproducer, please confirm from your side
from react-native.
@zdpdsy issue lists rn version
0.73.9
but reproducer is on0.74.5
, I am not able to reproduce the issue on reproducer, please confirm from your side
@netmaxt3r sorry,i push code now. can you try it again? thank you!
The Result Snapshot is
from react-native.
@zdpdsy thanks for update, i see that this is fabric related issue. issue is reproducible on current latest
rn 0.74.5
with fabric enabled , i was wrong on previous comment i was on old architecture when i said i was not able to reproduce on0.74.5
sorry about that
Thanks for the confirmation @netmaxt3r
from react-native.
@zdpdsy This is fabric related issue. I'm trying to debug this issue.
In Fabric New Renderer:
This is responsible for drawing backgroundColor and borderWidth styles.
I am looking to map same for Old Architecture. @cortinico Can you help me pointing the code responsible for handling border and backgroundColor for Old Architecture?
This will help me in finding the root cause.
from react-native.
@zdpdsy thanks for update, i see that this is fabric related issue. issue is reproducible on current latest
rn 0.74.5
with fabric enabled , i was wrong on previous comment i was on old architecture when i said i was not able to reproduce on0.74.5
sorry about that
OK,Thanks,i find a temporary solution is change border style To Super element Like as ,like th snapShot:
but this solution is temporary,can't Real problem solving。
from react-native.
@shubhamguptadream11 issue might not be on that function , since it is reproducible with dotted border style as well probably with layer zIndex for border layer and main layer.
from react-native.
I have found one more issue related to this when border width is not specified or computed to zero with dotted style we loose background color
<Text style={{
backgroundColor: '#F00',
borderWidth: 0,
borderStyle: 'dotted'
}}>hello</Text>
this is due to early return without checking bgcolor
react-native/packages/react-native/React/Views/RCTBorderDrawing.m
Lines 469 to 471 in ee25081
from react-native.
@netmaxt3r I found one more issue related to border in Text Component only.
Here: #45925
from react-native.
I did some comparison with old and new arch implementation, i see border styling is not working properly even on old arch
<View style={{
backgroundColor: '#F00',
borderColor: "black",
borderWidth: 1,
borderStyle: "dashed",
minHeight: 30,
}}/>
<Text
style={{
backgroundColor: '#F00',
borderColor: "black",
borderWidth: 1,
borderStyle: "dashed",
minHeight: 30,
marginTop: 10,
}}
>hello</Text>
text view render with solid
border rather than dashed
I also see in the new arch RCTTextView
has been replaced by RCTParagraphComponentView
with improved logic for border rendering. i see now we render border and background on single CALayer
and setting its zIndex
to -1024
hopping it would render borderLayer behind the root layer of RCTParagraphComponentView
, but it is not , you can verify this by applying some transparency to border layer (zindex works with relative to multiple sublayers). I am not sure issue is with iOS or RN, I believe we might have to reconsider the logic for border and background layer
@cortinico since TextView
is a extremely important component can we have someone from meta team take a look and suggest a way forward
possible options i see are
- move rendering text to new sub layer and add on top of borderLayer
- separate border and background.
from react-native.
Any one can try this #45972 ?
from react-native.
Related Issues (20)
- When an Activity is destroyed, the AppState listeners are not cleared HOT 5
- VirtualizedList: You have a large list that is slow to update HOT 5
- [Accessibility] [TalkBack] PanResponder callbacks do not fire when TouchableOpacity/Pressable is pressed and TalkBack is on HOT 2
- Flipper repeatedly launches when initiating JS debugger HOT 9
- TextInput with Large Font Size (>40) Causes Text to Become Invisible on iOS HOT 1
- ScrollView doesn't scroll when overflows the parent view HOT 4
- Trying to add unknown view tag HOT 5
- Open Debugger button is missing when Hermes is disabled HOT 5
- Issue with ScrollView and position: absolute in React Native 0.72.4 HOT 5
- Apperance.getColorScheme() returns incorrect value if app opened in background (e.g. using Healthkit.HKObserverQuery) HOT 7
- Incorrect TextInput email field suggestion for "Hide my Email" (iOS)
- [0.75.0] Failed to download template when init new app HOT 14
- 【Android】There is a delay in calculating the height of Modal content HOT 6
- returnkeytype do not work immediately HOT 3
- react-native build-ios error: unknown option '--device' HOT 5
- [android] Plugin [id: 'com.facebook.react.settings'] was not found in any of the following sources HOT 23
- Minimum supported Gradle version is 8.7. Current version is 8.6. RN 0.74.3 HOT 27
- [Android] Emiting Events from HeadlessTask on Android in New Arch + Bridgeless + interop layer HOT 2
- Flatten margin styles are not properly overriding when applied from specific to general properties HOT 8
- Cannot build project after a clean setup without expo HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.