Repository navigation
Add option to retry cloning upon thrown clone errors - #7080
Merged
outofambit merged 16 commits intoApr 30, 2020
Merged
outofambit merged 16 commits into
outofambit merged 16 commits into
Conversation
Contributor
Member
Author
|
@tierninho That is definitely a good point. I can certainly widen the popup dialog. The reason I chose to do this is because it did not seem preferable to have this dialog up during the entire cloning process. |
niik
reviewed
Mar 15, 2019
A dialog is being created for handling cloning errors and giving the user an opportunity to retry a clone. This defines the popup type that will be used for creating and showing a Retry Clone dialog.
Previously if a clone failed and returned a git error such as when failing due to connection issues, a git error was presented directly to the user. These errors are not great for the user as they are intimidating and potentially confusing or vague. This dialog will display to the user that cloning has failed and if possible, offer them the chance to retry cloning.
Previously the RetryCloneDialog has been added as well as the RetryClone popup type. Now, so that the dialog can be used, we are connecting the App.tsx to create a RetryCloneDialog when it recieves a RetryClone Popup.
Added handler to catch errors thrown due to attempting to clone with no internet connection. If this error is thrown, it will be caught, and a new user facing error will be displayed. The new error will be passed into the retry clone dialog.
An error handler for git clone connection errors. Now the handler has been registered to be used in conjunction with the existing handlers, giving it a chance to check if it is a match for any thrown errors.
Previously a new error message was used to replace the existing Git Clone Connection error. However, in an effort to make this handler more generic and be able to used for any clone errors, we will send in the error message itself to be used in the dialog.
Since this error handler is becoming a generic git clone error handler intended to pass clone errors to a retry dialog, it is no longer valuable to have errors that don't have a retryAction available. Those errors will instead be thrown with the default error handler since they don't gain value from the retry dialog.
The retry clone dialog has become more multi-purpose. Instead of replacing errors and showing it's own text, it now will display the error text directly. It will display any clone failure error and offer to retry cloning if applicable. If there is no retry error, the retry dialog will not be used, and that error will instead be passed to the default handler. Messages are no longer optional as well. However, if the message contains no text it will use a fallback text.
Previously this handler was designed to only work with the HostDown dugite clone error. However, the purpose has shifted to make retrying a clone for any type of clone error that is thrown. The function will escape by returning the error immediately if the retryAction (if any) is not a Clone retryAction. This should allow throwing up the retry popup only when an error is a clone error and has the ability to retry.
Previously this error handler was intended for the HostDown dugite error. However it has since been made more general, and the name of the handler should match.
Added a background color to distinguish the repository name from the rest of the text.
Added more styling to distinguish the repository name from the rest of the text. This has been made to match the styling for the repository name in the URL tab of the Clone Repository dialog.
The Ref component exists for the purpose done with the added styling. Therefore this can be simplified and improve reuse by importing and using the ref component.
Previously the dialogue used the ButtonGroup, but it has since been replaced with the OkCancelButtonGroup. This section has been updated to reflect this.
Previously the button component was being used in conjunction with the ButtonGroup. However the ButtonGroup has been replaced with the OkCancelButtonGroup which does not require including the Button component externally.
outofambit
force-pushed
the
Add-Option-To-Retry-Cloning
branch
from
April 30, 2020 00:05
0878ee5 to
1e30379
Compare
outofambit
approved these changes
Apr 30, 2020
outofambit
left a comment
Contributor
There was a problem hiding this comment.
this looks good! thank you @Daniel-McCarthy and apologies for the glacial pace we've had to get this in. 💙
Member
Author
|
That's great news! No worries at all, thanks for taking on the PR for review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Overview
Closes #926
Description
Note: Although the functionality of this pull request does not depend on it, testing theHostDowncloning error will not be possible until Issue #7057 is resolved and merged into this branch.Update: Dugite has been updated and the development branch has been merged into this PR. This should now be able to be tested appropriately with the
HostDownerror.Release notes
Notes: Adds ability to retry cloning when error is shown.