Repository navigation
Add savings calculator, push prefs, nav drawer and i18n - #473
Merged
nayt9 merged 2 commits intoOct 18, 2026
Merged
Conversation
|
@nafiisatu 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! 🚀 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
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.
This PR adds four frontend features. All changes are under
frontend/.#350 Savings calculator widget
src/lib/savingsProjection.tsholds the projection math as pure functions. It compounds yield monthly at the chosen APR and adds the monthly contribution each month. It returns how many months it takes to reach the goal, a month-by-month series, and the balance at fixed horizons. It stops after 50 years, so a goal that is never reached can't loop forever.SavingsCalculatoris an interactive widget with inputs for goal amount, initial deposit and monthly contribution, plus an APR slider. It shows:components/savings.#352 Push notification preferences panel
PushNotificationPanelis part of Settings. It has:public/sw.js)src/lib/push.tssubscribes throughpushManagerwhenNEXT_PUBLIC_VAPID_PUBLIC_KEYis set. It sends the subscription and the chosen event types toPOST /api/user/push-subscriptions, and callsDELETEon the same endpoint when push is turned off. Note: this endpoint does not exist in the backend yet, so server-side delivery still needs a backend change.localStorage. The existing/api/user/preferences/notificationspayload is unchanged.#353 Mobile navigation drawer
NavDraweris mounted in the(app)layout and only shows belowmd. It adds a sticky top bar with a menu button that opens a side drawer linking to the app routes. The current page is marked witharia-current="page".prefers-reduced-motion.role="dialog",aria-modal) and isinertwhile closed.#354 Multi-language support
src/i18n/config.tslists the supported languages, picks the default, and matches the browser's language.src/i18n/messages.tslooks up dot-separated keys and fills in{placeholders}.I18nProvideranduseTranslation()providet(), with plural forms throughIntl.PluralRules. Any key missing from a translation falls back to English.src/i18n/locales/{en,es,fr}.json. The new drawer, calculator and push panel use them.LanguageSwitcheris in the drawer and in a new "Language" section in Settings. The choice is saved inlocalStorageand<html lang>is updated. The server always renders the default language and the browser switches after it loads, so there are no hydration mismatches.useTranslation()falls back to English when no provider is mounted, so the existing component tests still run without wrapping components in the provider.Closes #350
Closes #352
Closes #353
Closes #354