cloudfour / cloudfour/cloudfour.com-patterns
Add an Error pattern to help with required component props
- Lingua principale
- SCSS
- Stelle
- 26
- Fork
- 3
- Merge medio
- 19h 32m
- PR unite (30g)
- 81
Descrizione
This is [an idea](https://github.com/cloudfour/cloudfour.com-patterns/pull/1689#issuecomment-1080986815) @calebeby came up with as a way to help make sure required component props are not accidentally missed when using a given component.
> Maybe you could do something with [defined](https://twig.symfony.com/doc/3.x/tests/defined.html)? Maybe render a message instead of the component if a given prop is not defined? 🤔
> Oh yeah that might be helpful. IDK if it's worth it, but we could probably make a error pattern that is very visible/flashy and then go through all our patterns and make them render the error pattern if any of their required props are missing
It may not be a higher priority, but would be helpful throughout the implementation of the components.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Esamina il test Twig `defined` proposto e i pattern dei componenti esistenti per determinare come vengono identificate le props obbligatorie. Il lavoro è completato quando esiste un pattern Error ovvio e altamente visibile e i pattern interessati lo renderizzano quando mancano props obbligatorie; l’issue non indica file o test, quindi è necessario analizzare l’ambito dell’implementazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- design, frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100