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

add context menu option to delete untracked files #815

Merged
merged 1 commit into from
Nov 3, 2020

Conversation

ianhi
Copy link
Collaborator

@ianhi ianhi commented Oct 31, 2020

Closes: #687

Made a new command for this so we can present a warning dialog. Using the docmanager:delete-file command directly doesn't allow for a warning dialog.

@ianhi
Copy link
Collaborator Author

ianhi commented Oct 31, 2020

delete-untracked

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Almost good to go.

You should wait on the command execution otherwise error may not be catch.

});
if (result.button.accept) {
try {
app.commands.execute('docmanager:delete-file', {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
app.commands.execute('docmanager:delete-file', {
await app.commands.execute('docmanager:delete-file', {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done - thanks!

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks LGTM!

@fcollonval fcollonval merged commit a08c424 into jupyterlab:master Nov 3, 2020
@ianhi ianhi deleted the delete-untracked branch November 3, 2020 18:42
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.

Add Delete option to untracked files in git menu
2 participants