Skip to content

Unify Pinned file link behaviour

What does this MR do and why?

This MR resolves Unify Pinned file link behaviour (#463013 - closed).

Now when you click either a link to the file or a link to the file line it will not include the pin URL param. The URL itself will contain that param, so if you copy it and open on a new page the file will become pinned.

This is done so that the clicks on diff files or file lines do not pin files when you refresh the page.

How to set up and validate locally

  1. Enable pinned_file feature flag
  2. Open any MR with at least 2 files changed
  3. Click on any diff file line number (example: image)
  4. Refresh the page; file should not be pinned
  5. Copy the link to that line
  6. Open the link in a new browser tab
  7. File should become pinned

Merge request reports

Loading