Resolve "Incrementally expand merge request diffs in both direction"

What does this MR do?

Enhance merge request diffs expansion options. You can expand up, expand down, and show all merge request diffs.

Test Case

  1. Find a project with a merge request that contains "expansion" in the the code
  2. Go to Project > Select Merge Request > Changes tab

Expansion Row should look like this:

image

Expand Up option is available:

  • if it's in the top row
  • if it's in middle
  • does not appear if it's on the bottom row

Expand Down option is available:

  • it it's in the bottom row
  • if it's in the middle
  • does not appears if it's on the top row

Show All option is available:

  • if it's in the top row
  • if it's in the middle
  • it it's in the bottom row

When you click "Show All"

  • if it's in the top row, it will show line 1 to whichever line you clicked it from
  • if it's in the middle row, it should all all the lines in between the expansion row
  • if it's in the bottom row, it will show to the end of the lines

When you click "Expand Up"

  • it should expand the lines upwards

When you click "Expand Down"

  • it should expand the lines downwards

In the Parallel View

  • Select the "side-by-side" view under the diffs settings
  • Expansion options should span the entire row

image

Sample Layout

Here's an example of when which of the expansion options should be available:

Inline View

inline-view

Parallel View

parallel-view

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Closes #58035 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports

Loading