patternfly / patternfly/patternfly-react
Checkbox/Radio - allow flow content as body
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 862
- Forks
- 392
- Merge medio
- 4 d 8 h
- PR fusionados (30 d)
- 9
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con los componentes Checkbox y Radio e inspecciona cómo se envuelve su prop body, incluido el comportamiento de isLabelWrapped mencionado en el issue. Determina si se puede admitir flow content sin romper el comportamiento existente de label; se considera terminado cuando ambos componentes aceptan el contenido previsto o la documentación de Checkbox indica claramente que el contenido de body debe ser phrasing content.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100