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

AdHocFilterCombobox: Improve backspace functionality to delete filter key, operator and values separately #942

Closed Sergej-Vlasov closed 2 weeks ago

Sergej-Vlasov commented 3 weeks ago

Rework backspace functionality to delete filter key, operator, values individually instead of whole filter.

I am adding additional property forceEdit on the AdHocFilterWithLabels type that is purely used to trigger UI change via useEffect because that was the cleanest way I could think of to trigger edit in separate filter pills that has no reference to each other.

📦 Published PR as canary version: 5.21.1--canary.942.11610448397.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes-react@5.21.1--canary.942.11610448397.0 npm install @grafana/scenes@5.21.1--canary.942.11610448397.0 # or yarn add @grafana/scenes-react@5.21.1--canary.942.11610448397.0 yarn add @grafana/scenes@5.21.1--canary.942.11610448397.0 ```
Sergej-Vlasov commented 2 weeks ago

@ashharrison90 thank you for pointing out those! Addressed all your points and ready for another look!

Sergej-Vlasov commented 2 weeks ago

@ashharrison90 Definitely agree on unit tests and tidying up everything!

scenes-repo-bot-access-token[bot] commented 2 weeks ago

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