@@ -48,17 +48,22 @@ struct WelcomeView: View {
4848 // MARK: - Portrait Layout
4949
5050 private var portraitLayout : some View {
51- VStack ( spacing: 24 ) {
52- Spacer ( )
53-
51+ VStack ( spacing: 0 ) {
52+ // Logo fixed at top
5453 logoView ( width: 152 , height: 152 )
55- . padding ( . bottom, 48 )
54+ . padding ( . top, 70 )
55+ . onboardingFade ( animateIn, delay: 0.00 , duration: reduceMotion ? 0 : 0.70 )
56+ . scaleEffect ( animateIn ? 1 : ( reduceMotion ? 1 : 0.90 ) )
57+ . animation ( reduceMotion ? nil : . easeOut( duration: 0.70 ) , value: animateIn)
58+
59+ Spacer ( )
5660
5761 messageView
5862 . onboardingFade ( animateIn, delay: 0.25 , duration: 0.60 )
5963
6064 Spacer ( )
61-
65+ }
66+ . safeAreaInset ( edge: . bottom) {
6267 ctaButton
6368 . padding ( . horizontal, 20 )
6469 . padding ( . vertical, 16 )
@@ -100,27 +105,23 @@ struct WelcomeView: View {
100105 . padding ( . vertical, 16 )
101106 }
102107
103- // MARK: - Componentes Compartilhados
108+ // MARK: - Shared Components
104109
105110 private func logoView( width: CGFloat , height: CGFloat ) -> some View {
106111 OnboardingLogoView ( width: width, height: height)
107- . matchedGeometryEffect ( id: " onboarding_logo " , in: logoNamespace)
108- . onboardingFade ( animateIn, delay: 0.00 , duration: reduceMotion ? 0 : 0.70 )
109- . scaleEffect ( animateIn ? 1 : ( reduceMotion ? 1 : 0.90 ) )
110- . animation ( reduceMotion ? nil : . easeOut( duration: 0.70 ) , value: animateIn)
111112 . accessibilityHidden ( true )
112113 }
113114
114115 private var messageView : some View {
115116 VStack ( spacing: 10 ) {
116- Text ( " Bem-vindo ao novo MacMagazine " )
117+ Text ( " Bem-vindo ao novo app do MacMagazine " )
117118 . font ( isLandscape ? . title2. weight ( . bold) : . largeTitle. weight ( . bold) )
118119 . multilineTextAlignment ( . center)
119120 . lineLimit ( nil )
120121 . fixedSize ( horizontal: false , vertical: true )
121122 . accessibilityAddTraits ( . isHeader)
122123
123- Text ( " Notícias, reviews e podcasts em um visual totalmente renovado. " )
124+ Text ( " Notícias, reviews, vídeos e podcasts em um visual totalmente renovado. " )
124125 . font ( isLandscape ? . body : . title3)
125126 . foregroundStyle ( . secondary)
126127 . multilineTextAlignment ( . center)
@@ -132,18 +133,9 @@ struct WelcomeView: View {
132133 }
133134
134135 private var ctaButton : some View {
135- PrimaryButton (
136- " Continuar " ,
137- size: 340 ,
138- style: ButtonStyleConfiguration (
139- color: . white,
140- stroke: theme. button. primary. color ?? . blue,
141- fill: theme. button. primary. color ?? . blue
142- )
143- ) {
136+ OnboardingCTAButton ( " Continuar " ) {
144137 trackAndNavigate ( )
145138 }
146- . frame ( maxWidth: . infinity)
147139 . accessibilityLabel ( " Continuar " )
148140 . accessibilityHint ( " Avança para ver as novidades do app " )
149141 }
@@ -155,7 +147,7 @@ struct WelcomeView: View {
155147 buttonId: AnalyticsConstants . ButtonID. onboardingWelcomeContinue. id,
156148 screen: AnalyticsConstants . Screen. onboardingWelcome. name
157149 ) )
158- withAnimation ( reduceMotion ? nil : . spring( response: 0.6 , dampingFraction: 0.8 ) ) {
150+ withAnimation ( reduceMotion ? nil : . spring( response: 0.7 , dampingFraction: 0.85 ) ) {
159151 coordinator. navigate ( to: . features)
160152 }
161153 }
@@ -166,29 +158,38 @@ struct WelcomeView: View {
166158#if DEBUG
167159#Preview( " Welcome — Portrait " ) {
168160 @Previewable @Namespace var namespace
169-
170- NavigationStack {
171- WelcomeView (
172- coordinator: OnboardingCoordinator (
173- permissionManager: PermissionManager ( analytics: AnalyticsManager ( ) ) ,
174- analytics: AnalyticsManager ( )
175- ) ,
176- logoNamespace: namespace
177- )
178- }
161+ WelcomeSheetPreviewHost ( )
179162}
180163
181164#Preview( " Welcome — Landscape " , traits: . landscapeLeft) {
182165 @Previewable @Namespace var namespace
166+ WelcomeSheetPreviewHost ( )
167+ }
183168
184- NavigationStack {
185- WelcomeView (
186- coordinator: OnboardingCoordinator (
187- permissionManager: PermissionManager ( analytics: AnalyticsManager ( ) ) ,
188- analytics: AnalyticsManager ( )
189- ) ,
190- logoNamespace: namespace
191- )
169+ private struct WelcomeSheetPreviewHost : View {
170+ @State private var isPresented = true
171+ @State private var coordinator = OnboardingCoordinator (
172+ permissionManager: PermissionManager ( analytics: AnalyticsManager ( ) ) ,
173+ analytics: AnalyticsManager ( )
174+ )
175+
176+ var body : some View {
177+ ZStack {
178+ Color . gray. opacity ( 0.12 )
179+ . ignoresSafeArea ( )
180+
181+ Text ( " MainView (simulação) " )
182+ . font ( . headline)
183+ }
184+ . sheet ( isPresented: $isPresented) {
185+ OnboardingContainerView ( coordinator: coordinator)
186+ . environment ( \. theme, ThemeColor ( ) )
187+ . presentationDetents ( [ . large] )
188+ . interactiveDismissDisabled ( true )
189+ }
190+ . onAppear {
191+ isPresented = true
192+ }
192193 }
193194}
194195#endif
0 commit comments