Skip to content

feat(frontend): upgrade dependencies and refactor Onboarding Progress Tracker #1262

Merged
emdevelopa merged 3 commits into
emdevelopa:mainfrom
dumbdev:feature/fe-upgrade-dependencies-and-refactor-onboarding-progress-tracker
Jul 26, 2026
Merged

feat(frontend): upgrade dependencies and refactor Onboarding Progress Tracker #1262
emdevelopa merged 3 commits into
emdevelopa:mainfrom
dumbdev:feature/fe-upgrade-dependencies-and-refactor-onboarding-progress-tracker

Conversation

@dumbdev

@dumbdev dumbdev commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

closes #1158

Full refactor of the Onboarding Progress Tracker module. All stateful logic has been extracted into a dedicated hook, the component has been upgraded with dark mode, mobile-first responsiveness, full i18n support, and a stricter accessibility implementation. The reducer gained a new SYNC_STEPS action and pure selectors for better testability.

Changes
New files

useOnboardingProgress.ts
— encapsulates all tracker state: reducer ownership, optimistic step navigation with rollback, external prop sync, SYNC_STEPS dispatch, translated screen-reader announcements, and the completion side-effect. Component is now a pure presentation layer.
Modified files

onboarding-reducer.ts
— added SYNC_STEPS action to sync totalSteps/completedSteps from props without remounting; readonly members on OnboardingState; pure selectors selectEffectiveStep and selectProgressPercent; backward-compatible with existing consumers.

OnboardingProgressTracker.tsx
— full refactor (see details below).

OnboardingProgressTracker.test.tsx
— expanded to 40+ tests covering all new behaviour.
src/app/(public)/register/page.tsx — wired OnboardingProgressTracker with a ONBOARDING_STEPS constant; dark mode applied to page header and footer.

en.json
/ es.json / pt.json — added onboarding i18n namespace (24 keys) in English, Spanish, and Portuguese.
Component refactor details
Dark mode

Full dark: Tailwind variant coverage on every surface, border, text, gradient, and connector line.
Progress bar gradient adapts: pluto-400→500→600 in light, pluto-500→400→300 in dark.
Completion banner, status badges, and focus rings all dark-mode aware.
Mobile-first responsiveness

Vertical layout by default; orientation="horizontal" stacks vertically on mobile and switches to sm:flex-row on tablet+.
Compact variant reduces padding and font sizes for sidebar/drawer usage.
Connector lines positioned correctly in both orientations.
i18n

Every user-visible string sourced from useTranslations("onboarding").
Parameterised keys for step announcements, progress summaries, and error messages.
All three supported locales (en / es / pt) fully translated.
Accessibility

Translated aria-label on region, progressbar, list, and every step button.
aria-busy with an inline SVG spinner on the pending step during optimistic updates.
focus-visible rings with locale-aware dark:ring-offset-pluto-900.
aria-roledescription="onboarding step", aria-setsize, aria-posinset, aria-current="step".
role="alert" + aria-live="polite" on the completion banner.
prefers-reduced-motion respected — all framer-motion variants have reduced-motion counterparts that fade only, no translate/scale.
Sub-components

StepIcon — renders checkmark, loading spinner (during pending), or step number. Memoised.
StatusBadge — renders completed / in-progress / pending pill with dark mode colours. Memoised.

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@dumbdev is attempting to deploy a commit to the Emmanuel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@dumbdev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@emdevelopa
emdevelopa merged commit 4b9caf0 into emdevelopa:main Jul 26, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend] Upgrade dependencies and refactor Onboarding Progress Tracker

2 participants