Repository navigation
feat(extensions): Allow replacing editors using extensions - #37499
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #37499 +/- ##
===========================================
+ Coverage 0 66.58% +66.58%
===========================================
Files 0 643 +643
Lines 0 49049 +49049
Branches 0 5500 +5500
===========================================
+ Hits 0 32661 +32661
- Misses 0 15093 +15093
- Partials 0 1295 +1295
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review Agent Run #b00531
Actionable Suggestions - 3
-
superset-frontend/src/core/editors/AceEditorProvider.tsx - 1
- Incorrect syntax highlighting for yaml · Line 298-299
-
superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.jsx - 1
- Missing Word Wrap in Editor Migration · Line 303-303
-
superset-frontend/src/core/editors/EditorHost.tsx - 1
- Incorrect useEffect dependencies · Line 77-79
Additional Suggestions - 2
-
superset-frontend/src/core/editors/EditorProviders.ts - 1
-
Language mapping conflict · Line 143-145The registerProvider method allows multiple providers to register for the same language, with the last one silently overwriting the mapping. This can make previous providers inaccessible if they supported the same language. It looks like the intention is to replace, but this could lead to unexpected behavior in extension loading. If multiple registrations for the same language aren't intended, add a check to warn and skip registration.
-
-
superset-frontend/src/features/themes/ThemeModal.tsx - 1
-
Type assertion cleanup · Line 59-67Replace the inline array type with JsonValidationAnnotation[] and remove the type assertion on severity since the types are compatible.
-
Review Details
-
Files reviewed - 29 · Commit Range:
38caf6a..38caf6a- scripts/check-type.js
- superset-frontend/packages/superset-core/src/api/contributions.ts
- superset-frontend/packages/superset-core/src/api/editors.ts
- superset-frontend/packages/superset-core/src/api/index.ts
- superset-frontend/packages/superset-ui-core/src/components/index.ts
- superset-frontend/src/SqlLab/components/AceEditorWrapper/AceEditorWrapper.test.tsx
- superset-frontend/src/SqlLab/components/AceEditorWrapper/index.tsx
- superset-frontend/src/SqlLab/components/SqlEditor/index.tsx
- superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx
- superset-frontend/src/components/SQLEditorWithValidation/index.tsx
- superset-frontend/src/core/editors/AceEditorProvider.tsx
- superset-frontend/src/core/editors/EditorHost.test.tsx
- superset-frontend/src/core/editors/EditorHost.tsx
- superset-frontend/src/core/editors/EditorProviders.test.ts
- superset-frontend/src/core/editors/EditorProviders.ts
- superset-frontend/src/core/editors/index.ts
- superset-frontend/src/core/index.ts
- superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
- superset-frontend/src/dashboard/components/PropertiesModal/sections/AdvancedSection.tsx
- superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.tsx
- superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.jsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
- superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/index.tsx
- superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.tsx
- superset-frontend/src/extensions/ExtensionsManager.ts
- superset-frontend/src/extensions/ExtensionsStartup.tsx
- superset-frontend/src/features/annotations/AnnotationModal.tsx
- superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx
- superset-frontend/src/features/themes/ThemeModal.tsx
-
Files skipped - 4
- docs/developer_portal/extensions/contribution-types.md - Reason: Filter setting
- docs/developer_portal/extensions/extension-points/editors.md - Reason: Filter setting
- docs/developer_portal/extensions/registry.md - Reason: Filter setting
- superset-frontend/package.json - Reason: Filter setting
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- Eslint (Linter) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].
Documentation & Help
Code Review Agent Run #d22c31Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Code Review Agent Run #e57268Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
villebro
left a comment
There was a problem hiding this comment.
Super nice step forward for opening up editor extendability! First pass comments.
villebro
left a comment
There was a problem hiding this comment.
LGTM - left one last comment, feel free to merge when this is green
Code Review Agent Run #64cb3cActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Code Review Agent Run #dd8e54Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
This PR introduces a new extension contribution type that allows extensions to replace Superset's default Ace editor with custom editor implementations. Extensions can now register alternative editors (such as Monaco, CodeMirror, or SimpleMDE) for specific languages, enabling enhanced editing experiences across the application.
Key changes:
editorscontribution type: Extensions can declare editor contributions in their manifest that specify which languages they support (sql, json, css, markdown, yaml)registerEditorProvider,getEditorProvider,hasEditorProvider) exposed via@apache-superset/corefor extensions to register their editorsDocumentation:
Editors Extension Pointdocumentation with implementation guideContribution Typeswith editors sectionEditors Bundleexample extension to the community registryExample usage:
extension.json
{ "name": "monaco-editor", "version": "1.0.0", "frontend": { "contributions": { "editors": [ { "id": "monaco-editor.sql", "name": "Monaco SQL Editor", "languages": ["sql"], "description": "Monaco-based SQL editor with IntelliSense" } ] } } }MonacoSQLEditor.tsx
activate.ts
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After - Extension providing alternative SQL editors (Monaco, CodeMirror, SimpleMDE):
Screen.Recording.2026-01-27.at.18.35.55.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION