jupyterlab-git icon indicating copy to clipboard operation
jupyterlab-git copied to clipboard

Add push notifications on updates to a repository

Open KrishnaKumarHariprasannan opened this issue 4 years ago • 8 comments
trafficstars

Is your feature request related to a problem? Please describe.

In a collaborative environment, where two or more people are working on a shared notebook (or any other document), it will be useful to know when there are updates done on that notebook by others and pull those changes.

Describe the solution you'd like

Github PR shows a "Refresh" button in PRs and Confluence has a "Reload Page" notification for such scenarios - a similar toast and/or notification on the sidebar can help (not sure this is the right UX). To be clear, we would fetching for updates (to raise notifications) and apply those changes only upon confirmation from the user.

Describe alternatives you've considered

None

Hey @KrishnaKumarHariprasannan thank you for reaching out.

There is already an indicator showing (a orange point) on the push/pull icons if you are on the latest commit (see https://github.com/jupyterlab/jupyterlab-git/releases/tag/v0.23.0). Is that what you are looking for? Or would you like this information presented differently?

fcollonval avatar Jan 21 '21 15:01 fcollonval

Hi @fcollonval, Thanks for your response!

Is that what you are looking for? Or would you like this information presented differently?

This is definitely closer to the workflow I had in mind - my previous update was meant to suggest adding notifications at a file level (the current indicator shows the changes at a repository level) - from a given set of changes available, one would care more about the files that they're currently working on and so we might want to treat those differently (with higher urgency/importance). Does that sound good to you?

Does that sound good to you?

Yes thank you for the clarification. So indeed this will be a new feature as it will require to figure out precisely which files are behind.

fcollonval avatar Jan 21 '21 17:01 fcollonval

@KrishnaKumarHariprasannan how do you envision the file notifications working? Some options I have thought of are

  1. add a section to the git panel with upstream changed files and then the listed files,
  2. add notification badges to the files in the file browser panel or
  3. have a popup that the user has to acknowledge with the changed files listed.

What are your thoughts? The second option here would probably take a fair amount of effort with the others (1, 3) being easier

andrewfulton9 avatar Mar 09 '21 21:03 andrewfulton9

@andrewfulton9, a combination of 1. and 3. would work well.

Elaborating on the above, the extension would

  • Show indicator on the pull button and list upstream file changes (in a separate panel) when the main/current branch
    • has changes that does not overlap the currently open/modified files
    • has changes that overlaps the currently open/modified files
  • Raise toast notifications when the main/current branch
    • has changes that overlaps the currently open/modified files

How does that sound?

@KrishnaKumarHariprasannan, I've been working on this in a branch on my fork.

So far I have:

  • added remote changes section
  • filled remote changes section with files that have changed on remote branch
  • added B status symbol next to file to show that it is behind on local repo. image

I am wondering on what people's thoughts are for what available options for the files in the remote section should be. Currently I just have it so that a user can open the local version of the file. I was thinking on adding the capability to checkout the remote file into the current branch, raising a warning if there are local changes that would be overwritten, and also to see the diff between the remote file and the local file.

andrewfulton9 avatar Jun 18 '21 17:06 andrewfulton9

Hey @andrewfulton9

Thanks for working on this one. This looks great. The features you are proposing (aka pull only one file and show the diff) would be a great addition too. Don't hesitate to start a draft PR.

fcollonval avatar Jun 21 '21 15:06 fcollonval

Thanks @fcollonval! I added draft PR #962.

andrewfulton9 avatar Jun 24 '21 16:06 andrewfulton9