From cdc697749c19bacbed5010aee09d330ead4c005b Mon Sep 17 00:00:00 2001 From: amosblomqvist Date: Sun, 13 Sep 2026 01:57:17 +0300 Subject: [PATCH] Wave-5 refinement round 5 (owner): glyph-shaped SVG marks, vertically centered MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Option rows: items-start → items-center — the icon span's top-misalign came from the row alignment; now marks center across the row. - The literal ✓/✗ look (owner preference over the round-3 lucide set) re-rendered as hand-rolled SVG with thick rounded strokes (strokeWidth 3, round caps/joins) — the glyph shape, as a true vector, sized like the row text. Test pins updated to data-mark=check|x. --- components/answered-card.tsx | 29 +++++++++++++++++++++-------- tests/render-cards.test.tsx | 6 +++--- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/components/answered-card.tsx b/components/answered-card.tsx index 33ba81a..fe31c10 100644 --- a/components/answered-card.tsx +++ b/components/answered-card.tsx @@ -1,6 +1,5 @@ "use client"; -import { CheckIcon, XIcon } from "lucide-react"; import { cn } from "@/lib/utils"; import { MessageResponse } from "@/components/ai-elements/message"; import type { QuestionAnswerData } from "@/src/core"; @@ -51,7 +50,7 @@ export function AnsweredCard({ answer }: { answer: QuestionAnswerData }) {
{isQuiz && ( - // SVG icons, not glyphs — exactly one text-size box (size-4), - // vertically centered in the flex row (owner). + // Hand-rolled SVG in the ✓/✗ GLYPH look (thick rounded strokes — + // owner prefers that shape but as vectors, round 5). Sized like + // the row text, centered (row is items-center). - {key && } - {sel && !key && } + {(sel && key) || (!sel && key) ? ( + + + + ) : ( + sel && + !key && ( + + + + ) + )} )} @@ -86,7 +99,7 @@ export function AnsweredCard({ answer }: { answer: QuestionAnswerData }) { {answer.other && (
“{answer.other}”
diff --git a/tests/render-cards.test.tsx b/tests/render-cards.test.tsx index 5816df9..db154c7 100644 --- a/tests/render-cards.test.tsx +++ b/tests/render-cards.test.tsx @@ -168,8 +168,8 @@ describe("render smoke tests", () => { const html = renderToStaticMarkup(); assert.match(html, /incorrect/); assert.match(html, /innermost/, "explanation renders post-answer"); - // Vector marks (lucide SVG) — not glyphs — sized like the row text (owner). - assert.ok(html.includes("lucide-check") && html.includes("lucide-x")); + // Glyph-shaped SVG marks (owner preference) — pinned via data-mark. + assert.ok(html.includes('data-mark="check"') && html.includes('data-mark="x"')); }); it("AnsweredCard renders the learner's own Other answer AS an option row", () => { @@ -214,7 +214,7 @@ describe("render smoke tests", () => { }; const answer = buildAnswer(qd, { values: ["Somewhat"] }); const html = renderToStaticMarkup(); - assert.ok(!html.includes("incorrect") && !html.includes("lucide-x"), "ask answers never get quiz grading UI"); + assert.ok(!html.includes("incorrect") && !html.includes('data-mark="x"'), "ask answers never get quiz grading UI"); assert.match(html, /Somewhat/); });