feat: refactor progress indicators to implement discount management (#379)#616
Merged
RUKAYAT-CODER merged 2 commits intoMay 30, 2026
Merged
Conversation
|
@frankrichard99 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! 🚀 |
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.
Description
Refactored the
Progress Indicatorsmodule to fully implement robust Discount Management. This changes the cart milestone tracker from a static layout to a fully reactive engine inside theEnrollmentCTAblock, resolving suboptimal UX and satisfying production quality standards.Related Issue
Closes #379
Type of Change
Checklist
Refactor Summary & Implementation Details
Following the designated project implementation plan, the following structural changes were successfully executed:
1. Analysis & Core Functionality Implementation
DiscountProgressBar.tsx): Designed a responsive, multi-tiered milestone indicator featuring dynamic state tracking (locked, live progress fill, and unlocked badge transitions). Fully supports dark mode styling using custom Tailwind tokens.EnrollmentCTA.tsx): Connected selected tier values directly to client-side state hooks to calculate global aggregate spend in real time on user interaction.2. Comprehensive Quality Control & Testing
DiscountProgressBar.test.tsx): Validates initial empty states, precise floating-point rounding boundary conditions ($49.99 +EnrollmentCTA.integration.test.tsx): Simulated complex user workflows across multiple card click variations to ensure zero regressions in layout or event bubble flows.3. Standards & Compliance Performance
role="progressbar",role="region") and deterministicaria-valuenow,aria-valuemin, andaria-valuemaxboundaries.Warning
During local verification execution, two pre-existing project baseline errors were flagged within unrelated domains:
src/app/api/auth/login/route.ts): A type generic issue matching early exit handlers to response shapes./settings): Missing contextual tree structure (ThemeProvider) during static compilation loops.These errors are entirely isolated from the course module scope. All isolated modules, tests, and standard assets introduced in this branch pass flawlessly.