[iOS] Strange gradient appears when using `borderTopLeftRadius` (or similar) inside a scaled `View`
オープン
まだ誰も着手していません。
API: Transforms
Issue: Author Provided Repro
Platform: iOS
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
See snack reproduction: https://snack.expo.dev/@whiteroseeducation/ios-bordertopleftradius-gradient-issue
The issue only appears on iOS devices.
When two conditions are met, you see weird gradients near the corners. These conditions are:
- The
Viewhas style which sets the border corners to different radius values, e.g. withborderTopLeftRadius. - The
Viewis nested in aViewwhich has a shrinking scale transform.
E.g.
<View
style={{
width: 400,
height: 400,
transform: [{ scale: 0.5 }],
}}>
<View
style={{
width: '100%',
height: '100%',
backgroundColor: 'white',
borderColor: 'navy',
borderWidth: 8,
borderTopLeftRadius: 40,
}}
/>
</View>
Steps to reproduce
- Click snack link above
- Run on an iOS device or simulator
- Observe that the first shape (labelled "The issue") has weird gradients in it, which aren't specified by its style
React Native Version
0.76.7
Affected Platforms
Runtime - iOS
Reproducer
https://snack.expo.dev/@whiteroseeducation/ios-bordertopleftradius-gradient-issue
Screenshots and Videos
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされた Snack の再現から始め、React Native 0.76.7 を使用して iOS デバイスまたはシミュレータで実行します。スケーリングされた外側の View と、borderTopLeftRadius を持つ内側の View を比較します。影響を受ける図形に、style に存在しないグラデーションが表示されなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ios, react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100