-
Notifications
You must be signed in to change notification settings - Fork 7
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
LOOP-1486: add suspend threshold information screen + editor #14
Conversation
@@ -45,65 +45,20 @@ public struct MockPrescription: Codable { | |||
public let cgm: CGMType // CGM type (manufacturer & model) | |||
public let pump: PumpType // Pump type (manufacturer & model) | |||
public let bloodGlucoseUnit: BGUnit | |||
public let basalRateSchedule: BasalRateSchedule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are to make TherapySettings
be a subcomponent of a prescription
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No concerns, but a couple of questions to better understand what is happening.
} | ||
let view = SuspendThresholdInformationView(onExit: exiting) | ||
let hostedView = DismissibleHostingController(rootView: view) | ||
hostedView.navigationItem.largeTitleDisplayMode = .always // TODO: hack to fix jumping, will be removed once editors have titles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if this blocks the scrolls of the title up into the navigation bar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .never
would do that if there was an actual title in the settings editor screens, but the settings editors' titles are actually empty strings, so they appear the same
guard let prescription = viewModel.prescription else { | ||
// Go back to code entry step if we don't have prescription | ||
let view = PrescriptionCodeEntryView(viewModel: viewModel) | ||
return DismissibleHostingController(rootView: view) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is curious to me. Is this a possible entry point of the workflow or can the user just jump to this point? Just trying to understand how the user can get here without the needed information, which then bumps them to the start of the workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user shouldn't be able to get here without a prescription; this is primarily to unwrap it (since it's an optional in the view model) and to catch anything weird that could have happened with the Tidepool backend.
https://tidepool.atlassian.net/browse/LOOP-1486
This PR also makes
TherapySettings
be a subcomponent of aMockPrescription