Skip to content

[Data Apps] Allow seeding a Data App's internal filter/state from a shareable URL #23935

@Spissable

Description

@Spissable

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

  1. A user selects a value in a Data App's own control (e.g. "last month").
  2. They copy a shareable link that encodes that selection.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions