8000 - onboarding pages by AdnanYupi · Pull Request #15 · golfgenius/ScoreScanSDK · GitHub
[go: up one dir, main page]

Skip to content

- onboarding pages - #15

Merged
AdnanYupi merged 2 commits into
mainfrom
feature/onboarding_pages
Mar 10, 2026
Merged

AdnanYupi merged 2 commits into
mainfrom
feature/onboarding_pages

Conversation

@AdnanYupi
@AdnanYupi AdnanYupi commented Mar 10, 2026 •
Copy link
Copy Markdown
Collaborator

Onboarding steps for taking better pictures

Copilot AI left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an onboarding flow to guide users through best practices before using the scorecard camera UI, both in the demo iOS app and in the ScorecardCamUI SwiftPM target.

Changes:

  • Introduces a paged OnboardingView with scan tips (icons + title + description) in both the demo app and the SDK UI target.
  • Updates the demo app’s ContentView to show onboarding before requesting camera permission.
  • Updates ScorecardCameraView to show onboarding before the camera experience.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
iosApp/iosApp/OnboardingView.swift New onboarding UI for the demo app (paged tips, skip/get started).
iosApp/iosApp/ContentView.swift Routes “Launch Camera” into onboarding first, then permission request.
Sources/ScorecardCamUI/ScorecardCameraView.swift Shows onboarding before presenting the camera UI flow.
Sources/ScorecardCamUI/OnboardingView.swift New onboarding UI inside the SwiftPM ScorecardCamUI target.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +3 to +7
struct OnboardingPage {
let icon: String
let title: String
let body: String
}
Copilot AI Mar 10, 2026
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OnboardingPage is only used within this file; consider making it private (as in the demo app’s version) to avoid exporting an extra internal symbol from the ScorecardCamUI module.

Copilot uses AI. Check for mistakes.
Comment on lines 116 to +191
@@ -184,6 +188,7 @@ public struct ScorecardCameraView: View {
Text(uploadAlertMessage)
}
.persistentSystemOverlays(.hidden)
} // end else (onboarding dismissed)
Copilot AI Mar 10, 2026
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the onboarding is implemented as an if/else, the view modifiers currently attached to the camera branch (.onAppear { viewModel.checkPermission(); lockToLandscape(); ... }, .onDisappear { ... }, and .persistentSystemOverlays(.hidden)) do not run/apply while onboarding is visible. This changes behavior (e.g., onboarding can be shown in portrait despite the “Hold in Landscape” guidance, and overlays may remain visible until dismiss). If you want those behaviors during onboarding too, apply the modifiers outside the conditional (wrap branches in a Group) or move the orientation/overlay logic to a parent container so it runs regardless of which branch is active.

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +48
8000
.onAppear {
UIPageControl.appearance().currentPageIndicatorTintColor = .white
UIPageControl.appearance().pageIndicatorTintColor = UIColor.white.withAlphaComponent(0.3)
}
Copilot AI Mar 10, 2026
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UIPageControl and UIColor are used in this file but UIKit isn’t imported, which will fail to compile. Add import UIKit (or wrap in #if canImport(UIKit) and import conditionally) before using these types.

Copilot uses AI. Check for mistakes.
Comment on lines +45 to +48
.onAppear {
UIPageControl.appearance().currentPageIndicatorTintColor = .white
UIPageControl.appearance().pageIndicatorTintColor = UIColor.white.withAlphaComponent(0.3)
}
Copilot AI Mar 10, 2026
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UIPageControl and UIColor are referenced without importing UIKit, which will not compile for this SwiftPM target. Add import UIKit (or conditional #if canImport(UIKit) import) to this file.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AdnanYupi
AdnanYupi merged commit fd9de75 into main Mar 10, 2026
2 checks passed
@AdnanYupi
AdnanYupi deleted the feature/onboarding_pages branch March 10, 2026 15:24
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.

2 participants

0