cloudfour / cloudfour/cloudfour.com-patterns

Add an Error pattern to help with required component props

オープン
#1,690 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
:construction_worker: dev
主要言語
SCSS
スター
26
フォーク
3
平均マージ
19時間 32分
マージ済み PR(30日)
81

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

提案されている Twig の `defined` テストと既存のコンポーネントパターンを確認し、必須 props がどのように識別されるかを判断します。明確で非常に目立つ Error パターンが存在し、必須 props が不足している場合に影響を受けるパターンがそれを render すれば完了です。issue ではファイルやテストが指定されていないため、実装範囲を調査する必要があります。

索引モデルが issue の本文から書いたものです。

評価

領域
design, frontend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。