From 7260f4cf649021024241a7b67979a6bf0e674cb3 Mon Sep 17 00:00:00 2001 From: Yichen Jiang Date: Thu, 20 Aug 2026 16:58:41 +0800 Subject: [PATCH] fix(web): cap the answer field at six text lines in both variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The card-wide `border-box` reached `.fieldMirror`, so the growth cap counted text plus padding. The inline variant carries none and landed on the declared line count, while the optionless variant's 16px inset spent two thirds of a line and delivered its last one as an 8px sliver. The e2e measured only the inline shape, so nothing caught the drift. The mirror now takes `box-sizing: content-box`, which states the cap in the units it is written in, and the cap moves to six lines. The e2e asserts whole text lines rather than a box height, and covers the optionless shape — asked straight through the user-questions seam, since a layout metric needs no model round — including that the reserved empty field is fully covered by its own control. --- ...-multiline-question-answer-field.i18n.yaml | 4 +- ...6-08-20-multiline-question-answer-field.md | 6 +- ...8-20-multiline-question-answer-field.zh.md | 6 +- apps/web/tests/question-composer.e2e.ts | 80 +++++++++++++++++-- .../client/ui-user-questions/README.i18n.yaml | 4 +- packages/client/ui-user-questions/README.md | 2 +- .../client/ui-user-questions/README.zh.md | 2 +- .../src/client/QuestionComposer.module.css | 12 ++- 8 files changed, 97 insertions(+), 19 deletions(-) diff --git a/.agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.i18n.yaml b/.agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.i18n.yaml index 2040f0c481..13aaf1b69d 100644 --- a/.agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.i18n.yaml +++ b/.agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write .agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.md -2026-08-20-multiline-question-answer-field.md: dbe146f1cd56b0f757784283269ba5061c425366 -2026-08-20-multiline-question-answer-field.zh.md: 7adb5bb37bf4393a5be21f1dc56b2be46fbfe9cb +2026-08-20-multiline-question-answer-field.md: 5e411d6728205ce1b72ef8355bbf2493f28873eb +2026-08-20-multiline-question-answer-field.zh.md: 6b98f017bbee2e8d89810c5b193b3707c85d1e95 diff --git a/.agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.md b/.agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.md index dbe146f1cd..5e411d6728 100644 --- a/.agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.md +++ b/.agents/notes/implemented/feature/2026-08-20-multiline-question-answer-field.md @@ -16,7 +16,7 @@ Both question shapes answer into one `AnswerField`: a `