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

Moving jupyterlab-comments repo from jupytercalpoly to jupyterlab #145

Open
JasonWeill opened this issue May 3, 2022 · 10 comments
Open
Labels
enhancement New feature or request

Comments

@JasonWeill
Copy link
Contributor

This is a follow up item from a meeting with @3coins, @afshin, @jtpio, @martinRenou, @fcollonval, @hbcarlos, @Zsailer, and others on May 3, 2022.

Problem

Currently, there are two repositories for commenting functionality in JupyterLab:

  1. https://github.com/jupyterlab/jupyterlab-commenting (Last modified May 1, 2020)
  2. https://github.com/jupytercalpoly/jupyterlab-comments (Last modified December 3, 2021)

I've been talking with @ellisonbg about incorporating the jupytercalpoly/jupyterlab-comments repository into JupyterLab core. At a meeting on May 3, we discussed archiving the older "commenting" repo and bringing the newer "comments" repo into the JupyterLab project.

Proposed Solution

  1. Archive the jupyterlab/jupyterlab-commenting repo
  2. Move jupytercalpoly/jupyterlab-comments into the jupyterlab project space
  3. Incorporate jupyterlab-comments (the extensions moved from jupytercalpoly) into the main jupyterlab/jupyterlab repository.

Additional context

The comments extension's UI should be integrated with the cell toolbar, which may require that the cell toolbar be modified to be visible even if it overlaps with cell content (jupyterlab/jupyterlab#12223).

@JasonWeill JasonWeill added the enhancement New feature or request label May 3, 2022
@ellisonbg
Copy link
Contributor

I think there is quite a bit of work still needed before (1) is ready for regular usage by JupyterLab users, but I think it is a much better starting point than (2) at this point. Based on this, I think the proposal makes sense. The other option is to use (1) create a branch of jupyterlab/jupyterlab, but that will be more difficult to develop and have people try out. For transparency, both the interns who built (1) and @jweill-aws work for me at Cal Poly and AWS respectively.

@JasonWeill
Copy link
Contributor Author

Other concerns about the JupyterLab comments had to do with the organization of files. Currently, jupytercalpoly/jupyterlab-comments stores comments data as a secondary file. This means that a notebook doesn't contain its own comments embedded. Transmitting a workbook with embedded comments requires sending two files. Alternatively, we could embed comments in the metadata field of a notebook.

Pros of using the metadata field:

  • Only one file required to share annotated notebooks

Cons of using the metadata field:

  • Other clients besides JupyterLab might not parse the metadata correctly or may overwrite it inadvertently
  • Doesn't solve the commenting problem for text files, which have no metadata field

@JasonWeill
Copy link
Contributor Author

We discussed this issue at the JupyterLab weekly meeting yesterday — see minutes: #135 (comment)

We discussed soliciting feedback on these moves from @jupyterlab/jupyterlab-council members. Thoughts about archiving the old jupyterlab/jupyterlab-commenting repo and moving jupytercalpoly/jupyterlab-comments into jupyterlab? The long-term goal would be to incorporate the latter, newer module into JupyterLab core.

@ellisonbg
Copy link
Contributor

ellisonbg commented May 5, 2022 via email

@jtpio
Copy link
Member

jtpio commented May 17, 2022

For reference, linking to jupyterlab/jupyterlab#12588 which pulls jupyterlab-calpoly/jupyterlab-comments into core.

@aiqc
Copy link

aiqc commented May 18, 2022

Related: jupyterlab/jupyterlab#12032

@williamstein
Copy link

I would be really happy if somebody who actually works on this also suggests how they would embed comments in the ipynb file, based on their experience... since this sort of functionality is something people grading homework as ipynb files frequently want.

@ellisonbg
Copy link
Contributor

ellisonbg commented May 19, 2022 via email

@JasonWeill
Copy link
Contributor Author

I'm reviewing the W3C Web Annotation Data Model, which declares that each "Annotation" has a "type" and a "target". The target IRI is like a URI, but with non-ASCII characters permitted. What would such a target look like in a Jupyter notebook? Do we have, or are we planning to make, an IRI schema for referring to one cell in a notebook or a portion thereof?

@fcollonval
Copy link
Member

an IRI schema for referring to one cell in a notebook or a portion thereof?

Is it not the fragment selector job to specify the position within the document and the target is the IRI to the notebook.
If so, looking at the PDF example (see previous link)

PDF http://tools.ietf.org/rfc/rfc3778 Example: page=10&viewrect=50,50,640,480

It seems we could do something similar using the standard cell uid and an editor positioning. But there is still the case of commenting an cell output to figure out then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants