Snackbar can display wrong message during hiding animation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Start at the Snackbar component and inspect how AccessCodeTable and other consumers couple message with isVisible. Trace the hiding animation and the proposed null-to-non-null transition, then verify that the old message remains visible while hiding and that a rapid new message aborts the animation without showing the default message.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
The snackbar component uses the message: string prop to determine what to display and the isVisible: boolean prop to determine if it should be visible.
Some components that use the Snackbar component coupled these two props so that isVisible becomes false at the same time as message goes back to the default messaging. (like the AccessCodeTable used to)
isVisible switching from true to false triggers the hiding animation, if the message prop changes to the default message at the same time then the default message gets displayed for the duration of the hiding animation.
Potential solution
The snackbar does not need that many props imo, we could change message: string to message: string | null and get rid of the isVisible prop.
The parent component would simply set the message to whatever it wants to display then nullify it when it wants to hide it. The snackbar would keep its own messageToDisplay: string state that does not get updated when the given message prop is null
We would need to make sure that setting the message to null then to a non-null value in quick succession properly aborts the hiding animation
- Lingua principale
- TypeScript
- Stelle
- 9
- Fork
- 2
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di seamapi/react
-
bug seam components
Difficoltà 3/5 1-2 giorni Idoneità per principianti 20/100
-
seam components
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
-
seam components
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
seam components
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
-
seam components
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di seamapi/react
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelcontextprotocol/inspector#2458 · 1 commento ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
carbon-design-system/ibm-products#9907 ·