patternfly / patternfly/patternfly-react
Input Components - Simplify Interface by handling FormGroup internally
オープン
まだ誰も着手していません。
Breaking change :boom:
Pinned
- 主要言語
- TypeScript
- スター
- 862
- フォーク
- 392
- 平均マージ
- 4日 8時間
- マージ済み PR(30日)
- 9
説明
Labels and inputs in html are hooked together by ID.
<label for="username">Enter your username:</label>
<input id="username" />
In PF4 to get a label on an input requires a FormGroup.
<FormGroup
id="user-form-group"
fieldId="user"
label="User"
helperText="User help text"
isRequired
validated={error ? 'error' : undefined}
helperTextInvalid={error}
>
<TextInput
id="user"
type="text"
aria-describedby="user-form-group"
isRequired
validated={error ? 'error' : undefined}
placeholder="Enter user"
value={user}
onChange={onChange}
/>
</FormGroup>
It make for a streamlined developer experience if that logic could be hidden from the developer. On a input component, if a label is provided, then the component could handle all the logic internally.
<TextInput
id="user"
label="User"
helper="User help text"
type="text"
required
placeholder="Enter user"
value={user}
onChange={onChange}
error={error}
/>
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず既存の入力コンポーネントと FormGroup の実装を確認し、それらの現在の責務と公開 API を理解します。ラベル、IDs、ヘルパーテキスト、必須状態、バリデーション、エラーがどのように扱われているかを比較し、そのうえで、明示的な FormGroup なしでラベル付き入力が動作することを確認するために必要なコンポーネントの動作とテストを定義します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100