-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make carb entry time configurable when entered via Watch (#608) #609
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
Conversation
|
Thanks @mpangburn! The iPhone interface has some restrictions as to what times new carbs can be created. So we'd have to at minimum match those validation rules (or even make them tighter). The UI has multiple buttons (one for changing day, one for changing minutes), and is more cluttered than it should be. I think we are really only interested in changing time (a few hours past or future) from the watch, and you only need one action to increment or decrement, with the crown being the most likely input mode. Instead of a button labeled "Date & Time" in the carb screen, it could be titled with the current date, or the one changed by the UI I'm not sure you need a whole new modal to enter date; the watchOS HIG is pretty clear: "Avoid displaying a second modal sheet from an existing modal sheet." https://developer.apple.com/watchos/human-interface-guidelines/app-architecture/modal-sheets/ Since changing date is a "pro feature" that the carb algorithm doesn't especially need, I'd leave it as more of a "pro experience" to use. Adding a date label with a little more padding where GRAMS is, and allowing it to be tapped to take over control of the crown (after tapping, change its background color or something to highlight) and allow tapping again to change focus back to changing the carb number. Space is at a premium, so I'd recommend tapping on the carb number OR the date to do the same thing – switch the focus from one input to the other. 5 minutes as an increment isn't enough to "matter" to the algorithm; I'd recommend it be 10 or 15 minutes (though this is only for the +/- buttons; the crown input should move by single minutes so it feels fluid). Also, the date/time formatters should be localized. |
|
Thanks for your guidance @ps2! I've updated the UI to meet your suggestions:
Re restrictions on new carb creation:
Let me know if you have any other suggestions. Thanks! |
|
Thanks Michael I think this is a big step in the right direction. The tap areas are a little too small. You can use a UITapGestureRecognizer for the whole area to act as a toggle. Tapping anywhere in the area would switch input mode. Also the 'grams' label is causing clipping of some numbers. I'd vote for removing it in this context, and keeping the icons their full original size. "The time displayed will always be for the current day, i.e. if the user scrolls beyond midnight in either direction, it will use the displayed time, but still for the current day". As you said, this isn't ideal. I think we have the current time restriction for the phone UI specified in LoopKit, so you could look it up there. |
|
Per your suggestions:
I somehow missed the carb entry date restrictions in CarbKit in my first revamp, but I caught them this time around. Aligning with carb entry via phone, users can enter a carb entry up to 4 hours in the future. There appears to be no restriction on past date in CarbKit, so I chose to use 8 hours for restricting entries in the past. |
|
This is looking very close! The 🍭, 🌮, and 🍕 buttons have their font size changed to 20/22. Please restore them to 25pt.
enum InputMode {
case value
case date
}Then you don't need
|
|
Sorry for my lag on finishing this up!
Hopefully this just about does it! |
|
Thanks! Looks great! I believe the build is just failing because TravisCI is still using Xcode 9.1 beta version. |
Temporarily Disable Favorite Foods

See #608
(Project will build with updated project.pbxproj)