Request and Deploy Title Copy Link #1164

Merged
merged 11 commits into from Aug 2, 2016

Conversation

Projects
None yet
3 participants
@Calvinp
Contributor

Calvinp commented Jul 21, 2016

Adds a link next to the request ID to copy it to the clipboard.

TODO:

  • Make the link disappear on mouse off
  • Properly handle short request IDs
Take 1 - Copy button doesn't go away on mouse off, and small request …
…IDs have a hover button that goes far to the right
+ const requestIdToDisplay = Utils.maybe(requestAPI, ['data', 'request', 'id']) || requestId;
+
+ return (
+ <div onMouseOver={() => this.onMouseOver()}>

This comment has been minimized.

@zdhickman

zdhickman Jul 21, 2016

If this.onMouseOver is bound, you can just do onMouseOver={this.onMouseOver}

@zdhickman

zdhickman Jul 21, 2016

If this.onMouseOver is bound, you can just do onMouseOver={this.onMouseOver}

@Calvinp

This comment has been minimized.

Show comment
Hide comment
@Calvinp

Calvinp Jul 29, 2016

Contributor

Trying to have a link pop up on hover that could be clicked to copy things wasn't working. Instead, now the requestID itself can be clicked to copy it.

An overlay trigger explains this fact to the user when they hover over the request id.

Contributor

Calvinp commented Jul 29, 2016

Trying to have a link pop up on hover that could be clicked to copy things wasn't working. Instead, now the requestID itself can be clicked to copy it.

An overlay trigger explains this fact to the user when they hover over the request id.

@Calvinp

This comment has been minimized.

Show comment
Hide comment
@Calvinp

Calvinp Jul 29, 2016

Contributor

@tpetr @kwm4385 @wolfd this PR is good to be reviewed/merged.

Contributor

Calvinp commented Jul 29, 2016

@tpetr @kwm4385 @wolfd this PR is good to be reviewed/merged.

@Calvinp Calvinp changed the title from Request Title Copy Link (WIP) to Request Title Copy Link Jul 29, 2016

@@ -39,13 +40,22 @@ const RequestTitle = ({requestId, requestAPI}) => {
);
}
+ const requestIdToDisplay = Utils.maybe(requestAPI, ['data', 'request', 'id']) || requestId;

This comment has been minimized.

@tpetr

tpetr Aug 2, 2016

Member

why bother with the maybe() if we have the requestId variable?

@tpetr

tpetr Aug 2, 2016

Member

why bother with the maybe() if we have the requestId variable?

This comment has been minimized.

@Calvinp

Calvinp Aug 2, 2016

Contributor

Honestly, I don't know. I copied it from what was there before (see line 48 on the other side of the diff), but I can't justify it.
I'll delete it - requestId is marked as required in propTypes after all.

@Calvinp

Calvinp Aug 2, 2016

Contributor

Honestly, I don't know. I copied it from what was there before (see line 48 on the other side of the diff), but I can't justify it.
I'll delete it - requestId is marked as required in propTypes after all.

@Calvinp

This comment has been minimized.

Show comment
Hide comment
@Calvinp

Calvinp Aug 2, 2016

Contributor

I also added the same ability to the Deploy Detail page. It doesn't make sense to add it to the Task Detail page because the task ID isn't displayed as the title.

Contributor

Calvinp commented Aug 2, 2016

I also added the same ability to the Deploy Detail page. It doesn't make sense to add it to the Task Detail page because the task ID isn't displayed as the title.

@Calvinp Calvinp changed the title from Request Title Copy Link to Request and Deploy Title Copy Link Aug 2, 2016

@tpetr

This comment has been minimized.

Show comment
Hide comment
@tpetr

tpetr Aug 2, 2016

Member

LGTM

Member

tpetr commented Aug 2, 2016

LGTM

@Calvinp Calvinp merged commit 15298c1 into decaf Aug 2, 2016

@Calvinp Calvinp deleted the request_title_copy_link branch Aug 2, 2016

@tpetr tpetr modified the milestone: 0.10.0 Aug 18, 2016

@tpetr tpetr referenced this pull request Sep 1, 2016

Merged

undo click-to-copy changes #1263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment