Skip to content

Request and Deploy Title Copy Link#1164

Merged
Calvinp merged 11 commits intodecaffrom
request_title_copy_link
Aug 2, 2016
Merged

Request and Deploy Title Copy Link#1164
Calvinp merged 11 commits intodecaffrom
request_title_copy_link

Conversation

@Calvinp
Copy link
Contributor

@Calvinp 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

…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()}>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@Calvinp
Copy link
Contributor Author

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
Copy link
Contributor Author

Calvinp commented Jul 29, 2016

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

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

const requestIdToDisplay = Utils.maybe(requestAPI, ['data', 'request', 'id']) || requestId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

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 Request Title Copy Link Request and Deploy Title Copy Link Aug 2, 2016
@tpetr
Copy link
Contributor

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 August 2, 2016 19:10
@tpetr tpetr modified the milestone: 0.10.0 Aug 18, 2016
@tpetr tpetr mentioned this pull request Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants