Skip to content

Feat: add tutorial view & gesture priority#98

Merged
destucr merged 3 commits intodevelopmentfrom
feat/tutorial-view
Nov 30, 2025
Merged

Feat: add tutorial view & gesture priority#98
destucr merged 3 commits intodevelopmentfrom
feat/tutorial-view

Conversation

@destucr
Copy link
Contributor

@destucr destucr commented Nov 30, 2025

🎯 Summary

This pull request introduces a new multi-page tutorial experience and refactors related navigation and UI components. The TutorialView now provides interactive, visually rich onboarding, while profile and timeline navigation, page indicators, and theming have been improved. These changes enhance the onboarding and profile experience, improve navigation consistency, and prepare the app for future localization and theming improvements.

✨ Features/Changes

  • Added TutorialView in Tutorial/TutorialView.swift with four themed, interactive pages, including highlighted text, images, and step-by-step instructions.
  • Introduced reusable HighlightedWordText component for stylized text.
  • Updated ProfileView to navigate to TutorialView instead of the dummy tutorial link.
  • Refactored PregnancyTimelineView navigation to properly present ProfileView using .navigationDestination.
  • Extracted page indicator logic in HeartbeatMainView into a dedicated PageIndicators view, hiding indicators during recording, playback, or restricted swipe states.
  • Added new localizable strings for tutorial content in Localizable.xcstrings.
  • Applied minor theming fixes in ProfileView and its preview for consistent background and theme usage.
  • Passed AuthenticationService environment object to ProfilePhotoDetailView.
  • Ensured profile list rows have transparent backgrounds for improved appearance.

📁 Files Changed

  • Tutorial/TutorialView.swift - Added multi-page tutorial with interactive content and HighlightedWordText component.
  • ProfileView.swift - Updated navigation to new tutorial, fixed theming, and passed authentication service.
  • PregnancyTimelineView.swift - Updated .navigationDestination logic for profile presentation.
  • HeartbeatMainView.swift - Extracted page indicators into PageIndicators view and improved conditional visibility.
  • Localizable.xcstrings - Added strings for tutorial content and updated comments for clarity.

🔧 Usage Examples (if applicable)

// Navigate to the new tutorial from ProfileView
NavigationLink(destination: TutorialView()) {
    Text("Start Tutorial")
}

// PageIndicators now conditionally hides during recording or playback
PageIndicators(currentPage: viewModel.currentPage, totalPages: 4)
    .opacity(viewModel.isRecording || viewModel.isPlayback ? 0 : 1)
:test_tube: Testing Scenarios
Tutorial Flow:

 Navigate from ProfileView  TutorialView opens with interactive pages.

✅ Highlighted words appear with correct styling.

✅ Page indicators update correctly and hide during recording/playback.

Navigation:

 PregnancyTimelineView presents ProfileView properly using .navigationDestination.

✅ Profile list rows display transparent backgrounds.

 ProfilePhotoDetailView receives AuthenticationService environment object.

Localization and Theming:

 Tutorial content strings display correctly in multiple languages.

✅ Theme and background fixes in ProfileView are applied consistently.

@destucr
Copy link
Contributor Author

destucr commented Nov 30, 2025

@revanzanrndra gw ubah heartbeatMainVIew() karena ada logic yang ngeblock jadi gabisa scroll sama page indicator yang muncul terus

@destucr destucr merged commit f8c13a8 into development Nov 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant