patternfly / patternfly/patternfly-react

Bug - ModalFooter - Wrapping a Button in a ModalFooter with a Tooltip changes margins

Aperta
#12,534 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
862
Fork
392
Merge medio
4g 8h
PR unite (30g)
9

Descrizione

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:

Image

With the Tooltip:

Image

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Individua gli stili di spaziatura di ModalFooter e le implementazioni dei componenti Button e Tooltip. Riproduci il layout sia con un button annidato direttamente sia con un button racchiuso in un Tooltip, quindi esamina i test pertinenti dei componenti. Il lavoro è completato quando entrambe le disposizioni mantengono la spaziatura prevista senza che il button racchiuso sposti il button adiacente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Specificata chiaramente
Idoneità per principianti
68/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.