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
Conversation
There was a problem hiding this 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).
@@ -1,76 +0,0 @@ | |||
import * as React from 'react' |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
There was a problem hiding this 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.
Co-authored-by: Rafael Oleza <rafeca@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 theAppError
component but not something I want to tackle in this PR.Screenshots
Before
After
Release notes
Notes: [Improved] Clearer presentation of error message when a clone fails