-
Notifications
You must be signed in to change notification settings - Fork 323
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 'open file' command to context menu on diff tab #1135
Conversation
I successfully implemented opening a diff-ed file from the context menu. However, since the tab element of the diff window does not have a custom class, I cannot select only the diff tabs to add the command. I am unable to add a class to the diff tab also. Please let me know what I can do. Thank you! |
@BoscoCHW I looked for a solution, you can add a class to the diff widget title that will allow to set a more specific context menu selector. You can add a class using jupyterlab-git/src/commandsAndMenu.tsx Line 521 in 708d19f
|
@fcollonval |
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 @BoscoCHW
Two minor suggestions and we are good to go.
Co-authored-by: Frédéric Collonval <[email protected]>
@BoscoCHW I took the liberty to improve a bit your PR to open the file even if it is not in the status file list (aka when the file is not being modified). And I extended the diff widget API to get access to the diff model. That allows a more reliable access to the filename than reading the |
Fixes #941