Closed Bug 1288856 Opened 8 years ago Closed 3 years ago

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

Categories

(Webtools Graveyard :: DXR, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: MattN, Unassigned)

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

DXR is no longer available. Searchfox is now replacing it.
See meta bug 1669906 & https://groups.google.com/g/mozilla.dev.platform/c/jDRjrq3l-CY for more details.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.