Skip to content

chore(shared): 删除零消费表单原语 FormField/Textarea/Checkbox/Radio,族文档如实化 - #2187

Merged
DeliciousBuding merged 1 commit into
masterfrom
chore/cleanup-round-42
Sep 1, 2026
Merged

chore(shared): 删除零消费表单原语 FormField/Textarea/Checkbox/Radio,族文档如实化#2187
DeliciousBuding merged 1 commit into
masterfrom
chore/cleanup-round-42

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

Summary

删除 shared/ui 表单族中零生产消费的 4 个原语(FormField/Textarea/Checkbox/Radio,共 16 文件 + barrel 8 行),把 ui-core.md 表单族段从「本族为表单输入的唯一实现」改写为如实状态并登记 adoption debt。#2154 前端遗留候选 A(round-38 探索取证)。先例:#2155 死 namespace、#2186 死组件族。

取证

  • 4 原语全仓(含 mobile-rn)零生产导入:仅自身 test/stories + Input.test.tsx 一个包装用例 + Input.stories.tsx 一个 story(均已改造)。
  • 同族实际被消费的只有 Input(web/desktop AuthPage)与 Switch(workbench SettingSwitch)。
  • 产品面仍有约 22 处裸 <input> + 1 处裸 <textarea>(AddContactModal / StartConversationModal / ProjectChromeViews 等)——[P2] 设计系统补全与文档漂移修复包(前端审计第二轮) #1827 建族时声称迁移 19 处,实际只落地 Input/Switch。

Scope

  • app/shared/src/ui/{FormField,Textarea,Checkbox,Radio}.{tsx,module.css,test.tsx,stories.tsx}(16 文件)
  • barrel 删 8 行;Input.test.tsx 删 1 用例;Input.stories.tsx InFormFieldWithLabel(原生 label);Input.tsx 注释去陈旧引用
  • docs/component-acceptance/ui-core.md 表单族段重写(头+段+删 4 原语验收行);docs/component-acceptance.md 索引同步

验证证据(本地)

  • shared + workbench typecheck ✅
  • shared vitest 全量 2726/2726 全绿(较基线 2749 -23 = 被删组件自身测试 + Input 的 FormField 用例)
  • 6 项 verifier + git diff --check

风险与后续

纯删除(唯一活引用已改造);回退 = revert。后续项(#2154 登记):22 裸 input + 1 裸 textarea 的 adoption——属产品/设计排期,不在本轮。

- 删 4 原语 × 4 文件(组件/module.css/test/stories,共 16 文件)+ barrel 8 行
- Input.test.tsx 删 FormField 包装用例;Input.stories.tsx InFormField → WithLabel(原生 label);Input.tsx 注释去陈旧引用
- ui-core.md 表单族段重写:头/段如实化(6 原语仅 Input/Switch 被采用),删 4 原语验收行,登记 22 裸 input + 1 裸 textarea adoption debt
- component-acceptance.md 索引同步
- #2154 前端遗留候选 A(round-38 探索取证);先例 #2155/#2186

Co-authored-by: Cursor <cursor@vectorcontrol.tech>
@DeliciousBuding
DeliciousBuding merged commit a91d071 into master Sep 1, 2026
40 checks passed
@DeliciousBuding
DeliciousBuding deleted the chore/cleanup-round-42 branch September 1, 2026 17:18
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