-
-
Notifications
You must be signed in to change notification settings - Fork 50
support ski and snowboard as gear #194
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
support ski and snowboard as gear #194
Conversation
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 extends the application to support skis and snowboards as new gear types (values 5 and 6).
- Updated UI components to display badges and avatars for skis/snowboards
- Added translation keys and documentation entries for the new gear types
- Extended backend model comment and validation logic to accept gear types up to 6
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
frontend/app/src/views/Gears/GearView.vue | Added badge cases for gear_type 4–6 (racquet, ski, snowboard) |
frontend/app/src/i18n/us/gears/gearView.json | Added English labels for options 5 and 6 |
frontend/app/src/i18n/us/components/gears/gearsListComponent.json | Added English list labels for options 5 and 6 |
frontend/app/src/i18n/us/components/gears/gearsAddEditGearModalComponent.json | Added English modal labels for options 5 and 6 (typo in key) |
frontend/app/src/i18n/de/gears/gearView.json | Added German labels for options 5 and 6 |
frontend/app/src/i18n/de/components/gears/gearsListComponent.json | Added German list labels for options 5 and 6 |
frontend/app/src/i18n/de/components/gears/gearsAddEditGearModalComponent.json | Added German modal labels for options 5 and 6 |
frontend/app/src/components/Gears/GearsListComponent.vue | Added avatars and labels for gear_type 5 (ski) and 6 (snowboard) |
frontend/app/src/components/Gears/GearsAddEditGearModalComponent.vue | Added select options for gear_type 5 and 6 |
docs/index.md | Updated feature list to include skis/snowboards |
docs/developer-guide.md | Updated gear types table (values 5 and 6) |
backend/app/gears/models.py | Extended gear_type comment to include values 5 and 6 |
backend/app/gears/dependencies.py | Extended validation range to max 6 for gear types |
Comments suppressed due to low confidence (2)
frontend/app/src/components/Gears/GearsListComponent.vue:4
- Typo in the
alt
text:Bycicle
should beBicycle
for better accessibility and clarity.
<img src="/src/assets/avatar/bicycle1.png" alt="Bycicle avatar" width="55" height="55" class="rounded-circle" v-if="gear.gear_type == 1">
frontend/app/src/views/Gears/GearView.vue:41
- Tests for the new gear_type options (5 and 6) are missing. Consider adding unit tests to verify that skis and snowboards render the correct badges and translations.
<span class="ms-2 badge bg-primary-subtle border border-primary-subtle text-primary-emphasis align-middle" v-else-if="gear?.gear_type == 4">
frontend/app/src/i18n/us/components/gears/gearsAddEditGearModalComponent.json
Outdated
Show resolved
Hide resolved
…lComponent.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Hello! Thanks for the contribution. It appears to be everything okay, but I will double check. Icons/avatars were generated by ChatGPT. |
[backend] fix some comments [frontend] fixed avatars path to be inline with rest of the code [frontend] added skis and snowboarding icons/avatars [frontend] fixed searchView not considering gear types 4, 5 and 6 [frontend] added new gear types to GearView
[backend] alembic migration to add extra columns to users_default_gear for default gear for skis and snowboard [backend] added logic for new users_default_gear columns [frontend] added logic for new users_default_gear columns
Hi, review done. I will merge this for next release. |
Just remembered. Is it logical to also add ski boots and snowboard boots? |
Thank you so much for the quick review and even releasing it directly 🙏 |
No, they are not factored in but I personally would just use the gear type "shoes" to track them 🙂 |
The aim of this PR is to add support for skis and snowboards as gear types.
I have implemented the changes applied in this commit and hope that everything is covered.
Please check carefully to see if I have missed anything. Do we need to make any code changes to handle the new gear types? Is migration necessary?
Could you also add some avatars, or let me know where you sourced the other icons from? I didn't want to mess up the current style. 🙂
Once we have cleared all open aspects, I would also be open to adding a section about how to add a new gear type to the developers guide.