Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Sep 3, 2025

Related

What

Bool and List[Bool] column can now be filtered by is true/false. For List[Bool], all instances must be equal to the query value.

Added a bunch of test for the filter themselves.

This PR also goes all in on the "semantic" syntax highlighting, which does raise some questions/inconsistencies. We will likely need to:

  • discuss the colour theme
  • update the table rendering to also use apply the color scheme
image

Copy link

github-actions bot commented Sep 3, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
4154da6 https://rerun.io/viewer/pr/11095 +nightly +main

Note: This comment is updated whenever you push a commit.

@abey79 abey79 added ui concerns graphical user interface include in changelog labels Sep 3, 2025
@abey79 abey79 changed the title Add support for filtering Add support for filtering on boolean columns Sep 3, 2025
Comment on lines +351 to +355
if ui.re_radio_value(query, true, "true").clicked()
|| ui.re_radio_value(query, false, "false").clicked()
{
action = FilterUiAction::CommitStateToBlueprint;
}
Copy link
Member

Choose a reason for hiding this comment

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

Would be awesome if these could also have the syntax highlighting color

Copy link
Member Author

Choose a reason for hiding this comment

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

let's keep as TBD :)

@abey79 abey79 requested a review from lucasmerlin September 5, 2025 08:13
Copy link
Member

@lucasmerlin lucasmerlin left a comment

Choose a reason for hiding this comment

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

Awesome!

Comment on lines 6 to 49
(
Filter {
column_name: "string_list",
operation: StringContains(
"c",
),
},
RecordBatch {
schema: Schema {
fields: [
Field {
name: "string_list",
data_type: List(
Field {
name: "item",
data_type: Utf8,
nullable: false,
dict_id: 0,
dict_is_ordered: false,
metadata: {},
},
),
nullable: false,
dict_id: 0,
dict_is_ordered: false,
metadata: {},
},
],
metadata: {},
},
columns: [
ListArray
[
StringArray
[
"c",
"ab",
],
StringArray
[
"A B",
"aBc",
],
],
Copy link
Member

Choose a reason for hiding this comment

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

So, for boolean arrays, all values must match, while for string arrrays, it's enough if a single value matches? I feel like this is a bit unexpected. But on the other hand it makes sense, I guess. Eventually we should have an all/any toggle for arrays.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's correct, the semantics are not super consistent. TBH, i'm not expecting to see a whole lot of list of bool with more than a single one, so it's probably not a huge deal. But we definitely need to review/design the semantics of all of these, and make sure the UI is consistent.

FWIW, I'm about to introduce a 3rd semantics for scalar: only consider the 1st element 😬 (because I'm not sure how to deal with [1, 2, 3] > 3 but we must deal with [1] > 3 because that's how our properties are typed.

cc @pweids

@abey79 abey79 merged commit d3188da into main Sep 5, 2025
40 checks passed
@abey79 abey79 deleted the antoine/filter-bool branch September 5, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants