cloudfour / cloudfour/cloudfour.com-patterns
Add an Error pattern to help with required component props
- Vorherrschende Sprache
- SCSS
- Sterne
- 26
- Forks
- 3
- Ø Merge
- 19 Std. 32 Min.
- Gemergte PRs (30 T.)
- 81
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Überprüfe den vorgeschlagenen Twig-`defined`-Test und die bestehenden Komponenten-Patterns, um zu bestimmen, wie erforderliche Props identifiziert werden. Als abgeschlossen gilt die Aufgabe, wenn ein offensichtliches, gut sichtbares Error-Pattern existiert und betroffene Patterns es rendern, wenn erforderliche Props fehlen; das Issue nennt keine Dateien oder Tests, daher muss der Umfang der Implementierung untersucht werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- design, frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100