Open
Bug 1340265
Opened 8 years ago
Updated 6 years ago
Make it easier to copy the full 40 character revision SHAs from the UI
Categories
(Tree Management :: Treeherder: Frontend, defect, P3)
Tree Management
Treeherder: Frontend
Tracking
(Not tracked)
NEW
People
(Reporter: emorley, Unassigned)
References
Details
Attachments
(2 files)
Treeherder would like to stop accepting 12 character SHAs when ingesting jobs (bug 1306707), however some of the jobs in builds-4hr have 12 character SHAs still, from when people use self-serve to eg trigger PGO, but have pasted in a 12 character SHA from the Treeherder UI (bug 1313274 comment 11).
Let's make it easier for people to copy the full 40 character SHA, then perhaps we can just get self-serve to not accept the short SHAs.
Reporter | ||
Comment 1•8 years ago
|
||
Wes, are you up for having a look at this?
I was thinking either:
(a) making the rollover copy thing use the 40 character SHA
(b) making the SHA shown on-screen be 40 characters, but truncated visually (eg using the CSS `text-overflow: clip ellipsis` or similar)
(c) both
Thoughts? :-)
Flags: needinfo?(wkocher)
Comment 2•8 years ago
|
||
My muscle memory is deeply ingrained to using https://addons.mozilla.org/en-US/firefox/addon/colt/ so b sounds more likely to both stop me copying 12 char and also not break me. (There's a rollover copy thing?)
I don't actually think the rollover copy thing is set up for the revisions, just for the log and raw log link buttons down in the job details panel.
"Rollover copy thing' being if you mouse over one of those two buttons and press ctrl-c, it will copy the link to that log into your clipboard.
I could probably:
a) hook the revisions up to the rollover copy thing
b) get the rollover copy thing to copy the full SHA
c) get the revision to list the full SHA with anything over the 12 characters hidden from view.
Flags: needinfo?(wkocher)
I haven't been able to get the rollover copy thing to work since the revisions are rendered in React. I can get the 'copy-value' attribute onto the revision <a> tag, but it doesn't seem to do anything, unlike the <a> tags in the Job Details pane.
Reporter | ||
Comment 5•8 years ago
|
||
Let's skip the copy on rollover part for now, and fix only:
> c) get the revision to list the full SHA with anything over the 12
> characters hidden from view.
Comment 6•8 years ago
|
||
Comment on attachment 8838909 [details]
[treeherder] KWierso:1340265 > mozilla:master
Like I mentioned in the PR itself, this has some weird alignment issues with the rest of the commit message that I'm not sure offhand how to fix. Posting this now for any ideas.
Attachment #8838909 -
Flags: feedback?(wlachance)
Assignee: nobody → wkocher
Comment 8•8 years ago
|
||
Comment on attachment 8838909 [details]
[treeherder] KWierso:1340265 > mozilla:master
Yeah I probably wouldn't use the CSS approach here to shortening the revision, as it's bound to be a little brittle. Could we do what github does and add a little copy-paste button next to the revision? To compensate for the lost space, we could then shorten the revisions there to 8 characters or something.
There's also the option of doing nothing until buildbot goes away. I honestly don't think it's going to kill us to support 12 character revisions for another year. We could also consider an internal hack to try to look up the longer revision information for buildbot only.
Attachment #8838909 -
Flags: feedback?(wlachance)
Comment 9•8 years ago
|
||
Comment on attachment 8840258 [details]
[treeherder] KWierso:1340265v2 > mozilla:master
This version just adds a button next to each revision that when clicked copies the full SHA to the clipboard. There's no feedback that the copy took place (unsure how to call thNotify from react), but it seems to work.
Happy to continue working on either PR.
Attachment #8840258 -
Flags: feedback?(wlachance)
Attachment #8840258 -
Flags: feedback?(emorley)
Reporter | ||
Updated•8 years ago
|
Attachment #8840258 -
Flags: feedback?(emorley) → feedback+
Updated•8 years ago
|
Attachment #8840258 -
Flags: feedback?(wlachance) → feedback+
Comment on attachment 8840258 [details]
[treeherder] KWierso:1340265v2 > mozilla:master
How about this? It adds bootstrap tooltips to the copy revision buttons. Tooltips are to the right because they were getting clipped by the boundaries of the push container element when they were above or below. When you click the button, the tooltip changes to "COPIED!", which will then reset to the "Copy revision hash to clipboard" text after two seconds pass.
I didn't use ReactBootstrap like Eli suggested, but this appears to work.
Attachment #8840258 -
Flags: review?(wlachance)
Comment 12•8 years ago
|
||
Comment on attachment 8840258 [details]
[treeherder] KWierso:1340265v2 > mozilla:master
Could you try Eli's solution in the github PR?
Attachment #8840258 -
Flags: review?(wlachance)
Comment on attachment 8840258 [details]
[treeherder] KWierso:1340265v2 > mozilla:master
This isn't done yet (tooltip has no feedback when you click the button), but I'd like to have you take a look at this new attempt at a patch before I put anything else into it. (Mostly about the added dependencies are okay to add.)
Attachment #8840258 -
Flags: feedback+ → feedback?(emorley)
Reporter | ||
Comment 14•8 years ago
|
||
Comment on attachment 8840258 [details]
[treeherder] KWierso:1340265v2 > mozilla:master
Looks good! For the final review I'd recommend asking Cameron.
Attachment #8840258 -
Flags: feedback?(emorley) → feedback+
Comment on attachment 8840258 [details]
[treeherder] KWierso:1340265v2 > mozilla:master
This is pretty much done. I haven't yet figured out how to get the tooltip text to change to "COPIED!" when you click the button. Maybe we could live without that feedback for now unless we can figure out how to get it to change? One thing I haven't yet tried is creating two tooltips (one with "Copy revision to clipboard" and the other with "COPIED!"?) and trying to swap between them on click and then revert back on a timer?
Attachment #8840258 -
Flags: feedback?(cdawson)
Comment 16•7 years ago
|
||
Comment on attachment 8840258 [details]
[treeherder] KWierso:1340265v2 > mozilla:master
Please give Will's suggestion a shot. That seems like it will work.
Attachment #8840258 -
Flags: feedback?(cdawson) → feedback-
Assignee: wkocher → nobody
Reporter | ||
Updated•7 years ago
|
Component: Treeherder → Treeherder: Frontend
Comment 17•7 years ago
|
||
(In reply to Phil Ringnalda (:philor) from comment #2)
> (There's a rollover copy thing?)
If Ed's a) was referring to "Copy values on hover" in https://treeherder.mozilla.org/userguide.html, I just tried all three and they seem to be working fine (Logviewer, RawLog, JobName). At a minimum I imagine we could add the capability to the revision SHA.
Reporter | ||
Updated•7 years ago
|
Priority: P2 → P3
Reporter | ||
Comment 18•6 years ago
|
||
No longer blocks bug 1306707 since self-serve is no more after buildbot EOL.
No longer blocks: 1306707
Comment 19•6 years ago
|
||
I was just about to file a duplicate of this bug. I often interact with system that would like a full commit identifier (the particular one I ran into today was taskcluster indexes), and currently have to follow a link, and the copy part of the address from the location bar. It would be nice to be able to copy it with a single click or two.
You need to log in
before you can comment on or make changes to this bug.
Description
•