villebro commented on code in PR #38472:
URL: https://github.com/apache/superset/pull/38472#discussion_r2896477243


##########
docs/developer_docs/extensions/extension-points/editors.md:
##########
@@ -165,21 +145,22 @@ const MonacoSQLEditor = forwardRef<editors.EditorHandle, 
editors.EditorProps>(
 export default MonacoSQLEditor;
 ```
 
-### activate.ts
+### index.tsx
+
+Register the editor at module load time from your extension's entry point:
 
 ```typescript
 import { editors } from '@apache-superset/core';
 import MonacoSQLEditor from './MonacoSQLEditor';
 
-export function activate(context) {
-  // Register the Monaco editor for SQL using the contribution ID from 
extension.json
-  const disposable = editors.registerEditorProvider(
-    'monaco-sql-editor.sql',
-    MonacoSQLEditor,
-  );
-
-  context.subscriptions.push(disposable);
-}
+editors.registerEditor(
+  {
+    id: 'my-extension.monaco-sql',
+    name: 'Monaco SQL Editor',
+    languages: ['sql'],
+  },
+  MonacoSQLEditor,
+);

Review Comment:
   Slightly forward looking, but worth considering now: IIRC, in the initial 
`extension.json` based contribution declaration, we had `description` in all 
contribution objects. I checked that we currently have it in the command and 
editor registration, but should we add it to all signatures (=add to menu items 
and views)? It feels this could be in the future when we show contributions in 
the manifest.



##########
docs/developer_docs/extensions/development.md:
##########
@@ -65,19 +69,20 @@ dataset-references/
 │   │         └── 900.038b20cdff6d49cfa8d9.js
 │   └── backend
 │        └── superset_extensions/
-│             └── dataset_references/
-│                  ├── __init__.py
-│                  ├── api.py
-│                  └── entrypoint.py
-├── dataset-references-1.0.0.supx
+│             └── my_org/
+│                  └── dataset_references/
+│                       ├── api.py
+│                       └── entrypoint.py
+├── my-org.dataset-references-1.0.0.supx
 └── README.md
 ```
 
-**Note**: The extension ID (`dataset-references`) serves as the basis for all 
technical names:
-- Directory name: `dataset-references` (kebab-case)
-- Backend Python package: `dataset_references` (snake_case)
-- Frontend package name: `dataset-references` (kebab-case)
-- Module Federation name: `datasetReferences` (camelCase)
+**Note**: With publisher `my-org` and name `dataset-references`, the technical 
names are:
+- Directory name: `my-org.dataset-references` (kebab-case)
+- Backend Python namespace: `superset_extensions.my_org.dataset_references`

Review Comment:
   Did you want to remove the `superset_extensions` namespace in this PR, or do 
we do it in a follow-up?
   ```suggestion
   - Backend Python namespace: `my_org.dataset_references`
   ```



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

To unsubscribe, e-mail: [email protected]

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