Resolve "Comments not being added on Ipynb Diffs"
What does this MR do and why?
When we create semantic notebook diffs, we need to map the lines of the transformed diff to lines on the original diff, so that comments can be assigned to the correct place. If lines can't be mapped, they shouldn't be able to receive comments. The mapping of lines that have mapping was working fine, but we were having problems with lines that didn't have proper mapping:
This also adds further testing and documentation to Notebook::DiffFileHelper, removing all dependencies from the rest of the codebase.
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Navigate to gitlab gitlab-test@5d6ed150 on your local gdk
- Verify that lines that appear on the raw diff have mapping
- Verify the lines that don't have mapping are blank and don't allow comments.
- For example, the first line has the description of the cell, but the line that starts that cell was cut off from the raw cell
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #364533 (closed)
Edited by Eduardo Bonet