Skip to content
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

Component mounting/unmounting action #65

Closed
OleksiyRudenko opened this issue Mar 25, 2024 · 11 comments
Closed

Component mounting/unmounting action #65

OleksiyRudenko opened this issue Mar 25, 2024 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@OleksiyRudenko
Copy link

OleksiyRudenko commented Mar 25, 2024

Is your feature request related to a problem? Please describe.
Currently, if I want to swap components on the same bike I need to edit components' usage time periods.

Describe the solution you'd like
I want a button for every component, that says Unmount for a mounted component and Mount for a non-mounted component and clicking the button would do the relevant and required magic on BE.
Ideally, it wouldn't be possible to have 2+ components of the same type (assuming right and left pedals, from and rear wheels are different types) be mounted at the same time, i.e. only one component of a type can be Unmounted, and any components are not mountable if at least 1 component of the same type is mounted. Altho when no component of a specific type is mounted yet, any of other components would be mountable.

Please allow NFC/QR for the action (same NFC/QR to unmount if the component is mounted, and mount if it is unmounted).

Describe alternatives you've considered
Editing components' usage time periods and making sure they do not overlap.

Additional context
n/a

@Gerben321 Gerben321 self-assigned this Mar 25, 2024
@Gerben321 Gerben321 added the enhancement New feature or request label Mar 25, 2024
@Gerben321
Copy link
Owner

Gerben321 commented Mar 25, 2024

Yeah this is a good idea! How about that we place it here? Add a button to the 'Component actions' list add a button that says 'mount' or 'unmount' depending on the current status?
image

Should clicking that button directly mount or unmount it? Because maybe a little popup would be good where you get a date time selector (with the current date and time), in case you're a day late with mounting or unmounting. That way you can still quickly mount or unmount a component, but also get to enter the date in case it's different from now.

The NFC/QR code will have no input and directly execute. Do you want a toggle, or do you want two separate entries from mount and unmount?

Edit: Now that I think about it, maybe also add an icon when a component is added to your bike, but doesn't have a 'install period' yet. 🤔

@OleksiyRudenko
Copy link
Author

Having dialog is good. Provides flexibility and double check.

I vote for toggle. No need to double the number of NFCs. The same NFC may also serve well as a swap action trigger for #66

@Konstantin-Levin
Copy link

Related to mounted and unmounted, is it worth considering having 'retired' as a separate, third state at the bottom of the list of components page?

Having a list of retired components can be useful, as the user can reference back and compare the longevity of things. Separating retired and unmounted is also helpful as parts wear out and sometimes break and will never be used again. These are often replaced with brand new versions of the same component.

The obviously example being the chain:

  • How many kilometres did I get out of my last chain?
  • Why didn't my current chain last as long?
  • Maybe it was because I changed lubricant
    etc.

This is something the Strava's My Gear page has and would be nice to see in Bike Care.

@Konstantin-Levin
Copy link

Also related is a useful feature I've seen elsewhere, which is a button to 'replace' a component when registering a service. This would carry out multiple actions for the user:

  1. Adds the component and its total km/hrs to the list of retired components
  2. Creates a new component with the same name, details and service schedules with its usage reset to 0km/0hrs

Quite a common occurrence with wear parts like chains, cassettes, brake pads, bearings etc.

@Gerben321
Copy link
Owner

Related to mounted and unmounted, is it worth considering having 'retired' as a separate, third state at the bottom of the list of components page?

Having a list of retired components can be useful, as the user can reference back and compare the longevity of things. Separating retired and unmounted is also helpful as parts wear out and sometimes break and will never be used again. These are often replaced with brand new versions of the same component.

The obviously example being the chain:

  • How many kilometres did I get out of my last chain?
  • Why didn't my current chain last as long?
  • Maybe it was because I changed lubricant
    etc.

This is something the Strava's My Gear page has and would be nice to see in Bike Care.

My idea is to rename the current 'active' toggle on a component to retired. This doesn't really do anything but we can separate components in that way.

@Gerben321
Copy link
Owner

Also related is a useful feature I've seen elsewhere, which is a button to 'replace' a component when registering a service. This would carry out multiple actions for the user:

  1. Adds the component and its total km/hrs to the list of retired components
  2. Creates a new component with the same name, details and service schedules with its usage reset to 0km/0hrs

Quite a common occurrence with wear parts like chains, cassettes, brake pads, bearings etc.

I get what you mean. But maybe a better place for this is at the 'to be retired' component right? Clicking that button will show popup with confirmation. And explanation what it will do. It will check the option 'retired' for the old component. and indeed copy all service schedules (not logs) to a new component with the same name and type.

I'm only thinking, should we directly be able to set the new installation date? Or just click replace and you will be directed to the new part where you can enter the mounted date later?

@Konstantin-Levin
Copy link

I'm only thinking, should we directly be able to set the new installation date? Or just click replace and you will be directed to the new part where you can enter the mounted date later?

Hmm, both would be fine I think, but I'd go for the second option as I can imagine circumstances where the user might not know when a replacement was being installed (maybe waiting for a replacement part in the post?)

@Gerben321
Copy link
Owner

Gerben321 commented Mar 30, 2024

While working on #64 I will also work on this one since I now know whether a component is mounted or not in my frontend code.

The idea is to show this for unmounted components:
image
And this for mounted components:
image

Clicking the button will then open a dialog to enter the date of when it was mounted or unmounted.

@Gerben321
Copy link
Owner

I've worked on the mounting dialog today. This is how it will look like:
image
If the date is not correct (if it overlaps) you will get an error. And when it's successfully mounted you will see that directly in the list as well.

Next up is the unmounting, but I think that will go a lot quicker because I've done the biggest work for this.

@Gerben321
Copy link
Owner

Gerben321 commented Apr 1, 2024

Also made the unmounting working now. I think it works great. I will do some cleaning up on the code and then hope to deploy it somewhere today or later this week.

Edit: Let me know what you think! It's deployed now.

@Konstantin-Levin
Copy link

Had a quick play around and looks to be working well so far! 👏
I'll be doing a big swap over of summer/winter components on my gravel bike within the next few weeks so I'll be able to give it a real world test soon.

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

No branches or pull requests

3 participants