feat: add/edit savings goal modal with validation and live state#495
Merged
Conversation
Implements the Add/Edit Savings Goal flow by lifting goalsData into
component state and providing a fully accessible modal form.
Key changes:
- Integrated lib/validation/savings-goals for real-time form validation.
- Externalized all strings and error messages to en.json for full i18n
support.
- Implemented modal accessibility (focus trap, ESC to close, and
motion-reduce).
- Recomputed daysLeft and isOverdue dynamically from the target date.
- Added 100% test coverage for goals utilities and validation logic.
- Improved UI robustness with line-clamping for long titles and descriptions
… reflection Cleans up unrelated syntax errors, missing imports, and type issues in app/ and components/ to ensure a green CI build for the savings goals feature.
Closed
5 tasks
Contributor
|
the add/edit savings goal modal with validation and live state is exactly the flow we wanted. landed as part of your stack via #504. merged 👍 |
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 #462
Description
Previously, the savings goals page rendered a static grid. This PR lifts the goals
list into component state and adds a robust, validated modal form for creating and
editing goals. It also ensures all UI elements are localized and accessible.
Key Features
Total Saved) now update instantly when a goal is added or modified.
and date.
feedback.
dynamically from the targetDate, ensuring accuracy as time progresses.
there", "Overdue"), are externalized to en.json.
🛠 Technical Implementation
instead of hardcoded strings, allowing the UI to handle localization centrally.
user-generated content.
ensure zero-regressions in status tracking.
✅ Verification Results
Automated Tests
app/dashboard/goals/utils.ts.
Quality Checks