8000 support ski and snowboard as gear by bossenti · Pull Request #194 · joaovitoriasilva/endurain · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 6 commits into from
Jun 8, 2025

Conversation

bossenti
Copy link
Contributor
@bossenti bossenti commented Jun 8, 2025

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.

@joaovitoriasilva joaovitoriasilva requested a review from Copilot June 8, 2025 10:39
Copy link
Contributor
@Copilot Copilot AI left a 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 be Bicycle 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">

…lComponent.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Repository owner deleted a comment from Copilot AI Jun 8, 2025
@joaovitoriasilva
Copy link
Owner

Hello! Thanks for the contribution. It appears to be everything okay, but I will double check. Icons/avatars were generated by ChatGPT.
I will add the new ones to the PR :)

[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
@joaovitoriasilva joaovitoriasilva self-assigned this Jun 8, 2025
@joaovitoriasilva joaovitoriasilva added the enhancement New feature or request label Jun 8, 2025
@joaovitoriasilva joaovitoriasilva moved this to In Progress in Endurain project Jun 8, 2025
@joaovitoriasilva joaovitoriasilva added this to the v0.12.X milestone Jun 8, 2025
[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
@joaovitoriasilva
Copy link
Owner

Hi, review done. I will merge this for next release.
I would appreciate the docs addition :)

@joaovitoriasilva joaovitoriasilva merged commit 999682e into joaovitoriasilva:master Jun 8, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Endurain project Jun 8, 2025
@joaovitoriasilva
Copy link
Owner

Just remembered. Is it logical to also add ski boots and snowboard boots?
Or those are factored in skis and board?

@bossenti
Copy link
Contributor Author

Thank you so much for the quick review and even releasing it directly 🙏

@bossenti
Copy link
Contributor Author

Just remembered. Is it logical to also add ski boots and snowboard boots?

Or those are factored in skis and board?

No, they are not factored in but I personally would just use the gear type "shoes" to track them 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants
0