vogievetsky commented on code in PR #14889:
URL: https://github.com/apache/druid/pull/14889#discussion_r1317943145


##########
web-console/src/views/workbench-view/execution-summary-panel/execution-summary-panel.tsx:
##########
@@ -97,10 +98,14 @@ export const ExecutionSummaryPanel = React.memo(function 
ExecutionSummaryPanel(
           className="download-button"
           content={
             <Menu>
-              <MenuDivider title="Download results as..." />
+              <MenuDivider title="Save Query Results:" />

Review Comment:
   The capitalization here (and everywhere) should be sentance case so `Save 
query results`.
   
   What do you think of, instead of changing this MenuDivider add another one.
   
   So you will have
   
   ```
   Download results as...
     CSV
     TSV
     JSON (new line delimited)
   Copy to clipboard as...
     CSV
     TSV
     JSON (new line delimited)
   ```
   
   That way people can copy all the formats
   



##########
web-console/src/utils/download.ts:
##########
@@ -107,3 +107,20 @@ export function downloadQueryResults(
   const lineBreak = '\n';
   downloadFile(lines.join(lineBreak), format, filename);
 }
+
+export function copyJSONResultsToClipboard(queryResult: QueryResult): void {

Review Comment:
   This function appears to copy paste code from `downloadQueryResults`. I 
would prefer it if you extracted the functionality into a function called 
`queryResultToJsonlString(queryResult: QueryResult): string`  and then call it 
from both places!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to