-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
iOS: border width and color renders incorrectly on iOS for particular values #21945
Comments
Hello, I had the same issue with react-native 0.57.4 and I deleted this commit dba2235 to retrieve my triangles. Dimitri |
Hey Dimitri! Thanks! By deleting the commit you mean you forked react-native or just changed it in your node_modules while you wait for an upgrade? (i'm not fond of any of both solutions that's why I'm asking :P) |
Hey ! Yeah I forked react-native repo and I added a commit to undo changes 😄 |
I rewrote my triangles to use transforms today. Maybe the comment "// Asymmetrical edgeInsets cause strange artifacting on iOS 10 and earlier." makes sense |
@michaelknoch care to share an example of how you implement triangles now? :P |
Any workaround on this guys? |
any solution for this guys ? |
Summary: This PR fixes an obscure rendering bug on iOS for borders with asymmetric radii. It appears to be a problem with the custom drawing that React Native performs when it cannot use native UIKit/CoreAnimation border drawing. Pull Request resolved: #21208 Differential Revision: D10130120 Pulled By: hramos fbshipit-source-id: d9fbc5c622c060db15658d038a068216b47bb26d
Ah, yikes. @t-benze is right: the regression occurred in a fix I made for another border issue. Here's the original issue: #11897 There was another suggested fix in this PR: #19451 I would suggest that you try incorporating the patch from #19451 and see if it regresses the border-triangle functionality. If it doesn't, open a PR to revert my change (dba2235) and include the other fix from #19451. Sorry about this! |
is this fixed in react-native 0.58.3 ? |
Summary: Fixes #22824 #21945 , the bug comes from #21208 , it was to fix #11897. Now Let's constrain edge adjust only when view has corners. [iOS] [Fixed] - Fix triangle views on iOS Pull Request resolved: #23402 Differential Revision: D14059192 Pulled By: hramos fbshipit-source-id: be613bf056d3cc484f281f7ea3d08f251971700a
This changes breaks semi-circles as well. Manually patching to revert the change fixes the issue. What's the best course of actions to fix this? |
Summary: Fixes #22824 #21945 , the bug comes from #21208 , it was to fix #11897. Now Let's constrain edge adjust only when view has corners. [iOS] [Fixed] - Fix triangle views on iOS Pull Request resolved: #23402 Differential Revision: D14059192 Pulled By: hramos fbshipit-source-id: be613bf056d3cc484f281f7ea3d08f251971700a
After having fixed the issue using borderRadius: 0.000001, the error started appearing again randomly (some triangles would appear cut while some others not) setting a bigger borderRadius made the trick, so borderRadius: 1, works better |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
This issue still exists. Using a borderRadius: 0.000001 doesn't work in a few cases still and using borderRadius: 1 works for 95% of the cases but the triangles still appear cut in some older devices like iPad Mini. On the other hand, increasing borderRadius removes a pixel from the opposite edge as shown here: It's barely perceptible and not a big deal, but perceptible enough for people to notice. Ultimately, using borderRadius feels hacky. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Environment
Description
I have a triangle build with View and styles only. It renders incorrectly depending on the width/height values on iOS. The problem occurred after upgrading to react-native 0.57.3 (from 0.55.x).
Actual:
Expected:
Reproducible Demo
The following snippet is not working (tested with iPhone 6 Plus and iPhone X):
The following snippet is working:
It's just an example, there are much more values showing the problem!
The text was updated successfully, but these errors were encountered: