[Android] Incorrect border coloration with sufficiently high border radius
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
It seems Android has trouble displaying the correct border colors when borderRadius exceeds a certain value.
The use case here is having an easily reusable style or component which can be circular regardless of the size; most easily achieved by setting a high border radius. Given that this works as intended on iOS and web, I assume it is a supported use case. If border radius is not intended to exceed a certain calculable value it should be noted in the docs somewhere but I was unable to find any relevant information. Alternatively, It might make sense to clamp the value in the RN core code but I'll leave that to the maintainers to decide.
Based on my testing this issue only impacts Android as you can see in the screenshots from the snack I've linked below.
Web:
iOS:
Android:
I've seen some other recent issues around border radius on Android but none of them seem to be directly related to this particular behavior based on my understanding so apologies if this is a duplicate, obviously feel free to close/merge in that case.
React Native Version
0.72.7
Output of npx react-native info
System:
OS: macOS 13.6
CPU: (10) arm64 Apple M1 Max
Memory: 2.82 GB / 64.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.16.0
path: ~/.nvm/versions/node/v18.16.0/bin/node
Yarn:
version: 1.22.19
path: ~/.nvm/versions/node/v18.16.0/bin/yarn
npm:
version: 9.5.1
path: ~/.nvm/versions/node/v18.16.0/bin/npm
Watchman:
version: 2023.10.23.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.2
path: /opt/homebrew/opt/ruby/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- watchOS 10.0
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9971841
Xcode:
version: 15.0.1/15A507
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.2
path: /usr/bin/javac
Ruby:
version: 3.2.2
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.7
wanted: 0.72.7
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
- Create a
<View />. - Give the view different colors for each of
borderTopColor,borderBottomColor,borderRightColor, andborderLeftColor - Set the view's
heightandwidthto any number,n - Set the view's
borderRadiusto any number greater thann/2 - Observe the coloration of the border. Optionally, you can change the
borderRadiusvalue to see how the colors change with different values.
Snack, screenshot, or link to a repository
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、リンクされた Snack を実行し、異なる境界線の色と、View のサイズの半分より大きい borderRadius を使って Android の動作を再現します。次に、Android における React Native の border-rendering のエントリポイントを追跡し、その後 iOS と web のスクリーンショットと照合して結果を確認します。報告された radius のケースで Android の境界線の色が正しいままであれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- android, react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100