Repository navigation
Allow user to sign in if fetch fails - #903
Conversation
|
@desktop/core Anyone has any suggestions for how to notify the user that they have to sign in? I was thinking we could have a banner come from the top of the app with the message along with a call to action button that pops up the current login component. |
|
@iAmWillShepherd there was a thread where @joshaber was musing about these flows, wasn't there? Or did I imagine it? |
Hmm not that I recall...
I think for now we should pop an alert whose action button opens Preferences to the Accounts tab. Down the road we should think more about how these sort of notifications work. cc @niik @donokuda |
Getting some of that error handling magic
Conflicts: app/npm-shrinkwrap.json
|
Finally ready to be reviewed! 💯 |
|
Ready for review 💯 |
niik
left a comment
There was a problem hiding this comment.
Getting real close @iAmWillShepherd. Could you take a stab at making that error message a little bit more human friendly? Perhaps we could add a line after the current text saying something along the lines of
Open (preferences|options) and verify that you're signed in with an account that has permission to access this repository.
| case GitErrorType.HTTPSAuthenticationFailed: { | ||
| return ( | ||
| <ButtonGroup> | ||
| <Button type='submit'onClick={this.showPreferencesDialog}> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| }, dialogTransitionLeaveTimeout) | ||
| } | ||
|
|
||
| private handleGitError(error: GitError) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| transitionEnterTimeout={dialogTransitionEnterTimeout} | ||
| transitionLeaveTimeout={dialogTransitionLeaveTimeout} | ||
| > | ||
| transitionLeaveTimeout={dialogTransitionLeaveTimeout}> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| return ( | ||
| <ButtonGroup> | ||
| <Button type='submit'onClick={this.showPreferencesDialog}> | ||
| Open Preferences |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
I don't mind changing the Git Error message, but that will mean I will have to update the It looks like all the messages in that function are actually giving you a _what/why statement, not an action statement, so updating the message would make it a bit inconsistent. |
| <Button type='submit'onClick={this.showPreferencesDialog}> | ||
| {__DARWIN__ ? 'Open Preferences' : 'Open options'} | ||
| </Button> | ||
| <Button type='submit'>Close</Button> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| case GitErrorType.HTTPSAuthenticationFailed: { | ||
| return ( | ||
| <ButtonGroup> | ||
| <Button type='submit'onClick={this.showPreferencesDialog}> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| transitionEnterTimeout={dialogTransitionEnterTimeout} | ||
| transitionLeaveTimeout={dialogTransitionLeaveTimeout} | ||
| > | ||
| transitionLeaveTimeout={dialogTransitionLeaveTimeout}> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Yeah, it's not ideal but I think we'll have to live with it for now |
| * has been shown to, and been dismissed by, the user. | ||
| */ | ||
| readonly onClearError: (error: Error) => void | ||
| readonly onShowPopup?: (popupType: Popup) => void | undefined |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| private renderDialog() { | ||
| private showPreferencesDialog = () => { | ||
| const showPreferences = this.props.onShowPopup |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Ready for review 💯 |
|
It's been a long time coming! |
|
Hoping no more architecture changes happen in the middle of my features |




This PR addresses #851.