8000 docs: 统一组件库规范为简体中文并建立 ui-patterns 模式库 by qqqqqf-q · Pull Request #43 · felinics/ui · GitHub
[go: up one dir, main page]

Skip to content

docs: 统一组件库规范为简体中文并建立 ui-patterns 模式库 - #43

Merged
qqqqqf-q merged 1 commit into
mainfrom
docs/memoh-244-ui-docs-and-patterns
Nov 3, 2026
Merged

qqqqqf-q merged 1 commit into
mainfrom
docs/memoh-244-ui-docs-and-patterns

Conversation

@qqqqqf-q
@qqqqqf-q qqqqqf-q commented Nov 3, 2026
Copy link
Copy Markdown
Member

Summary

将 @felinic/ui 的设计契约、组件原语字典与跨组件场景规范统一整理为正交的三层简体中文文档体系,并与 Memoh 主仓 .agents/skills/memoh-frontend-rules/ 完成职责对齐,清理过时或重复的旧文档:

  1. 基础契约(Foundations,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/ 的对应关系及浮层非受控铁律。
  2. 原子与布局原语字典(Components & Primitives,skills/ui-owners/SKILL.md):
    • 统一为简体中文,全部跨领域原语从 @felinic/ui 直接导入并标注 [稳定] / [弃用中] 状态,涵盖常用原子选型(含 BadgeCount 四色调、InfoHint、CodePanel / CopyButton)、页面结构、卡片内行、表单字段、加载四级阶梯、弹窗外壳、选型速查表与 7 类保留手写边界(宿主 apps/web 私有的页面局部原语迁回主仓 memoh-frontend-rules)。
  3. 跨组件场景规范库(UI Patterns,新建 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。
  4. 退役旧文档:
    • 删除过时且与现行 Token 契约冲突的 DESIGN.md;
    • 删除职责已由主仓 memoh-frontend-rules 与组件库 skills/ui-patterns/ 完整拆分接管的 skills/web/ 目录。

Related

Validation

  • 纯文档与 Agent skill 重构,无运行时代码或样式变更。
  • 全部 skills/ui-patterns/references/*.md 目录行号索引经脚本逐项校验 100% 匹配。
  • Memoh 主仓 scripts/check-ui-contract.mjs 检查通过。

Human QA

  • Human QA passed

@chatgpt-codex-connector
chatgpt-codex-connector Bot commented Nov 3, 2026 •
Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T13:48:12.411112Z fd6c416 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qqqqqf-q
qqqqqf-q merged commit 8be0fdd into main Nov 3, 2026
1 check passed
@qqqqqf-q
qqqqqf-q deleted the docs/memoh-244-ui-docs-and-patterns branch November 3, 2026 13:46
@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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`)与周围其他表单并排时会显得松散拉长。
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0