michael-s-molina commented on code in PR #44101:
URL: https://github.com/apache/superset/pull/44101#discussion_r4315500268


##########
superset-frontend/packages/superset-core/src/extensions/index.ts:
##########
@@ -48,6 +48,41 @@
 import { Extension } from '../common';
 import { ExtensionStorage } from '../storage';
 
+/**
+ * Options for a toast shown via `ExtensionWindow`.
+ */
+export interface ExtensionMessageOptions {
+  /**
+   * How long the toast stays visible, in milliseconds. Falls back to the
+   * host's per-severity default (see `MessageToasts/actions`) when omitted.
+   */
+  duration?: number;
+}
+
+/**
+ * Global, host-level UI surfaces available to an extension, independent of
+ * any specific view or panel it has registered.
+ */
+export interface ExtensionWindow {

Review Comment:
   `window` would be better modeled a separate namespace just like [VSCode's 
window](https://code.visualstudio.com/api/references/vscode-api#window).



##########
superset-frontend/packages/superset-core/src/extensions/index.ts:
##########
@@ -65,6 +100,12 @@ export interface ExtensionContext {
    * All keys are automatically namespaced to prevent collisions.
    */
   storage: ExtensionStorage;
+
+  /**
+   * Global, host-level UI surfaces (e.g. toast notifications) not scoped to
+   * any single view or panel.
+   */
+  window: ExtensionWindow;

Review Comment:
   Isn't window here a global object? Why would it belong to an extensions' 
context?



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