Skip to content

Resolve "Highlighting lines is broken"

Mike Greiling requested to merge 23696-fix-diff-view-highlighting into master

What does this MR do?

Add line highlighting back to diff view. This was working in the MR "changes" tab, but not on a commit page such as winniehell/reproduction-area@9101e66f

This MR also fixes the scrollToElement method in MergeRequestTabs to account for the extra height of the tab links which are now fixed in place once they are scrolled to the top of the screen. (removed in favor of !7051 (merged))

This MR also refactors much of the Diff and MergeRequestTabs classes to es6 syntax in an effort to increase readability.

Are there points in the code the reviewer needs to double check?

Check out both MR "change" tabs and commit diff pages and ensure that line highlighting works and that loading a page with one of these permalink hashes correctly highlights and scrolls to the line.

Ensure I didn't break anything in the transition to es6 syntax. Check the functionality of the tabs on MR pages, as well as diff page interactivity (unfolding hidden lines in diff files, adding comments to diffs, etc). I have checked these myself, but another set of eyes would be a good idea.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #23696 (closed)

Merge request reports

Loading