Skip to content

Allow user to sign in if fetch fails - #903

Merged
niik merged 58 commits into
masterfrom
we_don_want_your_blankets_just_send_your_prs
Mar 23, 2017
Merged

niik merged 58 commits into
masterfrom
we_don_want_your_blankets_just_send_your_prs

Conversation

@iAmWillShepherd

Copy link
Copy Markdown
Contributor

This PR addresses #851.

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

@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.

@shiftkey

shiftkey commented Feb 7, 2017

Copy link
Copy Markdown
Member

@iAmWillShepherd there was a thread where @joshaber was musing about these flows, wasn't there? Or did I imagine it?

@joshaber

joshaber commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

there was a thread where @joshaber was musing about these flows, wasn't there?

Hmm not that I recall...

Anyone has any suggestions for how to notify the user that they have to sign in?

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

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

@joshaber says #860 may have some nice things to help me with this PR. I will wait on that to be merged so that I can stand on the shoulders of giants! 🖖

@joshaber joshaber mentioned this pull request Feb 15, 2017
@iAmWillShepherd iAmWillShepherd changed the title [WIP] Allow user to sign in if fetch fails Allow user to sign in if fetch fails Feb 27, 2017
@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

Finally ready to be reviewed! 💯

@niik niik self-assigned this Feb 27, 2017
@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

I am getting some weird behavior when I open the preference dialog from the event handler. It seems to open the error message in the background before opening the preferences dialog.

dialog

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

Ready for review 💯

@niik niik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Comment thread app/src/ui/app-error.tsx Outdated
case GitErrorType.HTTPSAuthenticationFailed: {
return (
<ButtonGroup>
<Button type='submit'onClick={this.showPreferencesDialog}>

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/ui/app-error.tsx Outdated
}, dialogTransitionLeaveTimeout)
}

private handleGitError(error: GitError) {

This comment was marked as spam.

Comment thread app/src/ui/app-error.tsx Outdated
transitionEnterTimeout={dialogTransitionEnterTimeout}
transitionLeaveTimeout={dialogTransitionLeaveTimeout}
>
transitionLeaveTimeout={dialogTransitionLeaveTimeout}>

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/ui/app-error.tsx Outdated
return (
<ButtonGroup>
<Button type='submit'onClick={this.showPreferencesDialog}>
Open Preferences

This comment was marked as spam.

@iAmWillShepherd

iAmWillShepherd commented Mar 16, 2017 •

Copy link
Copy Markdown
Contributor Author

I don't mind changing the Git Error message, but that will mean I will have to update the getDescriptionForError method in core.ts...

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.

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

I've noticed that the transition from the error dialog to the preferences dialog is not so good. Not sure what more I can do given how errors are handled in the UI.
2017-03-16 01_15_10

Comment thread app/src/ui/app-error.tsx Outdated
<Button type='submit'onClick={this.showPreferencesDialog}>
{__DARWIN__ ? 'Open Preferences' : 'Open options'}
</Button>
<Button type='submit'>Close</Button>

This comment was marked as spam.

Comment thread app/src/ui/app-error.tsx Outdated
case GitErrorType.HTTPSAuthenticationFailed: {
return (
<ButtonGroup>
<Button type='submit'onClick={this.showPreferencesDialog}>

This comment was marked as spam.

Comment thread app/src/ui/app-error.tsx Outdated
transitionEnterTimeout={dialogTransitionEnterTimeout}
transitionLeaveTimeout={dialogTransitionLeaveTimeout}
>
transitionLeaveTimeout={dialogTransitionLeaveTimeout}>

This comment was marked as spam.

@niik

niik commented Mar 16, 2017

Copy link
Copy Markdown
Member

I've noticed that the transition from the error dialog to the preferences dialog is not so good. Not sure what more I can do given how errors are handled in the UI.

Yeah, it's not ideal but I think we'll have to live with it for now

Comment thread app/src/ui/app-error.tsx Outdated
* 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.

Comment thread app/src/ui/app-error.tsx Outdated

private renderDialog() {
private showPreferencesDialog = () => {
const showPreferences = this.props.onShowPopup

This comment was marked as spam.

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

Ready for review 💯

@niik

niik commented Mar 23, 2017

Copy link
Copy Markdown
Member

yeay

@niik
niik merged commit d1b1eee into master Mar 23, 2017
@niik
niik deleted the we_don_want_your_blankets_just_send_your_prs branch March 23, 2017 21:48
@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

It's been a long time coming!

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

Hoping no more architecture changes happen in the middle of my features

@joshaber

Copy link
Copy Markdown
Contributor

Hoping no more architecture changes happen in the middle of my features

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.

4 participants