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

Batch of row filtering improvements, backend RPC cleanup. Add less-equal, greater-equal, null/not-null filter types, put supported features in get_state result #2757

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

wesm
Copy link
Contributor

@wesm wesm commented Apr 12, 2024

Addresses #2732, #2731

This patch implements a batch of pending improvements. Even though there are backend OpenRPC changes, because it only affects filtering it won't impact the R runtime but the next iteration will need to update the comm.

  • Only shows is-empty, is-not-empty filters for string data (see video below)
  • Adds >=, <=, is-null, and not-null filter types to the UI
  • Adds "condition" for combining filters, either AND (default) or OR and implements this in Python
  • Adds "is_valid" field to RowFilter so we can invalidate filters and show them in the UI (support for invalidating filters will come in the next PR)
  • Moved SupportedFeatures value to the result of get_state. The state isn't really being used anywhere in the UI so this shouldn't break R
Screencast.from.2024-04-12.16-38-43.webm

filters = [
_compare_filter(0, ">=", 3, condition="or"),
_compare_filter(3, "<=", -4.5, condition="or"),
_compare_filter(3, "<=", -4.5, condition="or"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the duplicate intentional as part of the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'll add a comment

@wesm
Copy link
Contributor Author

wesm commented Apr 12, 2024

I noticed that the != "is not equal to" filter type is missing, so I'll plumb that in now while I'm at this

@wesm
Copy link
Contributor Author

wesm commented Apr 12, 2024

Here's is-not-equal-to in action. I also fixed the bug when switching comparison types causing the UI to be in a partly invalid state

Screencast.from.2024-04-12.17-10-08.webm

@wesm
Copy link
Contributor Author

wesm commented Apr 12, 2024

I took R for a spin also to make sure this didn't break anything. Will go ahead and merge this

@wesm wesm merged commit b60a5f6 into main Apr 12, 2024
24 checks passed
@wesm wesm deleted the feature/de-filtering-improvements branch April 12, 2024 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants