-
Notifications
You must be signed in to change notification settings - Fork 14k
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
feat(sqllab): add headers when copying results to clipboard #23720
feat(sqllab): add headers when copying results to clipboard #23720
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.
LGTM. CC @yousoph for visibility
Codecov Report
@@ Coverage Diff @@
## master #23720 +/- ##
==========================================
+ Coverage 66.30% 68.10% +1.80%
==========================================
Files 1922 1922
Lines 74048 74047 -1
Branches 8104 8104
==========================================
+ Hits 49094 50427 +1333
+ Misses 22882 21545 -1337
- Partials 2072 2075 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 93 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
SUMMARY
When copying SQL Lab results from the query history to the clipboard, the headers are not included in the payload. This PR adds the headers. While updating the tests I noticed that we were missing test cases for what the
columns
array actually looks like; it's usuallycolumns: { name: string }[]
, notcolumns: string[]
. I therefore updated one of the tests to use the object-basedcolumns
array instead of the string-based one.AFTER
Now when you copy this:
You get this (the headers may appear to be off, but it's because they're tab separated, which isn't appropriately reflected in the code block):
BEFORE
Previously you got this:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION