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

Move retry clone dialog into AppError #9944

Merged
merged 21 commits into from Jun 9, 2020
Merged

Conversation

niik
Copy link
Member

@niik niik commented Jun 5, 2020

Description

@rafeca ran into an edge case where a clone failed due to some refspec tomfoolery he was up to and noticed that the dialog presenting the error extended way beyond the window dimensions.

image

That's certainly not great UX. Upon seeing the image I was surprised that the git error output wasn't monospaced as I'd done some work to ensure that it was in #8964. Turns out that's because it's a custom dialog invoked through an error handler and as such doesn't enjoy any of the improvements we've made to app errors recently.

It also meant that the error text wasn't selectable, and that the error message didn't overflow using a capped max-height like in the AppError case.

What I've done now instead is to remove the custom error handler and move the detection logic for this particular error into the AppError dialog similar to how we've had custom support for auth errors there.

Note: this does complicate the logic of the AppError component in a fairly nasty way since it means we'll have to check for this error in three places (when determining the title, when rendering the contents, and when rendering the footer). This is a limitation that me and @rafeca discussed and that we think we can get around with some refactoring of the AppError component but not something I want to tackle in this PR.

Screenshots

Before

Screen Shot 2020-06-05 at 13 08 20

After

Screen Shot 2020-06-05 at 13 06 29

Release notes

Notes: [Improved] Clearer presentation of error message when a clone fails

Copy link
Contributor

@rafeca rafeca left a comment

Choose a reason for hiding this comment

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

Yay!! This is so much better than before! I agree about refactoring the <AppError/> component (and also agree that we should do it separately from this).

I've made a few suggestions (all of them stylistic I think).

app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
@@ -1,76 +0,0 @@
import * as React from 'react'
Copy link
Contributor

Choose a reason for hiding this comment

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

So good to delete this file!!! 🌶️

* Handle git clone errors to give chance to retry error.
* Doesn't handle auth errors.
*/
export async function gitCloneErrorHandler(
Copy link
Contributor

Choose a reason for hiding this comment

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

yay!

niik and others added 13 commits June 8, 2020 19:01
Co-Authored-By: Rafael Oleza <rafeca@users.noreply.github.com>
Co-Authored-By: Rafael Oleza <rafeca@users.noreply.github.com>
Co-Authored-By: Rafael Oleza <rafeca@users.noreply.github.com>
Co-Authored-By: Rafael Oleza <rafeca@users.noreply.github.com>
Co-Authored-By: Rafael Oleza <rafeca@users.noreply.github.com>
Co-Authored-By: Rafael Oleza <rafeca@users.noreply.github.com>
…use in getDescriptionForError

Co-Authored-By: Rafael Oleza <rafeca@users.noreply.github.com>
Co-Authored-By: Rafael Oleza <rafeca@users.noreply.github.com>
@niik niik requested a review from rafeca June 8, 2020 17:51
rafeca
rafeca previously approved these changes Jun 9, 2020
Copy link
Contributor

@rafeca rafeca left a comment

Choose a reason for hiding this comment

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

This is great! Just added a comment but approving since I don't think it's worth blocking the merge.

app/src/ui/app-error.tsx Outdated Show resolved Hide resolved
Co-authored-by: Rafael Oleza <rafeca@github.com>
Copy link
Contributor

@rafeca rafeca left a comment

Choose a reason for hiding this comment

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

@niik niik merged commit 0c3fe5f into development Jun 9, 2020
@niik niik deleted the retry-action-in-app-error branch June 9, 2020 09:37
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.

None yet

2 participants