rusackas commented on a change in pull request #11678:
URL: 
https://github.com/apache/incubator-superset/pull/11678#discussion_r529253773



##########
File path: superset-frontend/src/views/CRUD/utils.tsx
##########
@@ -261,22 +261,31 @@ export function handleDashboardDelete(
   );
 }
 
+export function shortenSQL(sql: string, maxLines: number) {
+  let lines: string[] = sql.split('\n');
+  if (lines.length >= maxLines) {
+    lines = lines.slice(0, maxLines);
+    lines.push('...');

Review comment:
       if the line-wrapping is causing the extra lines, I would be open to any 
of these options:
   1) Not worrying about it (though a super-duper long line might get crazy)
   2) Not letting it wrap (CSS e.g. `white-space: nowrap`)
   3) Cropping off the query with a max-height
   4) ... dare I say scrolling?
   
   Personally I'd vote for #2 or #3




----------------------------------------------------------------
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.

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