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
Table Panel: Filter column values with operators or expressions #79853
Table Panel: Filter column values with operators or expressions #79853
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "contains" and "expression" in the UI should have the first letter capitalized to align with the rest of the UI. Also are the typical comparison operators just all separate options in the drop-down list?
@ahuarte47 funny coincidence, i recently made something similar, that supports complex expressions on multiple fields. was hoping to integrate it in the future for similar purposes of matching/filtering data :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving the docs element of this, but of course this still has to go through technical review.
docs/sources/panels-visualizations/visualizations/table/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Hi @oscarkilhed @imatwawana @codeincarnate please, are there any plan to review this MR? |
Hey, @ahuarte47, I've already approved this for the docs updates, but the other reviewers will need confirm that they approve this as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First off, thanks so much for the contribution! This looks pretty good, that being said please see my comments on changes.
Other than that, I think that the control should be moved below "Select All Values" with a heading label of "Filter Available Values" or similar. Currently it's a little unclear what the control will do until you start using it and I think that should help. Nonetheless overall I think this is definitely useful.
We also may need to dig in a bit more to determine what we should do for cases with changing values as that may end up being a bit unintuitive.
Thanks so much for the change @ahuarte47. I'll be taking another look today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took another look, very much appreciate the updates and I think this looks good! Definitely makes this more useful overall 🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @ahuarte47!
One note I had while testing this out locally is that the filter state seems to be cleared (i.e. in this case the > 20
condition, while the selected values stay in place as expected)
Screen.Recording.2024-02-13.at.12.10.38.AM.mov
If not too much of a lift I think persisting the filter state would be useful and provide a better overall UX - happy for us to address this as a follow-up PR - cc @codeincarnate interested in your thoughts here 😬
Hi @nmarrs, thank you very much! About...
You are right, it would be great to persist the filter state, I should study how to do this, maybe looking at other similar controls. Anyway, any help is welcome, of course! |
@nmarrs I'd be fine addressing that in a follow-up PR. It's potentially a little annoying but it doesn't seem like a deal breaker 😄 |
Hi, thank you very much to everybody for your reviews and advices! |
What is this feature?
This MR adds the capability of showing column values in a Table panel using comparison operators or evaluating a bool expression.
User can choose from several operators to display column values:
contains
operator matches a regex pattern (operator by default)=
,!=
,<
,<=
,>
,>=
)expression
operator evaluates a bool expression, char$
represents the column value in the expression (e.g. "$ >= 10 && $ <= 50").This MR provides extra capabilities to work with #79290
Why do we need this feature?
When using big tables there is often a need to filter by values to select many entries. There is no possibility to select them using a precise criteria (e.g. a range of values, "value >= 10.0 && value <= 50").
Who is this feature for?
Users filtetring large list of values in tables.
Which issue(s) does this PR fix?:
Fixes #79800
Special notes for your reviewer:
Please check that: