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

Notebook history does not handle single new line #2260

Open
mehmetoguzderin opened this issue Sep 17, 2019 · 3 comments
Open

Notebook history does not handle single new line #2260

mehmetoguzderin opened this issue Sep 17, 2019 · 3 comments

Comments

@mehmetoguzderin
Copy link
Contributor

mehmetoguzderin commented Sep 17, 2019

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.

@wlach
Copy link
Contributor

wlach commented Sep 19, 2019

This sounds like a bug in react-diff-viewer, if you wanted to provide a test case and a PR there, we could pick up the fix on their next release.

@bcolloran
Copy link
Contributor

@wlach @mehmetoguzderin created a new issue #2275 about moving off of react-diff-viewer. just posting here as an fyi since you guys are looking at the diff viewer stuff. @mehmetoguzderin if this is of interest to you, you'd be very welcome to give it a shot.

@mehmetoguzderin
Copy link
Contributor Author

@wlach @mehmetoguzderin created a new issue #2275 about moving off of react-diff-viewer. just posting here as an fyi since you guys are looking at the diff viewer stuff. @mehmetoguzderin if this is of interest to you, you'd be very welcome to give it a shot.

I think I can try it out!

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

3 participants