-
Notifications
You must be signed in to change notification settings - Fork 16
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
Single button to copy all the info #63
Conversation
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.
@MARQAS In addition to the git conflict we need to solve, we will need to make some changes on this one:
- We do not want to replace the "Copy cURL Request". That is useful when someone wants to replay a specific query.
- The button that copies everything can't be named "Copy cURL Requests" because it is copying much more than the cURL commands to replay the request. Something like "Copy Requests Info" would work better.
- We can come up with better formatting for the copied report. Following the format we have in the Status Report would make it easier to read.
In addition to that, it would be great if the user could also download the debug info as a txt file. I've created an issue in the ElasticPress repo talking about that.
const request = copyBtn.getAttribute('data-request'); | ||
|
||
copyBtn.addEventListener('click', function () { | ||
navigator.clipboard.writeText(request).then(function () { |
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.
Getting this error Uncaught TypeError: Cannot read properties of undefined (reading 'writeText')
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.
@burhandodhy I wasn't able to reproduce this one. In which browser are you seeing this?
Co-authored-by: Burhan Nasir <[email protected]>
Description of the Change
This PR will replace the copy cURL buttons into a single copy button that will be used to copy the whole data instead of single cURL request. The position is also changed from bottom of the cURL request to top of all the cURL calls for better visibility and usage
Closes #59
How to test the Change
Changelog Entry
Credits
Props @MARQAS
Checklist: