EnxDev opened a new pull request, #40444: URL: https://github.com/apache/superset/pull/40444
### SUMMARY Adds host namespaces that extensions can call to read Superset context: current page type, active dashboard filters, explore chart info, and dataset metadata. **What this introduces:** - `navigation` — `onDidChangePage: Event<PageType>` fires on every route change; routing signal only (no entity context) - `dashboard` — `getContext()` returns active filters from the Redux store - `explore` — `getContext()` returns chart name, datasource, and current form data - `dataset` — `getContext()` returns datasource UID and name from explore state - All namespaces are exposed on `window.superset` for extension use Extensions compose context themselves from whichever namespaces they need. Surface namespaces (`explore`, `dashboard`, `dataset`) own entity-level context; `navigation` is a routing signal only. **Stack:** 1. [Contribution point](https://github.com/apache/superset/pull/40439) 2. [Frontend API entry point](https://github.com/apache/superset/pull/40440) 3. [Eager loading](https://github.com/apache/superset/pull/40441) 4. [Admin UI](https://github.com/apache/superset/pull/40442) 5. [Backend settings & permissions](https://github.com/apache/superset/pull/40443) ← merged first 6. **This PR** — context sharing namespaces ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — API surface only, no visible UI change. ### TESTING INSTRUCTIONS 1. On a dashboard page: `window.superset.dashboard.getContext()` → returns `{ filters: [...] }` 2. On an explore page: `window.superset.explore.getContext()` → returns `{ chartName, datasourceUid, formData }` 3. Navigate between pages: verify `navigation.onDidChangePage` fires with the correct `PageType` string 4. On a non-explore page: `window.superset.explore.getContext()` → returns `null` ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [x] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
