Redesign carbs remote screen with picker-based absorption time#567
Open
Redesign carbs remote screen with picker-based absorption time#567
Conversation
…e hour and minute states, enhancing clarity and usability
Collaborator
marionbarker
requested changes
Mar 30, 2026
Collaborator
marionbarker
left a comment
There was a problem hiding this comment.
Fix the screen issue for small screens. Request modifications as noted. I did not highlight every line - I think you can extrapolate.
| } | ||
|
|
||
| private var oldestAcceptedDate: Date { | ||
| Date().addingTimeInterval(-60 * 60 * 12) |
Collaborator
There was a problem hiding this comment.
Use a variable for the 12 hours in the past
| } | ||
|
|
||
| private var latestAcceptedDate: Date { | ||
| Date().addingTimeInterval(60 * 60) |
Collaborator
There was a problem hiding this comment.
Use a variable for the 1 hour in the future. Modifying this is a common customization for Loopers.
| Button(action: { | ||
| foodType = "🍭" | ||
| absorptionTimeString = "0.5" | ||
| setAbsorptionTime(hours: 0, minutes: 30) |
Collaborator
There was a problem hiding this comment.
set variable for the lollipop, taco, pizza "standard" aborption times. These are items to customize for Loopers. Make it easier for them.
| // Parse absorption time string to double | ||
| guard let absorptionTimeValue = Double(absorptionTimeString), absorptionTimeValue >= 0.5, absorptionTimeValue <= 8.0 else { | ||
| let selectedAbsorptionTime = absorptionTimeValue | ||
| guard selectedAbsorptionTime >= 0.5, selectedAbsorptionTime <= 8.0 else { |
Collaborator
There was a problem hiding this comment.
Use a variable for the min/max allowed absorption time then use it in each location instead of hard-coding it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Extracted from #558 to keep that PR focused on units/metrics.