iodide-project / iodide-project/iodide
Notebook history does not handle single new line
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
Revision browser does not show one new empty line as difference. The new line is detected correctly, saved but the difference is not visible in the revision browser, instead it only shows "Expand x lines ..." option. There are no problems with more than one empty new lines.
# Steps to Reproduce
- Create a new notebook
- Add a single new line anywhere
- Check notebook history
# Cause of the Problem
This problem is caused by the handling of `diff` module's output by `react-diff-viewer` module at `constructLines` function in `compute-lines.js`. If emptiness check and first-last modification disabled, behavior matches the expectation (Iodide system registers those new lines as change, as it should be). `react-diff-viewer` provides no way to change this behavior.
Contributor guide
Research direction
Start by reproducing the single-new-line case in the notebook history revision browser, then inspect react-diff-viewer's constructLines function in compute-lines.js and how its output is consumed. Done means one newly added empty line appears as a visible difference rather than only an "Expand x lines ..." option, while multiple empty lines continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100