-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Make sure to only pass complete account details to the account setup complete closure #79
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
+ Coverage 83.79% 83.84% +0.05%
==========================================
Files 122 121 -1
Lines 5204 5251 +47
==========================================
+ Hits 4360 4402 +42
- Misses 844 849 +5
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the improvements here @Supereg; great to see this merged & incorporated in our apps 🚀
…49) # Always notify Account when FirestoreAccountStorage receives snapshot ## ♻️ Current situation & Problem With StanfordSpezi/SpeziAccount#79 we only forward "complete" account details to the `setupComplete` closure of the `AccountSetup` view. This requires that the StorageProvider always updates the account details (to clear the incomplete flag) even if there aren't any keys stored in the storage provider. This wasn't the case for FirestoreAccountStorage resulting in the `setupComplete` closure to never be called and the `incomplete` flag to never be cleared. ## ⚙️ Release Notes * Fixed an issue where the `incomplete` flag would never be cleared if there weren't any details stored for an account. ## 📚 Documentation -- ## ✅ Testing -- ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
Make sure to only pass complete account details to the account setup complete closure
♻️ Current situation & Problem
The
AccountSetup
accepts asetupComplete
closure that will get called once the setup is completed giving the parent view the opportunity to perform additional checks or navigation steps based on the outcome. While aAccountService
always calls anExternalStorageProvider
before submitting account details toAccount
, they have been decoupled in v2.0.0 and anExternalStorageProvider
must always return immediacy from itsload
call. In scenarios where account details are not locally cached yet, anExternalStorageProvider
returns details that are marked as incomplete.AccountSetup
didn't check for this flag and forwarded incomplete details to thesetupComplete
closure. This PR fixes this issue and updates the behavior to only forward account details that are also marked as complete.⚙️ Release Notes
AccountSetup
would forward incomplete account details and didn't wait for anExternalStorageProvider
to load externally stored account details.flags
wouldn't be copied between account details.📚 Documentation
We improved some of the documentation discoverability.
✅ Testing
Added UI tests to verify that the incomplete details are not passed to the
setupComplete
closure.📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: