You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/05/21 20:38:06 UTC

(superset) branch master updated: fix(view query): Update style for code viewer container (#39635)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new b8b91574e0e fix(view query): Update style for code viewer container (#39635)
b8b91574e0e is described below

commit b8b91574e0e833ef36cc7d783d0da6715264e360
Author: JUST.in DO IT <ju...@airbnb.com>
AuthorDate: Thu May 21 13:37:56 2026 -0700

    fix(view query): Update style for code viewer container (#39635)
    
    Co-authored-by: Copilot <co...@github.com>
---
 superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx | 9 ++++++++-
 superset-frontend/src/explore/components/controls/ViewQuery.tsx  | 9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx b/superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx
index 03adf270043..294ff9c1c3e 100644
--- a/superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx
+++ b/superset-frontend/src/SqlLab/components/HighlightedSql/index.tsx
@@ -47,6 +47,13 @@ const Title = styled.h4`
   font-weight: ${({ theme }) => theme.fontWeightStrong};
 `;
 
+const StyledTabs = styled(Tabs)`
+  margin-top: ${({ theme }) => theme.sizeUnit * -8}px;
+  .ant-tabs-nav {
+    margin-bottom: ${({ theme }) => theme.sizeUnit * 4}px;
+  }
+`;
+
 const shrinkSql = (sql: string, maxLines: number, maxWidth: number) => {
   const ssql = sql || '';
   let lines = ssql.split('\n');
@@ -94,7 +101,7 @@ function HighlightSqlModal({ rawSql, sql }: HighlightedSqlModalTypes) {
   }
 
   return (
-    <Tabs
+    <StyledTabs
       defaultActiveKey="executed"
       items={[
         {
diff --git a/superset-frontend/src/explore/components/controls/ViewQuery.tsx b/superset-frontend/src/explore/components/controls/ViewQuery.tsx
index 647b342c5c1..1d321d766e3 100644
--- a/superset-frontend/src/explore/components/controls/ViewQuery.tsx
+++ b/superset-frontend/src/explore/components/controls/ViewQuery.tsx
@@ -62,6 +62,8 @@ const StyledSyntaxContainer = styled.div`
 
 const StyledThemedSyntaxHighlighter = styled(CodeSyntaxHighlighter)`
   flex: 1;
+  height: ${({ theme }) => theme.sizeUnit * 26}px;
+  margin-top: 0;
 `;
 
 const StyledFooter = styled.div`
@@ -163,7 +165,12 @@ const ViewQuery: FC<ViewQueryProps> = props => {
         ) : (
           <StyledThemedSyntaxHighlighter
             language={language}
-            customStyle={{ flex: 1, marginBottom: theme.sizeUnit * 3 }}
+            customStyle={{
+              flex: 1,
+              marginBottom: theme.sizeUnit * 3,
+              fontSize: theme.fontSize * 0.75,
+              padding: 0,
+            }}
           >
             {currentSQL}
           </StyledThemedSyntaxHighlighter>