pull-requests icon indicating copy to clipboard operation
pull-requests copied to clipboard

Refactoring with jupyterlab-commenting

Open fcollonval opened this issue 4 years ago • 1 comments

Should we build on top of a common set of discussion components with https://github.com/jupyterlab/jupyterlab-commenting?

fcollonval avatar Mar 13 '21 16:03 fcollonval

Yes, there should be a common, useful Lumino Widget for threaded discussion topics, generic over a few axes, such as:

  • specific widget
  • some number of providers of
    • identity
    • storage

So we would have:

  • Discussion<Notebook, PullRequestsManager>
  • Discussion<Editor, PullRequestsManager>
  • Discussion<PullRequest, PullRequestsManager>

But for playing at home, and just storing stuff in notebook metadata, one might have:

  • Discussion<Notebook, NotebookMetadataManager>
    • here, the data model should likely be the Web Annotation Data Model, or more likely, some concrete realization of it as a JSON schema, as would be most consumable by other systems, some day (e.g. hypothes.is)
    • the big challenge is the selector for which there is not a canonical one
      • JMESPath might do the thing, or we treat the "canonical" HTML5 output as the thing, get those cell ids in there, etc.

Anyhow: I would not start with the code in that repo.

It looks very react-centric. As we've seen, it's desirable to have CodeEditor, the latex renderer, etc. to allow folks to customize stuff in a more Lab-centered way, and trying to shoehorn these into a lumino-react-lumino sandwich is no fun for anybody. We'd want the jupyterlab-markup, probably some nifty widgets for uploading, etc.

The sidebar UI concept is not really my favorite... ideally, there would be a preferred way to add Big Gutters to document activities that allowed stuff to play out nicely in e.g. single-document mode, jupyterlab-classic that could intelligently move cards up and down based on scroll position. This will get super-complicated with the virtual rendering.

So, I'd propose:

  • keep making this one as awesome as possible for the rich data model we have
  • keep in the back of our mind (as you have been on some of the refactorin :+1:) that it isn't just about pull requests, using generic terms
  • eventually split this repo into a lerna project, where the @jupyterlab/comment-cards or whatever is easy to observe
  • get it moved over to core
  • get back to making pull requests awesomer!

bollwyvl avatar Mar 13 '21 20:03 bollwyvl