patternfly / patternfly/patternfly-react
Bug - ModalFooter - Wrapping a Button in a ModalFooter with a Tooltip changes margins
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
We have a button in a ModalFooter that might be disabled and then has a Tooltip to explain the reason. The Button has a wrong margin-inline-end style when it has a Tooltip.
Without theTooltip:
With the Tooltip:
You can see that the "Cancel" button has moved to the left a bit and is now touching the "Create and edit" button.
The code is something like this:
...
<ModalFooter>
<Button>Create and run</Button>
<Tooltip content={...}><Button isAriaDisabled>Create and edit</Button></Tooltip>
</ModalFooter>
There is some CSS somewhere that gives the Buttons in a ModalFooter a margin-inline-end value of 8px. This CSS however only applies to Buttons that are directly in a ModalFooter. It will be ignored for the Button wrapped in a Tooltip.
(Since the ModalFooter is a flex anyway, I would expect the button spacing to be handled by the column-gap of that, and not by margin manipulations, but maybe that doesn't work for some reason.)
Jira Issue: PF-4411
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
Localiza los estilos de espaciado de ModalFooter y las implementaciones de los componentes Button y Tooltip. Reproduce el diseño tanto con un botón anidado directamente como con un botón envuelto en un Tooltip y, después, revisa las pruebas relevantes de los componentes. Se considera terminado cuando ambas disposiciones conservan el espaciado previsto sin que el botón envuelto desplace al botón adyacente.
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
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 68/100