feat(frontend): upgrade dependencies and refactor Onboarding Progress Tracker #1262
Merged
Conversation
|
@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. |
|
@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! 🚀 |
…-onboarding-progress-tracker
…-onboarding-progress-tracker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.