Make it easier to copy a file path relative to the root from the file's page

NEW
Unassigned

Status

Webtools
DXR
a year ago
a year ago

People

(Reporter: MattN, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: easy)

When I'm on a file page I sometimes want to open that file in my editor but it's currently a little more tedious than it needs to be as I have to precisely select the path from the address bar or path in the header which can lead to being off by a character if the cursor is used. The problem is that both places have extraneous text before the path relative to the source dir. root.

This is easily solvable for the page heading which currently includes the repo name before the path (e.g. mozilla-central/accessible/tests/mochitest/browser.js) as the repo name could be put in a separate <div>. That way I can triple-click in the <div> to have only the path I want selected: accessible/tests/mochitest/browser.js

Since we already have a dropdown on the right side to choose trees I would make it would more like a real dropdown and replace the text "Switch Tree" with the current tree name (e.g. mozilla-central)

An additional solution which could be done on top of the above would be to have a one-click copy button which uses the clipboard API to copy. That can be done in a separate bug though.
Whiteboard: easy
You need to log in before you can comment on or make changes to this bug.