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

AdHocFiltersCombobox: Collapse filters to save space #962

Open Sergej-Vlasov opened 1 week ago

Sergej-Vlasov commented 1 week ago

The main idea here is to hide filters when we have many filters defined to save on space in the dashboard.

Issues:

  1. Filter variable will grow until it takes up the whole line and wrap line only after its fully grown
    • this makes it tricky to determine when exactly to collapse when we have another variable in the same line: Image
  2. Mechanism to uncollapse filters
    • some users might prefer to have filters uncollapsed all the time
      • how do we offer that? - add variable setting to collapse/keep uncollapsed?

Current POC PR with some guess work on when and how to collapse. Demo from POC PR:

https://github.com/user-attachments/assets/9e9e1216-2f6d-42d0-94d6-2f54b8d10024

Sergej-Vlasov commented 1 week ago

@Ijin08 @dprokop encountered few tricky issues that I feel need discussion, so saving my work here until we can sync online/offline regarding this.