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

Dataframe column visibility can now be controlled #7453

Merged
merged 13 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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);
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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,
}
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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ table TimelineName (
"attr.arrow.transparent",
"attr.python.aliases": "str",
"attr.python.array_aliases": "str, Sequence[str]",
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord",
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord, Hash",
"attr.rust.repr": "transparent",
"attr.rerun.scope": "blueprint"
) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ table Utf8List (
"attr.arrow.transparent",
"attr.python.aliases": "Sequence[str]",
"attr.rerun.scope": "blueprint",
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord, Default",
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord, Default, Hash",
"attr.rust.repr": "transparent",
"attr.rust.tuple_struct",
"attr.rust.override_crate": "re_types_blueprint"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ table EntityPath (
"attr.arrow.transparent",
"attr.python.aliases": "str",
"attr.python.array_aliases": "Sequence[str]",
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord, Default",
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord, Default, Hash",
"attr.rust.repr": "transparent",
"attr.rust.tuple_struct",
"attr.rust.override_crate": "re_types_core"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading