grafana / scenes

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

Resizing SplitLayout clears Span Filters #590

Closed gng0 closed 9 months ago

gng0 commented 9 months ago

When using SplitLayout with a trace panel as the secondary property, the span filters get cleared everytime the window/panel is resized. The 'Show matches only' toggle isn't affected, but the inputs for all 4 filters don't maintain their state on resizing.

image

torkelo commented 9 months ago

@gng0 unable to replicate this, we are using this component and have not seen any state loss of components/objects inside.

The splitter resize is only manipulating the div styles, no scene state, unmount etc are happening.

You will have to debug this a big or try to create replication demo

gng0 commented 9 months ago

Hi @torkelo, thank you for checking.

I've recreated the bug in a test scenes app here - https://github.com/gng0/scenes-app-test

I noticed that resizing the panel calls the clear() method in grafana/public/app/features/explore/TraceView/components/TracePageHeader/SpanFilters/SpanFilters.tsx but I wasn't able to debug any further from there. Hope this helps!

image

torkelo commented 9 months ago

@gng0 was able to track it down! https://github.com/grafana/scenes/issues/590