-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query editor for the dataframe view (#7071)
### What - Fixes #7065 - Supersedes #6961 This PR introduce a new blueprint archetype and related bespoke UI to configure the query underlying a dataframe view. As a consequence of this new scheme, Visible Time Range is no longer shown in dataframe view selection panel. <img width="297" alt="image" src="https://github.com/user-attachments/assets/2ccae940-7e4c-4eab-8951-dfd63601407f"> ### 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/7071?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/7071?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/7071) - [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
86 changed files
with
3,941 additions
and
677 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
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.
52 changes: 52 additions & 0 deletions
52
crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_query.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,52 @@ | ||
namespace rerun.blueprint.archetypes; | ||
|
||
|
||
// Rationale behind the present data modelling: | ||
// - Avoid using `union` at all cost. | ||
// - An explicit "mode" enum maps well with a UI toggle and API parameter, and enabled a hard disambiguation when | ||
// settings are present for both the latest at and range modes. | ||
// - Timestamps are hard-invalidated by a change of timeline. So we keep them on a per-timeline basis. | ||
|
||
// TODO(#7067): add visible components (maybe in another archetype?) | ||
// TODO(#7072): add (optional) PoV components | ||
// Note: component list should be modelled as: | ||
// component PovComponents { | ||
// datatype ComponentNames { | ||
// value: [string]; | ||
// } | ||
// } | ||
// | ||
// Motivation: | ||
// - Chances are high that the user prefers to have their pov components _not_ invalidated by a changeof timeline. | ||
// - That is even though a component might _technically_ be soft-invalidated by a change of timeline (e.g. if it was | ||
// not logged on that particular timeline). But we have to deal regardless with potentially invalid component, so this | ||
// doesn't change the story much. | ||
|
||
// -- | ||
|
||
/// The query for the dataframe view. | ||
table DataframeQuery ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.rust.generate_field_info" | ||
) { | ||
// --- Optional --- | ||
|
||
/// The timeline for this query. | ||
/// | ||
/// If unset, use the time panel's timeline and a latest at query, ignoring all other components of this archetype. | ||
timeline: rerun.blueprint.components.TimelineName ("attr.rerun.component_optional", nullable, order: 100); | ||
|
||
/// Kind of query: latest-at or range. | ||
kind: rerun.blueprint.components.QueryKind ("attr.rerun.component_optional", nullable,order: 200); | ||
|
||
/// Configuration for latest-at queries. | ||
/// | ||
/// Note: configuration as saved on a per-timeline basis. | ||
latest_at_queries: rerun.blueprint.components.LatestAtQueries ("attr.rerun.component_optional", nullable,order: 400); | ||
|
||
/// Configuration for the time range queries. | ||
/// | ||
/// Note: configuration as saved on a per-timeline basis. | ||
time_range_queries: rerun.blueprint.components.TimeRangeQueries ("attr.rerun.component_optional", nullable,order: 500); | ||
} | ||
|
14 changes: 0 additions & 14 deletions
14
crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_view_mode.fbs
This file was deleted.
Oops, something went wrong.
5 changes: 4 additions & 1 deletion
5
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.
21 changes: 0 additions & 21 deletions
21
crates/store/re_types/definitions/rerun/blueprint/components/dataframe_view_mode.fbs
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
crates/store/re_types/definitions/rerun/blueprint/components/latest_at_queries.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,14 @@ | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
/// Configuration for latest at queries. | ||
/// | ||
/// Note: configuration as saved on a per-timeline basis. | ||
table LatestAtQueries ( | ||
"attr.arrow.transparent", | ||
"attr.rust.derive": "Default, PartialEq, Eq", | ||
"attr.rust.repr": "transparent", | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
queries: [rerun.blueprint.datatypes.LatestAtQuery] (order: 100); | ||
} |
16 changes: 16 additions & 0 deletions
16
crates/store/re_types/definitions/rerun/blueprint/components/query_kind.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; | ||
|
||
|
||
/// The kind of query displayed by the dataframe view | ||
enum QueryKind: ubyte ( | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
/// Invalid value. Won't show up in generated types. | ||
Invalid = 0, | ||
|
||
/// Query | ||
LatestAt (default), | ||
|
||
/// Time range query. | ||
TimeRange, | ||
} |
14 changes: 14 additions & 0 deletions
14
crates/store/re_types/definitions/rerun/blueprint/components/time_range_queries.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,14 @@ | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
/// Configuration for time range queries. | ||
/// | ||
/// Note: configuration as saved on a per-timeline basis. | ||
table TimeRangeQueries ( | ||
"attr.arrow.transparent", | ||
"attr.rust.derive": "Default, PartialEq, Eq", | ||
"attr.rust.repr": "transparent", | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
queries: [rerun.blueprint.datatypes.TimeRangeQuery] (order: 100); | ||
} |
14 changes: 14 additions & 0 deletions
14
crates/store/re_types/definitions/rerun/blueprint/components/timeline_name.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,14 @@ | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
/// A timeline identified by its name. | ||
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.repr": "transparent", | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
value: rerun.datatypes.Utf8 (order: 100); | ||
} |
2 changes: 2 additions & 0 deletions
2
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.
15 changes: 15 additions & 0 deletions
15
crates/store/re_types/definitions/rerun/blueprint/datatypes/latest_at_query.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,15 @@ | ||
namespace rerun.blueprint.datatypes; | ||
|
||
|
||
/// Latest at query configuration for a specific timeline. | ||
// Has to be a table because flatbuffer doesn't support strings in structs. | ||
table LatestAtQuery ( | ||
"attr.rust.derive": "PartialEq, Eq", | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
/// Name of the timeline this applies to. | ||
timeline: rerun.datatypes.Utf8 (order: 100); | ||
|
||
/// Time value to use for this query. | ||
time: rerun.datatypes.TimeInt (order: 200); | ||
} |
18 changes: 18 additions & 0 deletions
18
crates/store/re_types/definitions/rerun/blueprint/datatypes/time_range_query.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.datatypes; | ||
|
||
|
||
/// Time range query configuration for a specific timeline. | ||
// Has to be a table because flatbuffer doesn't support strings in structs. | ||
table TimeRangeQuery ( | ||
"attr.rust.derive": "PartialEq, Eq", | ||
"attr.rerun.scope": "blueprint" | ||
) { | ||
/// Name of the timeline this applies to. | ||
timeline: rerun.datatypes.Utf8 (order: 100); | ||
|
||
/// Beginning of the time range. | ||
start: rerun.datatypes.TimeInt (order: 200); | ||
|
||
/// End of the time range (inclusive). | ||
end: rerun.datatypes.TimeInt (order: 300); | ||
} |
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.