-
Notifications
You must be signed in to change notification settings - Fork 430
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
Onboarding Intro Main Screens #2994
Onboarding Intro Main Screens #2994
Conversation
import SwiftUI | ||
import class UIKit.UIScreen | ||
|
||
final class MetricBuilder<T> { |
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 idea behind this class is to build device-specific values for the UI. For example, a scenario where the top padding for the iPhone is 100 and the iPad is 200.
This class could be extended with additional helpers such as:
func value(iPhonePortrait: T, iPhoneLandscape: T) -> Self
and so on, but I hope the design won't change much between devices and we won’t need them.
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.
Hmm, that's nice. We have "AppWidthObserver" in the rest of the app. Wonder if that can be refactored to use this somehow in the future.
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.
Yup, indeed, I was thinking that I could write some tests and move this to Core or a local package so we could reuse it across the App.
} | ||
} | ||
|
||
private var lightGradient: some 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.
Should we put these colours in the asset catalogue?
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.
Nah, these seem really specific to the onboarding and we'd just be generating a bunch of assets to avoid having to use the colorScheme. It's nicely self contained with a specific reason d'être so this seems like a reasonable exception to the rule imo.
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.
LGTM! Really nice work. Can't wait to see that in the app for real.
…ne with small screen size
3b1b954
to
95e9832
Compare
94b83ff
into
alessandro/onboarding-intro
Task/Issue URL: https://app.asana.com/0/1206329551987282/1207569383033362/f
CC: @SabrinaTardio
Description:
This PR adds the Onboarding Intro screens.
Steps to test this PR:
OnboardingView
Live SwiftUI Preview and go through the intro flow steps.2.1 iPad
2.2 iPhone SE
2.3 Light - Dark mode
NOTE
I will add the
OnboardingIntroViewController
and Menu Debug option to present the flow in another PR.Definition of Done (Internal Only):
Copy Testing:
’
rather than'
Orientation Testing:
Device Testing:
OS Testing:
Theme Testing:
Internal references:
Software Engineering Expectations
Technical Design Template