ui-development
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUI Development
UI开发
Build user interfaces with the Redpanda UI Registry.
使用Redpanda UI Registry构建用户界面。
Activation Conditions
激活条件
- Building/creating UI components or pages
- Keywords: "design system", "ui", "frontend", "registry", "component"
- Modifying existing registry components
- 构建/创建UI组件或页面
- 关键词:“设计系统”、“ui”、“前端”、“registry”、“component”
- 修改现有registry组件
Quick Reference
快速参考
| Action | Rule |
|---|---|
| Use components | |
| Add spacing | |
| Customize look | |
| Use icons | |
| 操作 | 规则 |
|---|---|
| 使用组件 | |
| 添加间距 | |
| 自定义外观 | |
| 使用图标 | |
Workflow
工作流程
1. Fetch Documentation
1. 获取文档
FIRST: Use MCP tool mcp__redpanda-ui__search-docs or mcp__redpanda-ui__get_componentFIRST: Use MCP tool mcp__redpanda-ui__search-docs or mcp__redpanda-ui__get_component2. Check Existing Components
2. 检查现有组件
bash
ls src/components/redpanda-ui/bash
ls src/components/redpanda-ui/Critical Rules
关键规则
ALWAYS
始终遵循
- Use Registry components from
src/components/redpanda-ui/ - Call as first action before writing UI code
mcp__redpanda-ui__get_component - Install components via CLI
- 使用中的Registry组件
src/components/redpanda-ui/ - 在编写UI代码前,首先调用
mcp__redpanda-ui__get_component - 通过CLI安装组件
NEVER
禁止操作
- Use (deprecated) - see no-legacy
@redpanda-data/ui - Copy/paste registry source (install via CLI)
- Install external UI libraries without user request
- Use inline prop on registry components
style - Add margin directly to registry components
className
- 使用(已废弃)——详见no-legacy
@redpanda-data/ui - 复制粘贴registry源代码(通过CLI安装)
- 未经用户请求安装外部UI库
- 在registry组件上使用内联属性
style - 直接为registry组件添加margin
className
WHEN MODIFYING REGISTRY COMPONENTS
当修改Registry组件时
If editing files in :
src/components/redpanda-ui/- Document the change in a comment with
// UPSTREAM: <reason> - Keep changes minimal and backwards-compatible
- Track for eventual contribution to upstream registry
如果编辑中的文件:
src/components/redpanda-ui/- 在注释中用记录变更
// UPSTREAM: <原因> - 保持变更最小且向后兼容
- 跟踪变更以便最终贡献给上游registry
Rules
规则
See directory for detailed guidance.
rules/详见目录获取详细指导。
rules/