Skip to content

fix: 多行输入框与下拉框默认字号字重对齐单行输入框 - #40

Draft
qqqqqf-q wants to merge 2 commits into
mainfrom
fix/memoh-232-textarea-type-scale
Draft

qqqqqf-q wants to merge 2 commits into
mainfrom
fix/memoh-232-textarea-type-scale

Conversation

@qqqqqf-q

Copy link
Copy Markdown
Member

Summary

表单里三种字段控件的默认字号、字重不一致:单行输入框(Input)是 14px / 450,多行输入框(Textarea)默认 13px / 360,下拉框(Select 触发器)默认 13px / 360。同一个表单里 Subject、Details、下拉框的值与 placeholder 三种观感,并排时很明显。

经 UI 负责人确认以 Input 为准,把另外两个的默认尺寸对齐到 14px / 450:

  • Textarea:default 档 text-label → text-control font-medium。sm(目前无调用方)与 lg(本来就是 14px)不动。
  • selectTriggerClass:data-[size=default] 改为 text-control font-medium。sm / lg 档、下拉展开后的选项(menu item)不动。
  • style.css 字重角色说明:原文写「input text / placeholder 用 360」,与 Input 实际(450)不符;改为输入框内文字与 placeholder 归 font-medium。

placeholder 不单独设字号,跟随所在控件,所以三个控件的 placeholder 也随之一致。

影响面

  • 所有默认尺寸的 Textarea 与 Select 都会变成 14px / 450;共用 selectTriggerClass 的 DateRangePicker、宿主侧 Combobox 同样受影响。
  • 调用方显式写了字号 class 的(如等宽编辑框的 text-xs)不受影响。
  • 只在 Memoh 的反馈表单里实测过,其他页面未逐页检查。

Related

  • Linear:MEMOH-232
  • 起因:Memoh Cloud 反馈表单加 Bot 选择器(MEM-80)走查时发现。合并后需在 Memoh 更新 packages/ui 指针。

Validation

  • Memoh 侧 scripts/check-ui-contract.mjs 通过。
  • 在 Memoh Cloud 本地开发环境的反馈对话框里用浏览器量取计算样式:改动前 Subject 14/450、Details 13/360、下拉框 13/360;改动后三者均为 14px / 450、行高 20px;字段标题 12/450 不变。
  • 未单独跑本仓库 vue-tsc(改动仅为 class 字符串与注释)。人工 QA 未进行。

Screenshots

改动前(Details 与下拉框的值比 Subject 小一号、细一档):

改动前

改动后(三个字段一致):

改动后

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-10-27T02:42:09.415209Z 0521c23 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.

@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: 0521c23504

ℹ️ 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".

Comment thread src/style.css
Comment on lines +2037 to +2039
· font-medium (450) → labels, button text, badges, small/inline titles, emphasis,
and text typed into Input / Textarea (placeholder included)
· font-normal (360) → body, descriptions, read-only field values */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update the typography contract alongside the new weight mapping

The new default field-weight mapping is documented only in this CSS comment, while AGENTS.md’s Typography section still explicitly assigns field values and placeholders to font-normal. This leaves the repository’s authoritative design contract contradicting the newly changed Textarea and Select defaults, so subsequent component work following that contract would reintroduce the inconsistency this commit fixes. Update the contract to document the default-size field mapping and its intentional size exceptions; AGENTS.md requires cross-cutting decisions to be recorded there.

AGENTS.md reference: AGENTS.md:L868-L871

Useful? React with 👍 / 👎.

@qqqqqf-q
qqqqqf-q marked this pull request as draft October 27, 2026 11:04
@qqqqqf-q

Copy link
Copy Markdown
Member Author

转回草稿,暂不合并。

走查发现本 PR 是半个修复:Details 与 Subject 对齐了,但下拉框收起时改为 450 后,与展开后的选项(菜单项 360、字间距 -0.14px、行高 18px)又出现新的不一致。

根因是 Input / Textarea / SelectTrigger / SelectItem 各自写死字号、字重、字间距、行高,没有一个共享的「控件文字」档位。计划在组件库整体改造时统一处理(需先定该档位字重用 360 还是 450),详见 MEMOH-232。

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