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: Notify the user when an error is encountered when adding new accounts (#1252) #1253

Merged
merged 8 commits into from
May 6, 2023

Conversation

Cubik65536
Copy link
Contributor

@Cubik65536 Cubik65536 commented Apr 30, 2023

Description

  • Replace GitURL.baseURL with SourceControlAccount.Provider.apiURL and GitURL.webURL with SourceControlAccount.Provider.baseURL to prevent confusion between usage of these URLs.
  • Place the duplicate account check before signing request process
    • This can reduce the amount of useless API requests as, in this case, no matter the request result, the account can't be added anyway.
  • Alert the user when trying to add an existing account.
  • Alert the user when there's no internet connection.
  • Alert the user when signin request failed.
    • GitHub
    • GitLab

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

image

Video Demo:

2023-05-01.00-22-11.mov

Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
…fore sign in

Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
…ount

Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
Signed-off-by: Qian Qian "Cubik"‎ <cubik65536@cubik65536.top>
@Cubik65536 Cubik65536 marked this pull request as ready for review May 1, 2023 04:25
0xWDG
0xWDG previously approved these changes May 5, 2023
@austincondiff
Copy link
Collaborator

It looks like there is a SwiftLint error. Please resolve.

@Cubik65536
Copy link
Contributor Author

It looks like there is a SwiftLint error. Please resolve.

fixed

@Cubik65536 Cubik65536 requested a review from 0xWDG May 5, 2023 17:05
Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

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

Looks great!

@austincondiff austincondiff merged commit aaae8a9 into CodeEditApp:main May 6, 2023
@Cubik65536 Cubik65536 deleted the add-account-error-alert branch May 6, 2023 02:35
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.

✨ Notify the user when an error is encountered when adding new accounts
4 participants