[iOS] Ellipsis carries background from trimmed text
まだ誰も着手していません。
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
This issue happens on iOS only:
I tried to use nested text which has background, and could be wrapped with an ellipsis. Even the nested text doesn't show, the ellipsis has the background of nested text.
<Text numberOfLines={1} ellipsizeMode={'tail'}>Long text <Text style={{backgroundColor: 'red'}}>Nested text</Text></Text>
React Native Version
0.70.6
Output of npx react-native info
System:
OS: macOS 12.5.1
CPU: (10) arm64 Apple M1 Max
Memory: 548.38 MB / 64.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.19.2 - ~/.nix-profile/bin/yarn
npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
Watchman: 4.9.0 - /Users/shidong.lin/.nix-profile/bin/watchman
Managers:
CocoaPods: 1.11.0 - /Users/shidong.lin/.nix-profile/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 30, 31, 32
Build Tools: 30.0.3
System Images: android-31 | Google Play ARM 64 v8a, android-32 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.9862592
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.11 - /Users/shidong.lin/.nix-profile/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: https://github.com/react-native/archive/f56cf181afcd364122f94ac8609f9b3c7b0b1afb.tar.gz => 0.70.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
<Text numberOfLines={1}>Long text <Text style={{backgroundColor: 'red'}}>Nested text</Text></Text>
Just create a long text with colored nested text, check the behavior of ellipsis.
Snack, code example, screenshot, or link to a repository
<Text numberOfLines={1} ellipsizeMode={'tail'}>Long text <Text style={{backgroundColor: 'red'}}>Nested text</Text></Text>
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
iOS 上で、提供されている React Native の再現ケースから始めます。赤い背景と末尾の省略記号を持つ、1 行のネストされた Text です。iOS のテキスト描画および切り詰め処理の経路を追跡し、切り詰められたネストされたスタイルが省略記号に影響する理由を特定します。再現ケースが引き続き正しく切り詰められ、かつ省略記号が非表示のネストされたテキストの背景を持たなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ios, react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100