-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate SpaceView from a singular Component to an Archetype (#4522)
### What Just what the title says. Best reviewed commit by commit. ### 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): * Full build: [app.rerun.io](https://app.rerun.io/pr/4522/index.html) * Partial build: [app.rerun.io](https://app.rerun.io/pr/4522/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) - Useful for quick testing when changes do not affect examples in any way * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4522) - [Docs preview](https://rerun.io/preview/f43a2e5293d2ee590e9910247f6543f7439b2692/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/f43a2e5293d2ee590e9910247f6543f7439b2692/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
- Loading branch information
Showing
66 changed files
with
2,636 additions
and
1,044 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
include "./blueprint/datatypes/query_expressions.fbs"; | ||
include "./blueprint/datatypes/space_view_component.fbs"; | ||
|
||
include "./blueprint/components/auto_layout.fbs"; | ||
include "./blueprint/components/auto_space_views.fbs"; | ||
include "./blueprint/components/entities_determined_by_user.fbs"; | ||
include "./blueprint/components/entity_properties_component.fbs"; | ||
include "./blueprint/components/name.fbs"; | ||
include "./blueprint/components/panel_view.fbs"; | ||
include "./blueprint/components/query_expressions.fbs"; | ||
include "./blueprint/components/space_view_component.fbs"; | ||
include "./blueprint/components/space_view_maximized.fbs"; | ||
include "./blueprint/components/space_view_origin.fbs"; | ||
include "./blueprint/components/space_view_class.fbs"; | ||
include "./blueprint/components/included_space_views.fbs"; | ||
include "./blueprint/components/included_queries.fbs"; | ||
include "./blueprint/components/viewport_layout.fbs"; | ||
|
||
include "./blueprint/archetypes/space_view_blueprint.fbs"; | ||
include "./blueprint/archetypes/viewport_blueprint.fbs"; |
40 changes: 40 additions & 0 deletions
40
crates/re_types/definitions/rerun/blueprint/archetypes/space_view_blueprint.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,40 @@ | ||
include "fbs/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
|
||
namespace rerun.blueprint.archetypes; | ||
|
||
// --- | ||
|
||
/// The top-level description of the Viewport. | ||
table SpaceViewBlueprint ( | ||
"attr.docs.unreleased", | ||
"attr.rerun.scope": "blueprint", | ||
"attr.rust.derive": "Default" | ||
) { | ||
// --- Required --- | ||
|
||
/// The class of the view. | ||
class_identifier: rerun.blueprint.components.SpaceViewClass ("attr.rerun.component_required", order: 100); | ||
|
||
// --- Optional --- | ||
|
||
/// The name of the view. | ||
display_name: rerun.blueprint.components.Name ("attr.rerun.component_optional", nullable, order: 200); | ||
|
||
/// The "anchor point" of this space view. | ||
/// | ||
/// The transform at this path forms the reference point for all scene->world transforms in this space view. | ||
/// I.e. the position of this entity path in space forms the origin of the coordinate system in this space view. | ||
/// Furthermore, this is the primary indicator for heuristics on what entities we show in this space view. | ||
space_origin: rerun.blueprint.components.SpaceViewOrigin ("attr.rerun.component_optional", nullable, order: 300); | ||
|
||
/// True if the user is has added entities themselves. False otherwise. | ||
entities_determined_by_user: rerun.blueprint.components.EntitiesDeterminedByUser ("attr.rerun.component_optional", nullable, order: 400); | ||
|
||
/// `BlueprintId`s of the `DataQuery`s that make up this `SpaceView`. | ||
/// | ||
/// It determines which entities are part of the spaceview. | ||
contents: rerun.blueprint.components.IncludedQueries ("attr.rerun.component_optional", nullable, order: 500); | ||
} |
20 changes: 20 additions & 0 deletions
20
crates/re_types/definitions/rerun/blueprint/components/entities_determined_by_user.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 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// Whether the space view entities were manually edited. | ||
table EntitiesDeterminedByUser ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive": "Default, PartialEq, Eq, PartialOrd, Ord", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
value: bool (order: 100); | ||
} |
14 changes: 7 additions & 7 deletions
14
...print/components/space_view_component.fbs → ...blueprint/components/included_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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
include "arrow/attributes.fbs"; | ||
include "docs/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/attributes.fbs"; | ||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// A view of a space. | ||
|
||
/// All the queries belonging to a given `SpaceView`. | ||
/// | ||
/// Unstable. Used for the ongoing blueprint experimentations. | ||
table SpaceViewComponent ( | ||
table IncludedQueries ( | ||
"attr.docs.unreleased", | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive_only": "Clone" | ||
"attr.rust.derive": "Default", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
component: rerun.blueprint.datatypes.SpaceViewComponent (order: 100); | ||
query_ids: [rerun.datatypes.Uuid] (order: 100); | ||
} |
20 changes: 20 additions & 0 deletions
20
crates/re_types/definitions/rerun/blueprint/components/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,20 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// The name of a blueprint entity. | ||
table Name ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
value: string (order: 100); | ||
} |
20 changes: 20 additions & 0 deletions
20
crates/re_types/definitions/rerun/blueprint/components/space_view_class.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 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// The class of a `SpaceView`. | ||
table SpaceViewClass ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive": "Default, PartialEq, Eq, PartialOrd, Ord", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
value: string (order: 100); | ||
} |
20 changes: 20 additions & 0 deletions
20
crates/re_types/definitions/rerun/blueprint/components/space_view_origin.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 @@ | ||
include "arrow/attributes.fbs"; | ||
include "python/attributes.fbs"; | ||
include "rust/attributes.fbs"; | ||
|
||
include "rerun/datatypes.fbs"; | ||
include "rerun/attributes.fbs"; | ||
|
||
namespace rerun.blueprint.components; | ||
|
||
// --- | ||
|
||
/// The origin of a `SpaceView`. | ||
table SpaceViewOrigin ( | ||
"attr.rerun.scope": "blueprint", | ||
"attr.docs.unreleased", | ||
"attr.rust.derive": "PartialEq, Eq, PartialOrd, Ord", | ||
"attr.rust.repr": "transparent" | ||
) { | ||
value: rerun.datatypes.EntityPath (order: 100); | ||
} |
41 changes: 0 additions & 41 deletions
41
crates/re_types/definitions/rerun/blueprint/datatypes/space_view_component.fbs
This file was deleted.
Oops, something went wrong.
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.
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.