fix(flows): create-flow dialog was still clamped to 384px — override sm: variant

PR #129 added `max-w-3xl` to the create-flow DialogContent thinking
it would widen the modal. It was a no-op. shadcn's DialogContent has
`sm:max-w-sm` baked into its default classes, and Tailwind-merge
treats `max-w-*` (base) and `sm:max-w-*` (sm-prefixed) as different
variants — both survive, and at every real desktop breakpoint the
sm-scoped 384px wins.

So the modal stayed at 384px regardless. Template cards continued to
look squished because the dialog never actually grew.

Override at the sm: variant directly. Use 4xl (896px) — gives each of
the three template cards roughly 270px of breathing room, enough for
the description to wrap to 4-5 lines instead of 10+.

Left a comment at the call site so the next person doesn't repeat
the same mistake.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Arnas Donauskas 2026-05-22 16:25:22 +03:00
parent 6522b9b485
commit df6c8e34ac
No known key found for this signature in database

View File

@ -245,7 +245,11 @@ export default function FlowsPage() {
)}
<Dialog open={createOpen} onOpenChange={setCreateOpen}>
<DialogContent className="max-w-3xl bg-slate-900 text-slate-100">
{/* `sm:max-w-4xl` not `max-w-4xl` — shadcn's DialogContent has
`sm:max-w-sm` baked into its default classes. Without the
sm: prefix our override applies at base only and the
sm-scoped 384px wins at every real desktop breakpoint. */}
<DialogContent className="sm:max-w-4xl bg-slate-900 text-slate-100">
<DialogHeader>
<DialogTitle>Create a new flow</DialogTitle>
<DialogDescription className="text-slate-400">