mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
Let the setup flow's action rows wrap, and measure headroom per word
At 390 px with labels a third longer the action row pushed "Confirm and continue" past the viewport; both rows now wrap. The string-headroom sweep lengthens every word by 30% rather than hanging the whole surplus on the last one — that manufactured an unbreakable run no locale produces — leaves screen-reader-only boxes alone, and accepts a select value's ellipsis, which is the primitive's design app-wide.
This commit is contained in:
1 parent
d91a8dfebe
commit
5c5a592177
4 files changed
+28
-10
No files matched your search
@@ -226,7 +226,7 @@ export function BaselineForm({
|
||||
/>
|
||||
|
||||
<div
|
||||
className="flex items-center justify-between gap-2 pt-2"
|
||||
className="flex flex-wrap items-center justify-between gap-2 pt-2"
|
||||
data-slot="onboarding-step-actions"
|
||||
>
|
||||
{backHref ? (
|
||||
@@ -238,7 +238,7 @@ export function BaselineForm({
|
||||
) : (
|
||||
<span aria-hidden="true" />
|
||||
)}
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="ml-auto flex flex-wrap items-center justify-end gap-2">
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
|
||||
@@ -200,7 +200,7 @@ export function ConfirmScreen({ state }: { state: OnboardingStateDto }) {
|
||||
onCreated={() => void finish()}
|
||||
/>
|
||||
<p className="text-sm">{t("onboarding.flow.confirm.managedLater")}</p>
|
||||
<div className="flex items-center justify-between gap-2 pt-2">
|
||||
<div className="flex flex-wrap items-center justify-between gap-2 pt-2">
|
||||
{back ? (
|
||||
<Button asChild variant="ghost" className="min-h-11 min-w-11">
|
||||
<Link href={screenHref(back)} data-slot="onboarding-back">
|
||||
|
||||
@@ -35,7 +35,10 @@ export function StepActions({
|
||||
|
||||
return (
|
||||
<div
|
||||
className="flex items-center justify-between gap-2 pt-2"
|
||||
// `flex-wrap` on both rows: a locale whose labels run 30% longer must
|
||||
// drop the action group to its own line at 390 px, not push it past
|
||||
// the viewport (the string-headroom sweep measures exactly this).
|
||||
className="flex flex-wrap items-center justify-between gap-2 pt-2"
|
||||
data-slot="onboarding-step-actions"
|
||||
>
|
||||
{backHref ? (
|
||||
@@ -47,7 +50,7 @@ export function StepActions({
|
||||
) : (
|
||||
<span aria-hidden="true" />
|
||||
)}
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="ml-auto flex flex-wrap items-center justify-end gap-2">
|
||||
{onSkip ? (
|
||||
<Button
|
||||
type="button"
|
||||
|
||||
Reference in new issue
Block a user