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

Use nbdime in JupyterLab's suggestion system #751

Open
davidbrochart opened this issue Mar 22, 2024 · 2 comments
Open

Use nbdime in JupyterLab's suggestion system #751

davidbrochart opened this issue Mar 22, 2024 · 2 comments

Comments

@davidbrochart
Copy link
Member

I'm working on supporting suggestions in RTC, similarly to Google Docs. Currently, we don't have the "unified view" of all the suggestions that Google Docs provide. Instead, users can only decide to see the document where someone is suggesting (the fork), or see the original document (the root), but they cannot see a diff. When they are satisfied with a fork, they can merge it back into the root.
Do you think nbdime could be used for that? It obviously cannot show a unified view of all the diffs, but at least it could show a diff of the fork vs the root. It seems that it would allow us to quickly have a nice UI, but I'm wondering if it would be easy to integrate into RTC's suggestion system. Also, is it able to show live editing of the two branches?

cc @trungleduc

@trungleduc
Copy link

My first impression:

  • nbdime exposes an endpoint (/api/diff ) via a server extension to compute the diff between two notebooks.
  • We can create a suggestion widget that keeps a copy of the original notebook, and send requests to the backend on suggestion changed events to compute the diff and then render the output with the current nbdime's NotebookDiffWidget widget.
  • We might want to debounce the diff requests to reduce server load.

@davidbrochart
Copy link
Member Author

OK so not very real-time friendly, but that could be a quick path.

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

No branches or pull requests

2 participants