Wave-5 refinement round 3 (owner): SVG answer marks + uniform input sizes
- ✓/✗ in the answered card: replaced literal glyphs with lucide CheckIcon/ XIcon (strokeWidth 2.5) inside a fixed size-4 flex box — text elements never carried the right size/vertical alignment, vectors do. Test pins updated (lucide-check/lucide-x classes). - All user-typed INPUT text now matches markdown output: lh-prose class replaces the earlier font-prose (family-only) band-aid on the composer, question-dock text/thinking/Other fields, home topic input, model search box, and answered-card 'your thinking'/free-text records. lh-prose sets family+size (16.5px) so placeholders inherit correctly.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"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";
|
||||
@@ -58,20 +59,19 @@ 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).
|
||||
<span
|
||||
aria-hidden
|
||||
className={cn(
|
||||
// Same visual size as the row text, vertically centered,
|
||||
// colored like the verdict chips (owner).
|
||||
"flex size-4 shrink-0 items-center justify-center text-sm font-semibold leading-none",
|
||||
"flex size-4 shrink-0 items-center justify-center",
|
||||
sel && key && "text-green-500",
|
||||
sel && !key && "text-red-500",
|
||||
!sel && key && "text-green-500",
|
||||
)}
|
||||
>
|
||||
{sel && key && "✓"}
|
||||
{sel && !key && "✗"}
|
||||
{!sel && key && "✓"}
|
||||
{key && <CheckIcon className="size-4" strokeWidth={2.5} />}
|
||||
{sel && !key && <XIcon className="size-4" strokeWidth={2.5} />}
|
||||
</span>
|
||||
)}
|
||||
<span className={cn(!sel && "text-muted-foreground")}>
|
||||
@@ -94,7 +94,7 @@ export function AnsweredCard({ answer }: { answer: QuestionAnswerData }) {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{answer.text && <div className="font-prose mt-2 whitespace-pre-wrap text-sm">“{answer.text}”</div>}
|
||||
{answer.text && <div className="lh-prose mt-2 whitespace-pre-wrap">“{answer.text}”</div>}
|
||||
{answer.dontKnow && isQuiz && <div className="mt-2 text-sm text-muted-foreground">Answered “I don't know”.</div>}
|
||||
|
||||
{answer.note && (
|
||||
@@ -102,7 +102,7 @@ export function AnsweredCard({ answer }: { answer: QuestionAnswerData }) {
|
||||
<span className="mb-0.5 block text-xxs font-medium uppercase tracking-wide text-muted-foreground">
|
||||
Your thinking
|
||||
</span>
|
||||
<span className="font-prose block whitespace-pre-wrap text-sm text-foreground/90">{answer.note}</span>
|
||||
<span className="lh-prose block whitespace-pre-wrap text-foreground/90">{answer.note}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user