Page MenuHomePhorge

Add Copy file path button to file header bar in Differential/Diffusion
ClosedPublic

Authored by aklapper on Jul 30 2024, 17:26.
Tags
None
Referenced Files
F2685729: D25757.1734703942.diff
Thu, Dec 19, 14:12
F2685218: D25757.1734701546.diff
Thu, Dec 19, 13:32
F2685217: D25757.1734701545.diff
Thu, Dec 19, 13:32
F2685216: D25757.1734701545.diff
Thu, Dec 19, 13:32
F2685215: D25757.1734701544.diff
Thu, Dec 19, 13:32
F2685214: D25757.1734701542.diff
Thu, Dec 19, 13:32
F2685146: D25757.1734700328.diff
Thu, Dec 19, 13:12
F2685108: D25757.1734699998.diff
Thu, Dec 19, 13:06

Details

Summary

When looking at a commit/revision, allow to copy the path of a file to the clipboard, so you can quickly open that file in your local code checkout from the command line.

Closes T15897

Test Plan

Open a proposed commit in Differential or a merged commit in Diffusion. Click the "Copy file path" button, paste that clipboard content.
Change the width of the viewport and see that the button is not rendered when in phone mode.
Run ./bin/celerity map again and no changes.

Diff Detail

Repository
rP Phorge
Branch
differentialCopyPath
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1479
Build 1479: arc lint + arc unit

Event Timeline

OH GOSH YES

image.png (333×473 px, 31 KB)

What about replacing that legacy "unuseful" file icon on the left, with your new copy-button?

Benefits:

  • we replace an unuseful "document" icon with an useful one (believe me or not, but I always click on that damn icon on the left, expecting it copies the name)
  • we save more space
  • if we have a lot of file, the copy button is always in the same horizontal position

What about replacing that legacy "unuseful" file icon on the left, with your new copy-button?

I was initially reluctant as that might destroy information but seeing that I can still get that golden strip on the right by clicking anywhere in the file header bar and that the icon on the very left is also duplicated in the file tree view above (though icons inconsistently differ for map.php between and anyway), I probably agree with you.

Replace file icon with copy path button in file header bars

webroot/rsrc/css/application/differential/changeset-view.css
343

If the icon looks ugly, maybe it's because of this Differential-only margin-right of 6px

Then remember the ./bin/celerity map

353

For some reasons we may also need margin-right: 0

Do whatever Valerio says!

arc lint no check CSS syntax? Meh

This revision is now accepted and ready to land.Aug 1 2024, 08:33