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
Swap components #66
Comments
Would the NFC/QR option have a predetermined set of 2 components to swap between? So, it works like a toggle? So pedal A will be unmounted, and pedal B will be mounted. And next time the other way around? How would this be set up? Some new menu item? Or at the component detail page? I see something in my head like, you go to a special 'Swap components' page with a list of 'swaps'. A swap basically contains component A and component B. And they toggle their current status. They can be triggered with QR/NFC. Only thing I am worried about is, what if you have a 'swap' set up, and both components end up either mounted or not mounted? So for example you manually both unmount or mount them. What would happen if you then want to execute the 'swap'? Sounds like it should throw an error for example. But I'm thinking edge cases now. |
NFC/QR would be associated with a component X. Action on scan:
|
What if there are more than 2 types of components? Like you have 3 wheelsets? An indoor trainer set, gravel set, race set, etc. I'm just thinking usecases here. |
Not really a problem. You may have only one component of the same type mounted at any given point of time, and you cannot really scan several NFCs/QRs simultaneously. You do not need to have component Y encoded on NFC/QR. BE already "knows" if there is any component of given type mounted and what is its id. |
However, if one has 2+ frames where a, say, wheelset can be mounted on this is yet to solve. |
Oh, right I get what you mean. I was thinking one NFC/QR endpoint would both unmount component X and mount component Y. But you mean there's one endpoint per component, which either mounts or unmounts the component you selected? I'm not sure that I want to enforce the 'only x components at the same time of a type'. That might be a bit more complicated than it sounds. But it might help in this use case to prevent accidentally mounting or unmounting something while another component is already mounted as well. |
Are front wheel and rear wheel the same type? If not you're all good. |
I know nothing about BikeCare's BE data schema but seemingly an extra condition check could be wrapped in the same transaction with the record update. |
Yeah I might have spoken a bit early. Shouldn't be too complicated. I didn't want to enforce it at the beginning, but on the other hand it can help the user track down errors in their input. But we have to make sure every type of component is separated in a front/rear or left/right type. Because otherwise we can get problems when we enforce the limit of 1 component of a type active per bike. |
Just to get this right before I start on it: You can have as many components to a bike, right? For example, 2 chains, 2 front wheels, 2 rear wheels. But only 1 can be active, right? So, the constraint/check shouldn't be in a component itself, but in the usage period that you add or edit. Correct? |
Yes, I guess so. With the only exception being that I may have more than 2 interchangeable components, for e.g. 3 sets of wheels (2 different surface conditions + 1 spare pair). |
Yeah it doesn't matter how many components there are, but you can only have one type active at the same time. I think I can just edit the current check where it tells you you can't have overlapping usage periods. The change would be to check on component type instead of specific component. |
Is your feature request related to a problem? Please describe.
I may want to swap pedals (e.g. clipless and platform ones, based on the activity I am about to undertake).
Describe the solution you'd like
I want to swap components of the same type with a single click, if there is any component of a specific type is already mounted.
Then other unmounted components of the same type would offer a Swap button, clicking which would result in unmounting of the mounted component, and mounting the one the action is applied to. All magic with usage time perios would happen on BE.
Please allow NFC/QR for the action per each component.
Describe alternatives you've considered
Manully "unmounting" and "mounting" components.
Additional context
n/a
The text was updated successfully, but these errors were encountered: