Problem
Data Apps can have their own interactive controls built into the app UI (for example a time-period selector or a user picker). There is currently no way to encode the state of those controls into a shareable URL, so a user cannot share a "current view" with a specific in-app filter pre-selected.
Adding query parameters to the Data App URL does not work:
- Lightdash constructs the iframe
src itself and does not forward the parent page's query params into it.
- The iframe sandbox has no
allow-same-origin, so app code cannot read the parent page's URL either.
- The SDK reads the iframe hash only for
transport/projectUuid (packages/query-sdk/src/client.ts) and exposes no API for custom initial state.
Expected behaviour
- A user selects a value in a Data App's own control (e.g. "last month").
- They copy a shareable link that encodes that selection.
- A colleague opens the link and lands on the app with the same state applied.
Proposed approaches
- Forward a whitelisted set of parent-page params into the iframe hash, and expose them to app code via an SDK method (e.g.
lightdash.getUrlParams() / useInitialContext()).
- Or a postMessage "initial context" handshake on load that carries the params to the SDK.
Current workaround
Duplicate the app and ask the agent to change the default value of the control, then move the duplicate into a space and share it. This works for a small set of fixed views, but creates a static fork per view and does not support sharing an arbitrary ad-hoc selection.
Problem
Data Apps can have their own interactive controls built into the app UI (for example a time-period selector or a user picker). There is currently no way to encode the state of those controls into a shareable URL, so a user cannot share a "current view" with a specific in-app filter pre-selected.
Adding query parameters to the Data App URL does not work:
srcitself and does not forward the parent page's query params into it.allow-same-origin, so app code cannot read the parent page's URL either.transport/projectUuid(packages/query-sdk/src/client.ts) and exposes no API for custom initial state.Expected behaviour
Proposed approaches
lightdash.getUrlParams()/useInitialContext()).Current workaround
Duplicate the app and ask the agent to change the default value of the control, then move the duplicate into a space and share it. This works for a small set of fixed views, but creates a static fork per view and does not support sharing an arbitrary ad-hoc selection.