-
Notifications
You must be signed in to change notification settings - Fork 51
Adds UI for trophies #1173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds UI for trophies #1173
Conversation
# Conflicts: # src/components/Carousel/carousel.module.css # src/components/Dashboard/ConfigurableDashboard.tsx # src/components/Dashboard/DashboardCard.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a trophy/achievements system to the dashboard, allowing users to view earned trophies and track their progress toward unlocking new ones. The feature integrates with the existing configurable dashboard and adds a dedicated trophies detail page.
Changes:
- Added trophy models, services, and queries for fetching and managing trophies
- Created UI components for displaying trophies on the dashboard and a dedicated trophies page
- Added routing and navigation support for the trophies feature
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/url.ts | Added TROPHIES link enum and route mapping with organizational comments |
| src/utils/consts.ts | Added trophy-related API paths and query keys with improved organization |
| src/tests/trophies/trophiesTestData.ts | Test data for trophies, user trophies, and trophy progression |
| src/routes.tsx | Added routes for the trophies detail page |
| src/components/Trophies/services/* | Service layer for fetching trophies, user trophies, and progression data |
| src/components/Trophies/queries/trophies.ts | React Query hooks for trophies data |
| src/components/Trophies/models/* | Trophy data models with JSON adapters and tests |
| src/components/Trophies/components/TrophiesDetail.tsx | Main trophies page showing all trophies with progress |
| src/components/Dashboard/TrophiesCard.tsx | Dashboard widget displaying earned trophies |
| src/components/Dashboard/ConfigurableDashboard.tsx | Integration of trophies widget into dashboard |
| src/components/Dashboard/DashboardCard.tsx | Support for optional empty title and formatting cleanup |
| src/components/Dashboard/MeasurementCard.tsx | Added category name display |
| src/components/Dashboard/WeightCard.test.tsx | Removed redundant ResizeObserver mock |
| public/locales/en/translation.json | Added trophies translation key |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { DashboardCard } from "./DashboardCard"; | ||
|
|
||
| export const TrophiesCard = () => { | ||
| const { t } = useTranslation(); |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variable t.
| const { t } = useTranslation(); |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Only the outermost element needs one Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Proposed Changes
Adds earned trophies to the dashboard as well as a general overview, showing progress
Current screenshots:

Related Issue(s)
Closes #1166