Side-by-side contextual split, where markdown cells are linked/anchored to lines of a code in a code-cell on the side.
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
### Problem
Notebooks tend to get long. Screens are usually oriented in landscape mode. We often have markdown cells before code cells to explain what the code below it is doing. This makes the notebook longer.
### Proposed Solution
If we can link lines in a markdown cell to pin text content to code in a separate cell shown on the side, this would reduce the notebook height. Code and contextual text/comments are now viewed side-by-side. This feature could use special symbols that are picked up in the side-by-side contextual view. These special symbols serve two purposes, (1) to not break existing functionality, and (2) to instruct the renderer which line of code is referred to from the markdown so that as we scroll in the markdown box, the "anchored" line of code also scrolls together into view. This synchronized scrolling happens when we either scroll in the code cell on the left or in the markdown cell on the right. Scrolling in the code cell, scrolls the markdown cell to the anchored/pinned text and vice versa.
### Additional context
The UI idea is very similar to this comparison view of Bitbucket for code revisions, see: https://youtu.be/9K7L0QgcrO0?t=53. The split view would be an optional feature, with the anchors being optional as well. The anchoring symbol idea is similar to HTML's href anchors where we have a label anchor and an ahref that points to that label (e.g. in Python `# a:somelabel` and in Markdown `$=somelabel`).
Contributor guide
Research direction
No files, tests, or entry points are named. Begin by scoping the optional split view, anchor syntax, and synchronized scrolling described here; done would mean those behaviors are specified and implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100