fix(onboarding): use consistent card width across all integration phases

The select, configure, and done phases each had different hardcoded
widths causing a jarring layout shift when transitioning between them.
Unify all three to a single CARD_WIDTH constant.
This commit is contained in:
Thomas Camlong committed 2026-05-14 18:08:59 +02:00
1 parent c3523adfd5
commit 16091ffd02
1 file changed
+5 -3
@@ -16,6 +16,8 @@ import { IntegrationMultiSelectGrid } from "~/components/integration/integration
type Phase = "select" | "configure" | "done";
const CARD_WIDTH = 64 * 16;
export const InitIntegrations = () => {
const [phase, setPhase] = useState<Phase>("select");
const [selectedKinds, setSelectedKinds] = useState<IntegrationKind[]>([]);
@@ -55,7 +57,7 @@ export const InitIntegrations = () => {
if (phase === "done") {
return (
<Card w={64 * 8} maw="90vw" withBorder>
<Card w={CARD_WIDTH} maw="90vw" withBorder>
<Center py="xl">
<Stack align="center" gap="md">
<Loader size="lg" />
@@ -72,7 +74,7 @@ export const InitIntegrations = () => {
const progress = ((currentIndex + 1) / selectedKinds.length) * 100;
return (
<Card w={64 * 14} maw="90vw" withBorder>
<Card w={CARD_WIDTH} maw="90vw" withBorder>
<Stack>
<Stack gap="xs">
<Group gap="xs" justify="center">
@@ -99,7 +101,7 @@ export const InitIntegrations = () => {
}
return (
<Card w={64 * 16} maw="90vw" withBorder>
<Card w={CARD_WIDTH} maw="90vw" withBorder>
<Stack>
<Text>{t("description")}</Text>