patternfly / patternfly/patternfly-react
Checkbox/Radio - allow flow content as body
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 862
- Forks
- 392
- Ø Merge
- 4 T. 8 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
Is this a new component or an extension of an existing one?
Existing components, Checkbox and Radio.
Describe the feature
To allow flow content for their body prop. Currently it's wrapped in a span element, which only admits phrasing content.
Are there visuals for this feature? If applicable, please include examples for each state and for varying widths
I don't think so.
Any other information?
-
The
bodybeing wrapped in aspanwas requested in a review because the RadioisLabelWrappedprop. See https://github.com/patternfly/patternfly-react/pull/5559#pullrequestreview-617903386 -
I've created a
sillyweird example of a Checkbox using flow content in its body, just for illustrating a possible use case of a React node returning adiv. See https://codesandbox.io/s/weird-patternfly-checkbox-91mzqq or the screenshot uploaded belowClick to show/hide a screenshot of the output from the Codesanbox pasted above
-
If the change isn't possible beacuse the benefit does not pay off complicating the code for these components, at least it would be nice to mention in the documentation that the expected React.ReactNode must return phrasing content only
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den Checkbox- und Radio-Komponenten und untersuche, wie ihr body-Prop umschlossen wird, einschließlich des im Issue referenzierten isLabelWrapped-Verhaltens. Ermittle, ob flow content unterstützt werden kann, ohne das bestehende label-Verhalten zu beeinträchtigen; als abgeschlossen gilt dies, wenn beide Komponenten den vorgesehenen Inhalt akzeptieren oder die Checkbox-Dokumentation klar festlegt, dass body-Inhalt phrasing content sein muss.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100