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



##########
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:
       The `...` is probably not necessary, since it will be pushed down to 
hidden anyway if any of the SQL lines was wrapped:
   
   
![image](https://user-images.githubusercontent.com/335541/100053179-59552100-2dd4-11eb-8f32-3185ad53ff67.png)
   
   Can probably just set a higher `maxLines` and make sure there's no 
unnecessary blank space at the bottom of the SQL code area.




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