Page MenuHomePhorge

Add a button to copy key information
Open, Needs TriagePublic

Assigned To
None
Authored By
dereckson
Aug 25 2021, 13:05
Referenced Files
F23656: image.png
Oct 1 2021, 09:06
F14307: copy-icon-suggestion.PNG
Aug 25 2021, 13:05
Tokens
"Like" token, awarded by bekay."Like" token, awarded by CSharp."Love" token, awarded by Leon95."Like" token, awarded by avivey.

Description

To ease copy/paste of key information like branch names, a pattern seen on other products (GitLab, GitHub) is to add a copy/paste button using the UTF-8 character 📋.

Here an example of a place I'd wante to be able to click on it.

copy-icon-suggestion.PNG (220×1 px, 10 KB)

To be discussed before implementation, as it could clutter the UI.

Event Timeline

(by the way, this task was intended to the Phorge tracker, not for the Phorge project tracker if both will be maintained separately)

Turns out there is Javelin support for "copy text" already implemented - I think it's used when copying from 2-up display, or when white-space is visible.
Anyway, I have an example code at https://secure.phabricator.com/P2080 for a button that copies arbitrary text.


From UI point of view, I think having a tiny button would be fine; I personally like things to be in a very consistent location, so having it "before" the text (on the left of it) would make me happier than "after".

We have {icon clipboard} which might be better than the UTF-8 char in terms of support(?), and there's some tricks with screen-readers which I'm not sure how they work, so the reader will say "copy button" rather then "clipboard icon".

The clone repo modal could really use some copy buttons.

image.png (282×854 px, 20 KB)

Preferably replacing the Read / Write Button.

In T15039#1358, @bekay wrote:

The clone repo modal could really use some copy buttons.

image.png (282×854 px, 20 KB)

Preferably replacing the Read / Write Button.

This I have done here: D25536

@dereckson maybe an inspiration for the copy of commit refs.