Repository navigation
docs: 统一组件库规范为简体中文并建立 ui-patterns 模式库 - #43
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd6c416413
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| 弹窗内的表单统一遵守以下定量规则,调用方不得自行指定像素宽度或标签字号: | ||
|
|
||
| 1. **所有表单弹窗统一使用 `md`(448px)宽度档**:无论是几个短字段(重命名、添加设备)、8 个字段的长表单,还是带多行自由文本的表单(如问题反馈),一律使用 `DialogPanel width="md"`(448px);`FormDialogShell` 默认同样对齐到 `sm:max-w-md`(448px)。在 448px 宽度下,`Textarea` 每行仍可容纳约 28 个汉字,而 512px(`lg`)与周围其他表单并排时会显得松散拉长。 |
There was a problem hiding this comment.
Align the prescribed dialog widths with the shipped components
Consumers following this new mandatory rule cannot obtain the documented sizing through the stated APIs: src/components/dialog/DialogPanel.vue supports only lg through 4xl, and its WIDTH map has no md entry, while src/components/form-dialog-shell/index.vue still defaults maxWidthClass to sm:max-w-106.25 (425px), not 448px. Thus the canonical example passes an unsupported width and the recommended shortcut produces a different width. Add the corresponding component support and default change before prescribing this contract, or document the currently supported sizing.
Useful? React with 👍 / 👎.
Summary
将
@felinic/ui的设计契约、组件原语字典与跨组件场景规范统一整理为正交的三层简体中文文档体系,并与 Memoh 主仓.agents/skills/memoh-frontend-rules/完成职责对齐,清理过时或重复的旧文档:AGENTS.md与showcase/AGENTS.md):AGENTS.md为简体中文,聚焦底层 Token、CSS 四个覆盖平面、三条视觉铁律、颜色与 5 档零色度交互叠色梯、三态选中区分、圆角/三类边框/浮层阴影/5 级 z 梯、随根字号rem缩放、指针与动效档位(已包含近期合入的<Textarea rest="bare" surface="brand-tint">与<InfoHint>14px 规范)。showcase/AGENTS.md为简体中文,补充Patterns页面与skills/ui-patterns/的对应关系及浮层非受控铁律。skills/ui-owners/SKILL.md):@felinic/ui直接导入并标注[稳定]/[弃用中]状态,涵盖常用原子选型(含BadgeCount四色调、InfoHint、CodePanel/CopyButton)、页面结构、卡片内行、表单字段、加载四级阶梯、弹窗外壳、选型速查表与 7 类保留手写边界(宿主apps/web私有的页面局部原语迁回主仓memoh-frontend-rules)。skills/ui-patterns/):skills/ui-patterns/SKILL.md路由入口及references/下 6 篇带精确行号目录的中文规范:forms.md(含对话框表单标准)、saving-and-notifications.md、loading-and-empty-states.md、progressive-disclosure.md、layout-and-navigation.md、degraded-and-destructive.md。DESIGN.md;memoh-frontend-rules与组件库skills/ui-patterns/完整拆分接管的skills/web/目录。Related
Validation
skills/ui-patterns/references/*.md目录行号索引经脚本逐项校验 100% 匹配。scripts/check-ui-contract.mjs检查通过。Human QA