Skip to content
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

feat(ux): update get ready page with new preview screen #78

Merged
merged 16 commits into from
Nov 29, 2023

Conversation

phantumcode
Copy link
Contributor

@phantumcode phantumcode commented Nov 15, 2023

Issue #, if available:

Description of changes:

  • Refactor the Get Ready Page per UX updates:
    • Remove the instructional content in the Get Ready Page
    • Update the Get Ready Page with a camera preview "hair check" screen to preview centering face in oval
    • Add a camera permission state and screen for users to enable camera permission or navigate to settings screen to enable camera permission
  • Update Integration Test app and Sample app (HostApp) with new UX updates
  • Remove logic that rotates video buffer as it is not needed anymore
  • Remove old/unused assets and resources

Check points: (check or cross out if not relevant)

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@phantumcode phantumcode marked this pull request as ready for review November 16, 2023 16:41
@phantumcode phantumcode requested review from a team as code owners November 16, 2023 16:41
import VideoToolbox

extension CGImage {
static func convert(from cvPixelBuffer: CVPixelBuffer?) -> CGImage? {
Copy link
Member

Choose a reason for hiding this comment

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

nit: Indentation seems to be 2 spaces instead of 4 in this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed indentation

.resizable()
.scaledToFill()
.frame(
width: geometry.size.width,
Copy link
Member

Choose a reason for hiding this comment

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

nit: fix indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed identation


@StateObject var model: CameraPreviewViewModel

public init(model: CameraPreviewViewModel = CameraPreviewViewModel()) {
Copy link
Member

Choose a reason for hiding this comment

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

why a public init? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed public access modifier

super.init()
setupSubscriptions()

let avCpatureDevice = AVCaptureDevice.DiscoverySession(
Copy link
Member

Choose a reason for hiding this comment

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

typo in avCaptureDevice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed typo

@phantumcode phantumcode merged commit 471ac56 into main Nov 29, 2023
6 checks passed
@phantumcode phantumcode deleted the feat/ux_updates branch November 29, 2023 18:51
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