StanfordSpezi / SpeziAccount

The Spezi Account module to enable login and signup functionality
https://swiftpackageindex.com/StanfordSpezi/SpeziAccount/documentation/
MIT License
6 stars 5 forks source link

Allow to supply active account details with the AccountConfiguration for previews #46

Closed Supereg closed 10 months ago

Supereg commented 10 months ago

Allow to supply active account details with the AccountConfiguration for previews

:recycle: Current situation & Problem

As of right now the desired way to provide access to the Account object for previewing purposes with active account details, is by creating the Account instance yourself and putting it into the environment. With the introduction of the new previewWith modifier in Spezi 1.0, we now have a framework-defined way of configuring modules for Previews. Therefore, this PR adds support to configure the AccountConfiguration for previewing purposes.

:gear: Release Notes

:books: Documentation

Documentation was added.

:white_check_mark: Testing

TBA

:pencil: Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Supereg commented 10 months ago

Aiming to tag this as an 1.1.0.

codecov[bot] commented 10 months ago

Codecov Report

Attention: 68 lines in your changes are missing coverage. Please review.

Comparison is base (f1d9262) 76.90% compared to head (d6a21b5) 76.03%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46/graphs/tree.svg?width=650&height=150&src=pr&token=AudNwGU7tR&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #46 +/- ## ========================================== - Coverage 76.90% 76.03% -0.87% ========================================== Files 116 117 +1 Lines 3969 4016 +47 ========================================== + Hits 3052 3053 +1 - Misses 917 963 +46 ``` | [Files](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [Sources/SpeziAccount/Account.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudC5zd2lmdA==) | `79.65% <ø> (-2.65%)` | :arrow_down: | | [...count/ViewModel/AccountOverviewFormViewModel.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvVmlld01vZGVsL0FjY291bnRPdmVydmlld0Zvcm1WaWV3TW9kZWwuc3dpZnQ=) | `93.17% <100.00%> (+0.09%)` | :arrow_up: | | [Sources/SpeziAccount/AccountOverview.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudE92ZXJ2aWV3LnN3aWZ0) | `54.39% <0.00%> (-1.97%)` | :arrow_down: | | [...iews/AccountOverview/AccountOverviewSections.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvVmlld3MvQWNjb3VudE92ZXJ2aWV3L0FjY291bnRPdmVydmlld1NlY3Rpb25zLnN3aWZ0) | `88.37% <0.00%> (-0.76%)` | :arrow_down: | | [Sources/SpeziAccount/AccountHeader.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudEhlYWRlci5zd2lmdA==) | `0.00% <0.00%> (ø)` | | | [...Account/Views/AccountSetup/FollowUpInfoSheet.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvVmlld3MvQWNjb3VudFNldHVwL0ZvbGxvd1VwSW5mb1NoZWV0LnN3aWZ0) | `87.39% <0.00%> (-1.60%)` | :arrow_down: | | [...nt/Views/AccountOverview/PasswordChangeSheet.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvVmlld3MvQWNjb3VudE92ZXJ2aWV3L1Bhc3N3b3JkQ2hhbmdlU2hlZXQuc3dpZnQ=) | `87.50% <0.00%> (-1.71%)` | :arrow_down: | | [...count/Views/AccountOverview/SecurityOverview.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvVmlld3MvQWNjb3VudE92ZXJ2aWV3L1NlY3VyaXR5T3ZlcnZpZXcuc3dpZnQ=) | `71.93% <0.00%> (-2.61%)` | :arrow_down: | | [...Account/Views/AccountOverview/SingleEditView.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvVmlld3MvQWNjb3VudE92ZXJ2aWV3L1NpbmdsZUVkaXRWaWV3LnN3aWZ0) | `81.04% <0.00%> (-2.89%)` | :arrow_down: | | [Sources/SpeziAccount/AccountConfiguration.swift](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-U291cmNlcy9TcGV6aUFjY291bnQvQWNjb3VudENvbmZpZ3VyYXRpb24uc3dpZnQ=) | `60.44% <33.34%> (-3.41%)` | :arrow_down: | | ... and [4 more](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [f1d9262...d6a21b5](https://app.codecov.io/gh/StanfordSpezi/SpeziAccount/pull/46?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi).