-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements #8263, Adds a re-usable Copy to Clipboard service. #13976
Conversation
Can one of the admins verify this patch? |
@@ -15,6 +15,13 @@ | |||
> | |||
View single document | |||
</a> | |||
<a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link isn't keyboard accessible, since it doesn't have an href
element. Since this is an action rather than a navigation to a different page, it should be a button
(and just styled whatever way you wish): https://github.com/elastic/kibana/blob/master/style_guides/accessibility_guide.md#use-button-and-a-href
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Jenkins, test this |
@timroes, Change Implemented. |
I will be on vacation next week and can't track this, so I rather not block this PR with change for requests, but just comment.
@@ -51,6 +51,13 @@ module.directive('kbnTableRow', function ($compile, $httpParamSerializer, kbnUrl | |||
// when we compile the toggle button in the summary, we use this $scope | |||
let $toggleScope; | |||
|
|||
$scope.copyToClipboard = (uriescape) => { | |||
let text = window.location.origin + window.location.pathname; | |||
text += '#/doc/' + $scope.indexPattern.id + '/' + $scope.row._index + '/' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please use template strings instead of concatenation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@timroes Any more issues? |
Hey @varundbest, sorry for the long delay, due to my vacations. Thanks again for your PR. Since we are currently trying to move to a more solid platform that backs Kibana and is not tied into AngularJS anymore (also see #9675), we try not to create that centralized services within the Angular infrastructure anymore. I talked internally with a few people about this, and we would like to revisit that topic, once the new platform has been merged and use this approach to provide that centralized copy-to-clipboard service. We have also an issue for the copy link to document feature that you added in #8263. We would with the new platform approach (but unfortunately we still need a little bit of time on this) revisit also this feature and your centralized service. Thus I would close that PR for now, but thanks a lot for the input and contribution 💙 |
Implements #8263, Adds a re-usable Copy to Clipboard service.
Checked on Firefox, Opera and Chrome.