cloudfour / cloudfour/cloudfour.com-patterns

Add an Error pattern to help with required component props

未关闭
#1,690 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
:construction_worker: dev
主要语言
SCSS
星标
26
派生
3
平均合并
19 小时 32 分钟
30 天内合并 PR
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 摘要。