Add an Error pattern to help with required component props

未關閉
#1,690 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

已經有一個關聯 PR 被合併了。

  • #1937 來自 @AriannaChau —— 已合併

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
領域
design, frontend

研究方向

檢視提議的 Twig defined 測試和現有的元件模式,以判斷如何識別必要的 props。完成的標準是存在一個明顯且高度可見的 Error 模式,並且在缺少必要 props 時,受影響的模式會 render 它;issue 未指明檔案或測試,因此需要調查實作範圍。

由索引模型根據 Issue 內容生成。

描述

:construction_worker: dev

This is an idea @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? 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.

主要語言
SCSS
星號
26
分支
4
平均合併
20 小時 1 分鐘
30 天內合併 PR
87

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

cloudfour/cloudfour.com-patterns 的其他 Issue

查看 cloudfour/cloudfour.com-patterns 的全部 Issue

相似的 Issue

更多 Design Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。