From bfb4991234b108d31791fb3fbdd10830dbf73068 Mon Sep 17 00:00:00 2001 From: Nathnael Date: Thu, 30 Jul 2026 13:08:51 +0000 Subject: [PATCH] fix: support widget peak and onboarding wizard responsivness --- .../portal/src/components/AppLayout.tsx | 3 + .../onboarding/OnboardingWizardDialog.tsx | 12 +++- .../src/features/support/SupportWidget.tsx | 66 ++++++++++--------- 3 files changed, 48 insertions(+), 33 deletions(-) diff --git a/apps/edr-freight-web/portal/src/components/AppLayout.tsx b/apps/edr-freight-web/portal/src/components/AppLayout.tsx index 411c00ce0..49a144a53 100644 --- a/apps/edr-freight-web/portal/src/components/AppLayout.tsx +++ b/apps/edr-freight-web/portal/src/components/AppLayout.tsx @@ -883,6 +883,9 @@ export function AppLayout({ {children} diff --git a/apps/edr-freight-web/portal/src/components/onboarding/OnboardingWizardDialog.tsx b/apps/edr-freight-web/portal/src/components/onboarding/OnboardingWizardDialog.tsx index a1d8a0431..466307fe9 100644 --- a/apps/edr-freight-web/portal/src/components/onboarding/OnboardingWizardDialog.tsx +++ b/apps/edr-freight-web/portal/src/components/onboarding/OnboardingWizardDialog.tsx @@ -8,6 +8,7 @@ import { Text, Title, } from "@mantine/core"; +import { useMediaQuery } from "@mantine/hooks"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { ArrowRight, @@ -127,6 +128,7 @@ export default function OnboardingWizardDialog({ }: OnboardingWizardDialogProps) { const queryClient = useQueryClient(); const { user, company, onboardingStep, onboardingCompleted } = useAuth(); + const isMobile = useMediaQuery("(max-width: 48em)"); const existingProfiles = company?.company?.companyProfiles ?? []; const companyAlreadyStarted = Boolean(company?.company?.id); @@ -409,7 +411,9 @@ export default function OnboardingWizardDialog({ ceiling = Math.min(ceiling, FORM_STEPS.indexOf("documents")); if (poaIncomplete) ceiling = Math.min(ceiling, FORM_STEPS.indexOf("poa")); const effectiveResumeStep: FormStep = - FORM_STEPS[Math.min(Math.max(FORM_STEPS.indexOf(resumeFormStep), 0), ceiling)]; + FORM_STEPS[ + Math.min(Math.max(FORM_STEPS.indexOf(resumeFormStep), 0), ceiling) + ]; const formProps = { documentSettingCode: resolvedDocumentSettingCode, @@ -450,9 +454,10 @@ export default function OnboardingWizardDialog({ withCloseButton={!completed} closeOnClickOutside={false} closeOnEscape={!completed} + fullScreen={isMobile} size={1440} radius="lg" - padding="xl" + padding={isMobile ? "md" : "xl"} centered keepMounted scrollAreaComponent={ScrollArea.Autosize} @@ -464,6 +469,9 @@ export default function OnboardingWizardDialog({ title: { flex: 1, }, + body: isMobile + ? { paddingBottom: "calc(100px + env(safe-area-inset-bottom))" } + : undefined, }} title={ completed ? null : ( diff --git a/apps/edr-freight-web/portal/src/features/support/SupportWidget.tsx b/apps/edr-freight-web/portal/src/features/support/SupportWidget.tsx index 3c06f2366..2e9f9c10e 100644 --- a/apps/edr-freight-web/portal/src/features/support/SupportWidget.tsx +++ b/apps/edr-freight-web/portal/src/features/support/SupportWidget.tsx @@ -41,7 +41,7 @@ export function SupportWidget() { if (!isAuthenticated) return null; return ( - + {(styles) => (
@@ -53,40 +53,44 @@ export function SupportWidget() { {(styles) => (
- 9 ? "9+" : unread} - size={20} - offset={8} - color="red" - disabled={unread === 0} - processing - withBorder - > - - + + +
)}