-
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
Android: Border radius renders in a blurred / choppy way in 0.51.0 #17267
Comments
Pinging @RSNara who is listed on release notes for 0.51.0 for border work, and @AaaChiuuu who worked on "overflow: hidden" for 0.50.0. edit: this bug is not in 0.50.1, it appears first in 0.51.0 as far as I can tell. |
I've also noticed this. It's especially noticeable when you have the border color different from the background color of the button and surrounding view. |
@RSNara any update on this issue? It's currently blocking our upgrade to v0.51 |
Another bug related to this: #17311 |
same problem |
@RSNara are you able to take a look at this, or help us identify which commit might be responsible? |
I made a PR that fixes the performance issue. The problem was that the new borders calculations didn't support a borderRadius larger than the maximum possible - 50% of the smallest side. |
@yedidyak Is this the reason for all of the above bugs mentioned by @dannycochran ? |
It's possible, I didn't notice any specific issues as shown above, just serious performance issues. My PR is specific to borderRadius > 50% of the view size. I posted it here because it seems that several different border issues in 0.51.0 were merged into here. |
This issue still exist on RN 0.53 |
Here's a snack to help clarify the rendering issue: https://snack.expo.io/BytwPGarz
import React, { Component } from 'react';
import { Text, View, StyleSheet } from 'react-native';
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<View style={styles.button}>
<Text style={styles.buttonText}>Pushy Pushy</Text>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'space-around',
backgroundColor: '#fff',
padding: 10,
},
button: {
borderRadius: 2,
borderColor: 'red',
borderWidth: 1,
padding: 10,
},
buttonText: {
fontSize: 16,
textAlign: 'center',
},
}); |
@hramos |
This bug prevents me from updating to newer react native versions (0.50.4 is the latest working version). This bug is still present in the latest 0.52 release. I use the border radius to draw radio buttons (https://github.com/jwesselink/react-native-material-kit#radio-button) but they appear as a filled circle on my android phone (s5 mini) since the 0.51 release |
@atlanteh the release schedule is fixed, and unless tests are broken, the release will go out. I'm not sure what you mean by "address almost instantly" -- this is a GitHub issue, not a pull request. We rely on contributors from the community to help address any issues that affect them. |
@hramos I understand that, but fact is, that border radius doesn't work on latest releases. Someone broke it few releases ago and for some reason nobody cares. This means there's no test coverage on border radius? Almost no one uses it? |
Sorry for not getting to this earlier. But it seems like the calculations in ReactViewBackgroundDrawable.drawRoundedBackgroundWithBorders might be a bit off. That's just a hunch though. Regardless, the problem should be in ReactViewBackgroundDrawable, since that's the class we use to do border drawing in Android. Unfortunately, I'm a bit swamped with work, so I can't guarantee that I'll get to this fix anytime soon. This comment explains how rounded borders work. It shouldn't be too difficult to understand. So, I'd love it if someone else could take a crack at it. |
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version? I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer. |
@react-native-bot why is this closed? I'm use v0.53.0 and and still having this problem. |
when I test with old vesion RN 0.49 it working perfect. |
Has anyone found a workaround for this? |
This is currently blocking us as well. |
I cant believe its not resolved in all this time.. sick n tired of bloody RN programming half the month I just spend fixing and upgrading dependencies! |
So I couldnt install my old RN app due to this issue: So I had to upgrade RN to another version and try again. Now ive this issue of borderradius. So now ive 2 issues - whats the point of upgrade! |
Still not fixed: Packages: (wanted => installed) |
Fixed with commit c5ca26a which is now in Master. Please test with Master build. |
@himabindugadupudi Thanks for getting it fixed Can you or someone set it to a release plz? |
@Rah1x, it will be part of the April release. |
@TheSavior This is great news. Given the severity of this, any chance we can get that commit cherry-picked into 0.55 as well? |
It seems like we are pretty close to 0.56 and this bug has existed for many releases. I’ll leave it up to @grabbou to decide on whether it should be cherry picked. |
I see the new release However since im using
|
React Native 55.4 doesn't include this fix. It probably only includes a cherry-pick or two of critical bugs that couldn't wait until next release. |
@atlanteh I hope it will be added to the next release. |
Since this bug has been discovered quite few releases ago and not fixed until now, it's no longer critical. If it was discovered just after cutting a release, I think it would qualify as critical and a new hotfix would be released, but after so long, it's no longer urgent enough |
I'm not sure that critical vs non-critical really matters at this point. This issue has been fixed but we haven't had a release since then. This fix will be in the next release. |
When is the next release planned? Because we would really like to include this in our release, but we're waiting for 2 months on a new release. |
Should be any moment, the release was delayed due to tests failing and there's already a PR fixing them. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This fix is now part of the latest release candidate: https://github.com/facebook/react-native/releases/tag/v0.56.0-rc The schedule is meant to provide a reasonably stable release every month or so, but there's nothing preventing anyone from using React Native from master. In the future, you can take advantage of any fixes-in-master-but-not-yet-in-a-release by using React Native from master or pinning your I'd also like to take the opportunity to remind everyone that this repo abides to the following Code of Conduct: https://github.com/facebook/react-native/blob/master/CODE_OF_CONDUCT.md. Maintainers will hide comments from first offenders, and they reserve the right to block repeat offenders. |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 6.11.4
Yarn: Not Found
npm: 3.10.10
Watchman: 4.9.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.53.0 => 0.53.0
Target Platform: Android (22)
Steps to Reproduce
Create a simple view:
Expected Behavior
I would expect that the border does not render in a strange and pixelated way. Previously in react-native 0.49.5, the exact same code would render like so:
Actual Behavior
In react-native 0.53.0, that same code renders this blurry border:
Reproducible Demo
The code snippet above compiles and should be sufficient to reproduce this problem.
The text was updated successfully, but these errors were encountered: