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(Authenticator): Adding all Authenticator Views #2

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

sebaland
Copy link
Member

@sebaland sebaland commented Apr 12, 2023

Description of changes:

This PR adds all of the Views that the Authenticator uses.
Each of the main public views represent a specific AuthenticatorStep, and they all follow the same overall design:

  • They observe a *State object, which
    • Provide the properties that need to be set
    • Provide the functions that should be invoked
  • They take a header and a footer in their initializers, having default values for both
    • The default header is to show the view's title, e.g. "Sign In"
    • The default header is to either show navigation buttons (i.e. buttons that take you to another view without performing any action), or an EmptyView if there are none.

The internal views are used to share code/functionality.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sebaland sebaland marked this pull request as ready for review April 13, 2023 13:21
@sebaland sebaland requested review from a team as code owners April 13, 2023 13:21
Sources/Authenticator/Views/SignUpView.swift Outdated Show resolved Hide resolved

/// Creates a `SignUpView`
/// - Parameter state: The ``SignUpState`` that is observed by this view
/// - Parameter signUpFields: An array of Sign Up fields that will be displayed when signing up. The order of the array is mantained when displaying the fields. If empty or `nil`, the fields will be determined from Amplify's configuration. Defaults to `nil`
Copy link
Member

Choose a reason for hiding this comment

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

FYI in case you weren't aware, you can break this line up into multiple lines for readability and it will still render the same in quick help / summary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Haha good call, i didn't notice the line was so long because of the auto line breaks in Xcode 😅 .
I will tweak all doc comments in a following PR

Co-authored-by: Ian Saultz <52051793+atierian@users.noreply.github.com>
@sebaland sebaland merged commit be0096a into feature/authenticator Apr 13, 2023
@sebaland sebaland deleted the authenticator/views branch April 14, 2023 20:44
sebaland added a commit that referenced this pull request Apr 17, 2023
* feat(Authenticator): Adding all Authenticator Views

* Update Sources/Authenticator/Views/SignUpView.swift

Co-authored-by: Ian Saultz <52051793+atierian@users.noreply.github.com>

---------

Co-authored-by: Ian Saultz <52051793+atierian@users.noreply.github.com>
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