Allow Label to set button component without onClick
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Comienza por el componente Label y sus pruebas existentes; después, sigue cómo cambia el elemento renderizado cuando se proporciona onClick. Define la forma compatible de solicitar un botón sin onClick y verifica que Label renderice un botón nativo con el comportamiento de foco esperado, mientras el uso existente permanece sin cambios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the enhancement or change
Currently, in order for a clickable Label to render with the button element in the DOM is to pass an onClick handler to it. There may be use cases where an onClick isn't desired - one example being the new Canvas pattern in Chatbot where a clickable Label opens a Popover. In this case the Popover is passed the Label as a child (rather than using triggerRefs and the Label's onClick to dictate the Popover open state).
Allowing Label to set a button element could help in those sorts of scenarios, instead of needing to pass a triggerRef, onClick to Label, and onHidden to Popover (which may result in some funky focus behavior).
Is this request originating from a Red Hat product team? If so, which ones and is there any sort of deadline for this enhancement?
Any other information?
Not blocking as there is a workaround of setting role and tabindex on a normal Label, but it lacks some focus styles and it would be better for us to support this internally with native elements.
Jira Issue: PF-4637
- Lenguaje dominante
- TypeScript
- Estrellas
- 862
- Forks
- 392
- Merge medio
- 4 d 8 h
- PR fusionados (30 d)
- 9
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.
Más de patternfly/patternfly-react
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12651 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
patternfly/patternfly-react#12637 ·
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
patternfly/patternfly-react#12617 · 1 comentario ·
-
PF Team
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12610 · 1 comentario · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
patternfly/patternfly-react#12600 ·
Todos los issues de patternfly/patternfly-react
Issues similares
-
blocklist removal
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100