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

msyavuz pushed a commit to branch msyavuz/feat/sqllab-editor-replaceable
in repository https://gitbox.apache.org/repos/asf/superset.git

commit fdf0a138f94864633709fe847558533410b66cc2
Author: Mehmet Salih Yavuz <[email protected]>
AuthorDate: Tue Jan 20 21:38:39 2026 +0300

    feat(SqlLab): Check for view extensions for sqllab editor
---
 .../src/SqlLab/components/SqlEditor/index.tsx      | 29 +++++++++++++++-------
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx 
b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx
index 8426a3f981..be6ecd7625 100644
--- a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx
@@ -112,6 +112,9 @@ import ScheduleQueryButton from '../ScheduleQueryButton';
 import EstimateQueryCostButton from '../EstimateQueryCostButton';
 import ShareSqlLabQuery from '../ShareSqlLabQuery';
 import AceEditorWrapper from '../AceEditorWrapper';
+import ViewListExtension from 'src/components/ViewListExtension';
+import { ViewContribution } from 'src/SqlLab/contributions';
+import ExtensionsManager from 'src/extensions/ExtensionsManager';
 import RunQueryActionButton from '../RunQueryActionButton';
 import QueryLimitSelect from '../QueryLimitSelect';
 import KeyboardShortcutButton, {
@@ -907,15 +910,23 @@ const SqlEditor: FC<Props> = ({
             <AutoSizer disableWidth>
               {({ height }) =>
                 isActive && (
-                  <AceEditorWrapper
-                    autocomplete={autocompleteEnabled}
-                    onBlur={onSqlChanged}
-                    onChange={onSqlChanged}
-                    queryEditorId={queryEditor.id}
-                    onCursorPositionChange={handleCursorPositionChange}
-                    height={`${height}px`}
-                    hotkeys={hotkeys}
-                  />
+                  <>
+                    {ExtensionsManager.getInstance().getViewContributions(
+                      ViewContribution.Editor,
+                    )?.length ? (
+                      <ViewListExtension viewId={ViewContribution.Editor} />
+                    ) : (
+                      <AceEditorWrapper
+                        autocomplete={autocompleteEnabled}
+                        onBlur={onSqlChanged}
+                        onChange={onSqlChanged}
+                        queryEditorId={queryEditor.id}
+                        onCursorPositionChange={handleCursorPositionChange}
+                        height={`${height}px`}
+                        hotkeys={hotkeys}
+                      />
+                    )}
+                  </>
                 )
               }
             </AutoSizer>

Reply via email to