question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Impossible to update an open diff

See original GitHub issue

Description

If you have a tab with the diff of a file and then make further changes to the file you will be unable to see these changes reflected in the diff until you close the diff tab and create a new one. diff-not-updating

Clicking the diff action button again does not update the diff on account of the checking done here: https://github.com/jupyterlab/jupyterlab-git/blob/8d56986409461cd9968d7208da4946fca8c70392/src/components/diff/DiffWidget.tsx#L31-L35

Reproduce

  1. Make changes to a file
  2. Open a diff of that file
  3. make more changes
  4. try to update the diff without closing the diff tab.

Expected behavior

When clicking the Diff button the diff will be recomputed.

Two nice to have features would be:

  1. Option to refresh the diff from a context menu when right clicking the diff widget
  2. diffs that are visible are recomputed every so often, or whenever the diff is focused.

Context

  • Python package version: 0.20.0rc0
  • Extension version: 0.20.0-rc.0
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jaipreet-scommented, Apr 30, 2020

Agreed with @kgryte that this shouldn’t be configurable.

https://github.com/jupyterlab/jupyterlab-git/blob/8d56986409461cd9968d7208da4946fca8c70392/src/components/diff/DiffWidget.tsx#L31-L35

The intent of this line was to not open a new tab every-time the diff button is clicked. I do think we should retain that UX while addressing this to avoid an explosion of diff tabs.

Now, if a mainAreaItem with an id is found, We could address this in two ways to ensure the content gets updated with the latest diff.

  1. Close that one and create a new one its place, rather than activating it, or
  2. Just update the content of the mainAreaItem and then activate it.

P.S. Thanks for all the recent reports and PRs @ianhi !

0reactions
ianhicommented, Jun 7, 2020

Don’t autoclose the diff, that’s too confusing. Just show some notification that the contents are the same (or whatever nbdime normally does on an empty diff)

👍

Another weird issue with the diff tabs is that if you have both an editor of the file and the diff open, then right click to close the diff tab the editor:

Turns out this is indeed a jupyterlab issue: https://github.com/jupyterlab/jupyterlab/issues/8509

Read more comments on GitHub >

github_iconTop Results From Across the Web

iOS update and restore errors - Apple Support
Learn how to solve iOS update and restore errors.
Read more >
Can't update apps in iOS App Store; can only Open
When I open the App Store and go to the Updates page, there are two apps at the top, which for a split-second...
Read more >
Troubleshoot problems updating Windows - Microsoft Support
Learn how to troubleshoot problems updating Windows. Find answers to common questions and issues installing Windows updates.
Read more >
Can you convert an open differential to a limited slip? - Quora
The question is about converting the open diff to an LSD, most appear to think you want to swap it out for an...
Read more >
How to Fix WhatsApp Not Updating on iPhone/Android - iMobie
This guide explains why you are unable to update WhatsApp and ... this issue and different solutions on how to update WhatsApp on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found