nytai commented on a change in pull request #11634:
URL: 
https://github.com/apache/incubator-superset/pull/11634#discussion_r527284423



##########
File path: superset-frontend/src/views/CRUD/data/query/QueryList.tsx
##########
@@ -292,15 +289,18 @@ function QueryList({ addDangerToast, addSuccessToast }: 
QueryListProps) {
       {
         accessor: 'sql',
         Header: t('SQL'),
-        Cell: ({
-          row: {
-            original: { sql },
-          },
-        }: any) => {
+        Cell: ({ row: { original, id } }: any) => {
           return (
-            <StyledSyntaxHighlighter language="sql" style={github}>
-              {shortenSQL(sql)}
-            </StyledSyntaxHighlighter>
+            <div
+              tabIndex={0}
+              role="button"
+              data-test={`open-sql-preview-${id}`}
+              onClick={() => setQueryCurrentlyPreviewing(original)}
+            >
+              <StyledSyntaxHighlighter language="sql" style={github}>

Review comment:
       I think the SyntaxHighlighter ships with a few languages, and probably 
an interface to create your own. I think the `registerLanguage` step is to slim 
down the component and not include a bunch of unnecessary code that won't be 
used. I'll scan the codebase for other languages we use with SyntaxHighlighter 
and include those too. 




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