-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dataframe column visibility can now be controlled (#7453)
### What * Closes #7067 * Builds on #7438 Add the possibility to control the visibility of column: - Time columns (except the one corresponding to the query) and component columns can be hidden by clicking on the on-hover button in their header. - A new button in the view title bar with a popup to show/hide any column. This also fixes a red warning showing up when latest-at queries return 0 rows (see #7449 for background). Note to reviewer: the meat is in `space_view_class.rs`, which is ofc hidden by default by GitHub. https://github.com/user-attachments/assets/d2b55c63-53db-46dd-9339-b10af98a073b ### TODO - [x] Fix bad sizing of the popup menu ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7453?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7453?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7453) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
- Loading branch information
Showing
55 changed files
with
2,384 additions
and
51 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
crates/store/re_types/definitions/rerun/blueprint/archetypes.fbs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_visible_columns.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace rerun.blueprint.archetypes; | ||
|
||
|
||
/// Which columns should be displayed by the dataframe view. | ||
table DataframeVisibleColumns ( | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
// --- Optional --- | ||
|
||
/// Are all column selected, or only those specified by the user? | ||
selection_mode: rerun.blueprint.components.ColumnSelectionMode ("attr.rerun.component_optional", nullable, order: 100); | ||
|
||
/// The time columns to include (if mode is set to "Selected"). | ||
time_columns: [rerun.blueprint.components.TimelineName] ("attr.rerun.component_optional", nullable, order: 200); | ||
|
||
/// The component columns to include (if mode is set to "Selected"). | ||
component_columns: [rerun.blueprint.components.ComponentColumnSelector] ("attr.rerun.component_optional", nullable, order: 300); | ||
} |
2 changes: 2 additions & 0 deletions
2
crates/store/re_types/definitions/rerun/blueprint/components.fbs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
crates/store/re_types/definitions/rerun/blueprint/components/column_selection_mode.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace rerun.blueprint.components; | ||
|
||
|
||
/// How are columns selected in the dataframe view? | ||
enum ColumnSelectionMode: ubyte ( | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
/// Invalid value. Won't show up in generated types. | ||
Invalid = 0, | ||
|
||
/// Show all columns returned by the query. | ||
All = 1 (default), | ||
|
||
/// Show only the columns specified by the user. | ||
Selected = 2, | ||
} |
13 changes: 13 additions & 0 deletions
13
crates/store/re_types/definitions/rerun/blueprint/components/component_column_selector.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
/// Describe a component column to be selected in the dataframe view. | ||
//TODO(ab, jleibs): this probably needs reunification with whatever structure the data out API uses. | ||
table ComponentColumnSelector ( | ||
"attr.arrow.transparent", | ||
"attr.rust.derive": "Default, PartialEq, Eq, Hash", | ||
"attr.rust.repr": "transparent", | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
selector: rerun.blueprint.datatypes.ComponentColumnSelector (order: 100); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
crates/store/re_types/definitions/rerun/blueprint/datatypes.fbs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
crates/store/re_types/definitions/rerun/blueprint/datatypes/component_column_selector.fbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace rerun.blueprint.datatypes; | ||
|
||
|
||
/// Describe a component column to be selected in the dataframe view. | ||
//TODO(ab, jleibs): this probably needs reunification with whatever structure the data out API uses. | ||
// Has to be a table because flatbuffer doesn't support strings in structs. | ||
table ComponentColumnSelector ( | ||
"attr.rust.derive": "Default, PartialEq, Eq, Hash", | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
/// The entity path for this component. | ||
entity_path: rerun.datatypes.EntityPath (order: 100); | ||
|
||
/// The name of the component. | ||
// NOTE: this field cannot be named `component_name`, because it would then clash with | ||
// `ComponentMixin.component_name()` in the Python API. | ||
component: rerun.datatypes.Utf8 (order: 200); | ||
|
||
//TODO(ab, jleibs): many more fields to come (archetype, etc.) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
256 changes: 256 additions & 0 deletions
256
crates/store/re_types/src/blueprint/archetypes/dataframe_visible_columns.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.