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

Use custom error dialogs for all Git errors #670

Open
ianhi opened this issue Jun 7, 2020 · 2 comments
Open

Use custom error dialogs for all Git errors #670

ianhi opened this issue Jun 7, 2020 · 2 comments
Labels
enhancement Good first issue Good first issue to be tackled by new contributors pkg:Frontend
Milestone

Comments

@ianhi
Copy link
Collaborator

ianhi commented Jun 7, 2020

Description

follow-up of #619

The jupyterlab provided showErrorMessage is nice because it is consistent with the rest of the application and is always available. However I think that it is generally not expressive enough for showing git related error messages. These error messages generally have some structure to them when they are present by the git CLI, for example git pull:

image
but with showErrorMessage it is impossible to retain this structure and the message ends up all squashed together:
image

The other case where this comes up is listing files that have merge conflicts. In that case it is nice to visually separate the list of files from the rest of the error message.

Would it be beneficial to have a custom error message template for all these case, or is it fine to fix them all individually using showDialog?

List of error dialogs that could be improved:

Push and pull:

Failed pull:
image

could offer a button in the dialog to run the set-upstream-to command
push:
image
vs:
image

Unlike pull this is an edited version of the error text that git generates. Would be nice to prompt that a remote needs to be added.

revert commit failure:

image

failed clone:
I think the 'fatal' isn't helpful in the context of an error message, if anything it could add confusion
image

@kgryte
Copy link
Member

kgryte commented Jun 8, 2020

In general, I'd argue that we should ditch all JLab dialogs in the Git extension. They are harder to work with compared to React dialogs, and they introduce a separate coding paradigm within the codebase.

@ianhi
Copy link
Collaborator Author

ianhi commented Jun 12, 2020

It maybe will be helpful to have a catalog of the various errors that can can result from failed git commands. It's not always obvious what all the failure modes of a git command are and they will often require different formatting for nice display. If there are no complaints I'll post errors as I encounter them here? Also this error from a failed revert commit (have staged changes that will conflict with the reversion of an old commit) is spectacular - "Error: error: ...."

image

With the same changes but without staging them:
image

@fcollonval fcollonval added this to the 1.0.0 milestone Sep 22, 2020
@fcollonval fcollonval added the Good first issue Good first issue to be tackled by new contributors label Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Good first issue Good first issue to be tackled by new contributors pkg:Frontend
Projects
None yet
Development

No branches or pull requests

3 participants