Skip to content
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

[^0.71.0] - borderLeftColor and borderRightColor is not rendered properly #36036

Closed
lfrallon opened this issue Feb 2, 2023 · 0 comments
Closed
Labels

Comments

@lfrallon
Copy link

lfrallon commented Feb 2, 2023

Description

Screenshot_2023-02-02-12-40-45-929-edit_com easybet

I apologise in advance if this is not the right place to submit an issue like this.

Version

0.71.2

Output of npx react-native info

System:
OS: Linux 6.1 Fedora Linux 37 (Workstation Edition)
CPU: (4) x64 Intel(R) Core(TM) i3-4030U CPU @ 1.90GHz
Memory: 983.09 MB / 7.21 GB
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v18.12.1/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Watchman: 20221126.133621.0 - /usr/local/bin/watchman
SDKs:
Android SDK:
API Levels: 23, 26, 27, 28, 29, 30, 31, 33
Build Tools: 24.0.0, 24.0.1, 24.0.2, 24.0.3, 28.0.3, 29.0.2, 30.0.2, 30.0.3, 31.0.0, 33.0.0
System Images: android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 19.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: ^0.71.0 => 0.71.2
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

The usual way to run the react-native app.

Snack, code example, screenshot, or link to a repository

import React from 'react';
import {
  StyleSheet,
  View,
} from 'react-native';
import {SafeAreaView} from 'react-native-safe-area-context';

const App: React.FC = () => {
  return (
    <SafeAreaView style={[styles.container]}>
        <View style={styles.scanRegion}>
            <View style={styles.scanRegionContainer}>
              <View style={styles.scanTopRegion}>
                <View style={styles.topLeftRegion} />
                <View style={styles.topRightRegion} />
              </View>
              <View style={styles.scanBottomRegion}>
                <View style={styles.bottomLeftRegion} />
                <View style={styles.bottomRightRegion} />
              </View>
            </View>
          </View>
    </SafeAreaView>
  );
}

export default App;

const styles = StyleSheet.create({
  bottomLeftRegion: {
      borderLeftWidth: 6,
      borderBottomWidth: 6,
      borderBottomLeftRadius: 20,
      borderLeftColor: '#FFFFFF',
      borderBottomColor: '#FFFFFF',
      width: 50,
      height: 50,
  },
  bottomRightRegion: {
      borderRightWidth: 6,
      borderBottomWidth: 6,
      borderBottomRightRadius: 20,
      borderRightColor: '#FFFFFF',
      borderBottomColor: '#FFFFFF',
      width: 50,
      height: 50,
    },
  container: {
      flex: 1,
  },
  scanRegion: {
      position: 'absolute',
      top: '20%',
      left: '15%',
      width: '70%',
      height: '30%',
    },
  scanRegionContainer: {
      padding: 20,
      flex: 1,
  },
  scanBottomRegion: {
      flexDirection: 'row',
      justifyContent: 'space-between',
  },
  scanTopRegion: {
      flex: 1,
      flexDirection: 'row',
      justifyContent: 'space-between',
  },
  topLeftRegion: {
      borderLeftWidth: 6,
      borderTopWidth: 6,
      borderTopLeftRadius: 20,
      borderLeftColor: '#FFFFFF',
      borderTopColor: '#FFFFFF',
      width: 50,
      height: 50,
  },
  topRightRegion: {
      borderRightWidth: 6,
      borderTopWidth: 6,
      borderTopRightRadius: 20,
      borderRightColor: '#FFFFFF',
      borderTopColor: '#FFFFFF',
      width: 50,
      height: 50,
  },
});
@react-native-bot react-native-bot added the Platform: Linux Building on Linux. label Feb 2, 2023
@lfrallon lfrallon changed the title borderLeftColor and borderRightColor is not rendered properly [^0.71.0]borderLeftColor and borderRightColor is not rendered properly Feb 6, 2023
@lfrallon lfrallon changed the title [^0.71.0]borderLeftColor and borderRightColor is not rendered properly [^0.71.0] - borderLeftColor and borderRightColor is not rendered properly Feb 6, 2023
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this issue May 22, 2023
Summary:
Fixes facebook#36036

The problem was in `ReactViewBackgroundDrawable.java` that was not accounting for adjacent borders that add width set to 0.

## Changelog

[Android] [Fixed] - Fix border rendering issue when bottom borders has no width

Pull Request resolved: facebook#36129

Test Plan:
| Previously | Now with the fix  |
| --------------- | --------------- |
| <img width="417" alt="image" src="https://user-images.githubusercontent.com/25725586/218149384-00e2145c-3c84-4590-87be-3258574489e5.png"> | <img width="414" alt="image" src="https://user-images.githubusercontent.com/25725586/218148215-a8d37158-0feb-47ae-874b-cba2f422d792.png">  |

Reviewed By: cipolleschi

Differential Revision: D43303228

Pulled By: javache

fbshipit-source-id: cf9d30fe12a5740d9ee8974a66904fd0850e7606
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants