Support opening files in new tab and browser back/forward navigation

Summary

Support opening files in new tab and browser back/forward navigation in the repository file tree browser.

Expected Behavior

  1. Open in new tab: Users should be able to Cmd/Ctrl + click on a file/folder in the tree to open it in a new browser tab
  2. Context menu: Right-click context menu should include "Open in new tab" option
  3. Browser history: Clicking files/folders in the tree should properly update browser history so that browser back/forward navigation works as expected

Current Behavior

  • Cmd + click does not open files in a new tab
  • Context menu does not offer "Open in new tab" option
  • Browser back/forward navigation does not work after navigating via the file tree

Problem

As reported in #581271 (comment 2999871435) by @anthony.king:

This is great for quick navigation, however I'm unable to use it to open files in a new tab; either with cmd + click or through the context menu.

navigating "back" to a previous page with cmd + left/right also doesn't work after clicking a file/folder in the tree.

These are both pieces of key functionality I've used elsewhere for very quick navigation of a repository whilst in a web browser.

Edited by 🤖 GitLab Bot 🤖