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

Carb Time Stepper Respect Time limits #17

Open
gestrich opened this issue Sep 13, 2023 · 2 comments
Open

Carb Time Stepper Respect Time limits #17

gestrich opened this issue Sep 13, 2023 · 2 comments

Comments

@gestrich
Copy link
Collaborator

There are limitations for how far you can deliver carbs in the past or future. It would be nice if the stepper would stop incrementing/decrementing when it reaches one of those limits.

IMG_3743

@SquareTheBase
Copy link
Contributor

I think I'll try this one.. capturing thoughts below:

  • Compare now with carb entry limits and if exceeded disable the appropriate stepper
  • The disabled state shouldn't react to an onTapGesture and should render gray
  • Set the picker time to the entry limit on last tap before disabling
  • If a stepper is disabled, show an error in the view about why it's disabled so users know how to correct

Open Questions:

  • Should we also disable the date picker if a limit is exceeded?

@gestrich
Copy link
Collaborator Author

I think going with Loop's UX choices is safe and I see they disable the date picker beyond its limits.

If you decide to do that, maybe look in LoopKit at the DatePickerRow which is used in Loop's CarbEntryView. You can at least see how they accomplish date limitations.

Ideally we could just reuse a UI component like DatePickerRow from LoopKit which Caregiver depends on. However there is sometimes special quirks to reusing the component in Caregiver requiring refactoring in LoopKit. So its a judgment call if worth trying to reuse it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants