TextInput without a label is invisible while it is empty and unfocused
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 82/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react-native, typescript
- 領域
- frontend
調査の方向性
src/components/TextInput/hooks.ts と TextInput.tsx:401 から始めます。ここでは animatedContainerStyle がネイティブ入力ラッパーに適用されています。ラベルの有無によって不透明度がどう変わるかを確認し、ラベルのない、空でフォーカスされていない TextInput のテストを追加または調整します。ラベルなしの入力でプレースホルダーが表示され、ラベル付きの入力ではフローティングラベルの動作が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Current behaviour
A TextInput with no label is invisible while it is empty and unfocused: its input, its placeholder and any prefix or suffix have opacity 0, so only the outline shows until the field is focused. The wrapper around the native input takes the label float opacity (animatedContainerStyle in src/components/TextInput/hooks.ts, applied at TextInput.tsx:401) whether or not there is a label, and that value is 0 while the field is empty and unfocused. In 5.x the placeholder was visible.
Expected behaviour
A TextInput without a label shows its input and placeholder at full opacity at all times. Only a TextInput with a label hides the input while the label rests in its place.
How to reproduce?
const [query, setQuery] = React.useState('');
<TextInput
variant="outlined"
placeholder="Search for plugins..."
value={query}
onChangeText={setQuery}
/>
- Render it: only the outline shows, with no placeholder.
- In a test,
expect(screen.getByPlaceholderText('Search for plugins...')).toBeVisible()fails with "Received element is not visible".
What have you tried so far?
Applying animatedContainerStyle only when label is set keeps the floating label behaviour and shows the placeholder.
Your Environment
| software | version |
|---|---|
| react-native | 0.88.1 |
| react-native-paper | 6.0.0-alpha.1 and main at c8d8bab |
- 主要言語
- TypeScript
- スター
- 14.5k
- フォーク
- 2.3k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 22
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/react-native-paper のほかの issue
-
feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
callstack/react-native-paper#5189 ·
メンテナーはふだん 1 日以内に返信
-
Accessibility example app good first task
難易度 1/5 1〜3時間 初心者へのやさしさ 86/100
callstack/react-native-paper#5182 ·
メンテナーはふだん 1 日以内に返信
-
Accessibility bug web
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
callstack/react-native-paper#5180 ·
メンテナーはふだん 1 日以内に返信
-
Chip: accessibilityState passed by caller is discarded; aria-checked is never forwarded to the real rendered node対応中かも @bhumikabiyani が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
callstack/react-native-paper#5146 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Tooltip: onPress event object is not propagated to parent component on native対応中かも @aliyilmaztech が 86 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
callstack/react-native-paper#5003 ·
メンテナーはふだん 1 日以内に返信
callstack/react-native-paper の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
pending close triaging
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode#62582 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
live-codes/livecodes#1079 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add: ESP 2 ROオープンapproved check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信