refactor: use error alert modal to display errors #1280
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Centralized error modal system implemented
Automatic error modal display for authentication errors
Integration with all authentication flows
Modal dismissal
Modal is on AuthPickerView which is the parent of all Views (Except PhoneAuthView which is isolated from AuthPickerView).
PhoneAuthView is a separate modal and also uses the errorModal locally as opposed to using the error modal in AuthPickerView.
Removed all error messages appearing in Views.
Updated Password Recovery View to have a success sheet if successful, but falls back to error modal if fails.
Wrote a couple of UI tests for email and Facebook provider to check the modal is activated on sign-in failure.
There's a bunch of formatting in this PR as well using swiftformat to keep code formatted.