-
Notifications
You must be signed in to change notification settings - Fork 313
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
close diff window when changes to file are discarded #1132
Conversation
Thanks @BoscoCHW We may take a slightly different approach to avoid code duplication. When creating the diff widget at https://github.com/jupyterlab/jupyterlab-git/blob/master/src/commandsAndMenu.tsx#L854, we could add a callback on |
@fcollonval
|
The implementation looks good, thanks for changing it.
The unmodified status is set there. It is set only when triggering the file browser context menu because we want to display the menu to open the git history for a versioned file that is not currently modified. But in this case, this is as you figure out. If the file is not listed in
Theoretically, it is a good practice to do so. But the widget itself has a clean up code when disposed to remove any slot. |
Remove console log Co-authored-by: Frédéric Collonval <fcollonval@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.
Thanks a lot @BoscoCHW
@fcollonval
Implemented closing of diff window when the changes to file are discarded, but I copied a lot of codes from the gitFileDiff command
Fixes #911
Edited to link the issue