Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdHocFilters: clear filter value when key is changed #714

Merged
merged 5 commits into from
May 9, 2024
Merged

Conversation

ashharrison90
Copy link
Contributor

@ashharrison90 ashharrison90 commented May 2, 2024

Fixes #694
Fixes https://github.com/grafana/hyperion-planning/issues/20

📦 Published PR as canary version: 4.17.2--canary.714.9000579577.0

✨ Test out this PR locally via:

npm install @grafana/scenes@4.17.2--canary.714.9000579577.0
# or 
yarn add @grafana/scenes@4.17.2--canary.714.9000579577.0

@ashharrison90 ashharrison90 added type/bug Something isn't working patch Increment the patch version when merged release Create a release when this pr is merged labels May 2, 2024
@ashharrison90 ashharrison90 self-assigned this May 2, 2024
Copy link
Member

@dprokop dprokop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one thing that I think is worth addressing in this PR:

  1. Create a complete filter (label & value)
  2. Change filter dimension (observe, that the partial filter is synced to the URL)
  3. Refresh the page (observe that the filter value select is open).

I think we should treat the dimension change as new filter config transaction, meaning that the filter should not be commited to the URL until it's complete (dimension + value configured).

Copy link
Member

@dprokop dprokop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

@ashharrison90 ashharrison90 merged commit 0023106 into main May 9, 2024
3 checks passed
@ashharrison90 ashharrison90 deleted the ash/694 branch May 9, 2024 08:20
@grafanabot
Copy link
Contributor

🚀 PR was released in v4.17.2 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filters: When changing filter dimension, the value should be validated or cleared
3 participants