Skip to content

Fix linking to line number on parallel diff creating empty discussion box

What does this MR do?

EE MR, https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2207

Fix linking to line number on parallel diff creating empty discussion box when there are discussions on the same line.

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

  • Using actual inline/parallel diff ajax responses in specs

Reproduction:

  1. Create a MR with some changes
  2. Switch to the parallel "Side-by-side" view, ?view=parallel
  3. Create a note on the diff and resolve it
  4. Click the line number that has the discussion on it. Your URL should look similar to this /diffs?view=parallel#3f58c61b62d64910afb975d31ceed28eb21c34c1_28_35
  5. Copy and visit the URL
  6. Notice, only the line is highlighted (no empty gray discussion box is shown)

Why was this MR needed?

Linking to line number on parallel diff when there are discussions on the same line, created an empty discussion box.

This regressed in 9.2 from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11327/diffs#192369e4731a70b7fe3155cc69bbbd55b33c7932_281_287

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #34010 (closed)

Edited by username-removed-892863

Merge request reports