Vitor-Avila commented on PR #36924: URL: https://github.com/apache/superset/pull/36924#issuecomment-3727135347
Hey @michael-s-molina, This is a very nice feature! Thanks for working on this. 🙌 I tried testing this locally, but it's not working properly for me, unsure if I'm missing something. Here's what I tried: 1. Executed `gh pr checkout 36924` to get your changes locally. 2. Got `npm ci && npm run dev-server` in one terminal from `superset-frontend`, `superset run -p 8088 --with-threads --reload --debugger` in another, and `npm run build && http-server -p 8000` from `superset-embedded-sdk` in another one. 3. Loaded the embedded SDK with `<script src="http://127.0.0.1:8000/bundle/index.js"></script>`. 4. Used the SDK with: ``` javascript const myLightDashboard = supersetEmbeddedSdk.embedDashboard({ id: dashboardId, supersetDomain: supersetDomain, mountPoint: document.getElementById("dashboard-container"), fetchGuestToken: async () => fetchGuestTokenFromBackend(), dashboardUiConfig: { hideTitle: false, hideChartControls: false, }, resolvePermalinkUrl: ({ key }) => { return `https://my-app.com/analytics/share/${key}`; }, }); ``` Everything loads fine, but the Share options still give me a `http://localhost:8088/` URL. Am I missing something? Also, while you're working on this, I wonder if you would want to re-add anchor links from tabs and headers in embedded dashboards? I removed them [back here](https://github.com/apache/superset/pull/31194), as they don't really work for embedded users (you can't really use that link and shouldn't even have access to it). My only concern here would be how to make this configureable: as you can imagine, not all Embedded Orgs would want to display permalinks. The Share options can be hidden through perms (in case the Guest Role has permission to create permalink or not) but the anchor links for tabs/headers are not managed via perms. Some options: 1. Have a new `config` to control if these should be visible in embedded or not. **Pros:** Flexibility to support both use-cases. **Cons:** Not as flexible as perms. 2. Validate can share perms to determine if anchor links should be visible. **Pros:** Flexibility to support both use-cases. Also aligned with other Share buttons. **Cons:** Slightly bigger change. 3. Keep as is (or re-add without validation) **Pros:** No flexibility. **Cons:** Easy to implement (either keep as-is or revert my PR). Second option seems like the best move here. WDYT? -- 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]
