Giter Club home page Giter Club logo

Comments (11)

netmaxt3r avatar netmaxt3r commented on August 21, 2024 1

@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.

netmaxt3r avatar netmaxt3r commented on August 21, 2024

@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 avatar zdpdsy commented on August 21, 2024

@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

@netmaxt3r sorry,i push code now. can you try it again? thank you!
The Result Snapshot is
image

from react-native.

cortinico avatar cortinico commented on August 21, 2024

@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

Thanks for the confirmation @netmaxt3r

from react-native.

shubhamguptadream11 avatar shubhamguptadream11 commented on August 21, 2024

@zdpdsy This is fabric related issue. I'm trying to debug this issue.
In Fabric New Renderer:

static UIImage *RCTGetSolidBorderImage(

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 avatar zdpdsy commented on August 21, 2024

@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

OK,Thanks,i find a temporary solution is change border style To Super element Like as ,like th snapShot:

image

but this solution is temporary,can't Real problem solving。

from react-native.

netmaxt3r avatar netmaxt3r commented on August 21, 2024

@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.

netmaxt3r avatar netmaxt3r commented on August 21, 2024

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

if (lineWidth <= 0.0) {
return nil;
}

from react-native.

shubhamguptadream11 avatar shubhamguptadream11 commented on August 21, 2024

@netmaxt3r I found one more issue related to border in Text Component only.
Here: #45925

from react-native.

netmaxt3r avatar netmaxt3r commented on August 21, 2024

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>
image

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.

zhongwuzw avatar zhongwuzw commented on August 21, 2024

Any one can try this #45972 ?

from react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.