grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

QueryVariable: Query is empty string by default #837

Closed ivanortegaalba closed 2 months ago

ivanortegaalba commented 2 months ago

Problem The default it was an empty object. In Grafana this was defaulted to an empty string and this is creating compatibility issues.

Solution Setting empty string to the state should solve the problem

📦 Published PR as canary version: 5.4.1--canary.837.9977135077.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes-react@5.4.1--canary.837.9977135077.0 npm install @grafana/scenes@5.4.1--canary.837.9977135077.0 # or yarn add @grafana/scenes-react@5.4.1--canary.837.9977135077.0 yarn add @grafana/scenes@5.4.1--canary.837.9977135077.0 ```
torkelo commented 2 months ago

In Grafana this was defaulted to an empty string and this is creating compatibility issues.

in what way? in the persisted model? maybe we can resolve it scene to save model?

ivanortegaalba commented 2 months ago

In Grafana this was defaulted to an empty string and this is creating compatibility issues.

in what way? in the persisted model? maybe we can resolve it scene to save model?

This is passed to the variable editor, and they expect the query to be empty by default. See https://github.com/grafana/support-escalations/issues/11534#issuecomment-2233246251

torkelo commented 2 months ago

@ivanortegaalba for the legacy variable editor? is maybe something we can fix in core?

grafanabot commented 2 months ago

:rocket: PR was released in v5.4.1 :rocket: