-
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.
Click
recording://entity/path
links in markdown (#3442)
### What You can now embed links to entities in markdown documents using `recording://entity/path`, and link to components using `recording://entity/path.Color`. In order to support this, a new `DataPath` is introduced, with a stricter parsing of entity paths. Previously `foo bar` was a valid path, but now you are only allowed ASCII, numbers, underscore and dash as names (outside of quotes). A (uncompleted) description of the SfM example as markdown to - Test how that feels as documentation - Try out the ability to link directly to entities and components from within the markdown ![image](https://github.com/rerun-io/rerun/assets/1148717/3883afe7-4c7b-42da-995d-3214fc773b52) ![image](https://github.com/rerun-io/rerun/assets/1148717/f55ddd85-297f-44ff-9dde-a0309931ade2) ### 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 [demo.rerun.io](https://demo.rerun.io/pr/3389) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/3389) - [Docs preview](https://rerun.io/preview/e14be611c235231fa3e91a7f106cf594bf245e51/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/e14be611c235231fa3e91a7f106cf594bf245e51/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/) --------- Co-authored-by: Nikolaus West <[email protected]>
- Loading branch information
1 parent
d6d45a3
commit e4e1ae7
Showing
30 changed files
with
969 additions
and
120 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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
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
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,42 @@ | ||
use re_types::{components::InstanceKey, ComponentName}; | ||
|
||
use crate::EntityPath; | ||
|
||
/// A general path to some data. | ||
/// | ||
/// This always starts with an [`EntityPath`], followed | ||
/// by an optional [`InstanceKey`], followed by an optional [`ComponentName`]. | ||
/// | ||
/// For instance: | ||
/// | ||
/// * `points` | ||
/// * `points.Color` | ||
/// * `points[#42]` | ||
/// * `points[#42].Color` | ||
#[derive(Clone, Eq, PartialEq, Hash)] | ||
pub struct DataPath { | ||
pub entity_path: EntityPath, | ||
|
||
pub instance_key: Option<InstanceKey>, | ||
|
||
pub component_name: Option<ComponentName>, | ||
} | ||
|
||
impl std::fmt::Display for DataPath { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
self.entity_path.fmt(f)?; | ||
if let Some(instance_key) = &self.instance_key { | ||
write!(f, "[#{}]", instance_key.0)?; | ||
} | ||
if let Some(component_name) = &self.component_name { | ||
write!(f, ".{component_name:?}")?; | ||
} | ||
Ok(()) | ||
} | ||
} | ||
|
||
impl std::fmt::Debug for DataPath { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
self.to_string().fmt(f) | ||
} | ||
} |
Oops, something went wrong.
e4e1ae7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.25
.datastore/num_rows=1000/num_instances=1000/packed=false/latest_at/default
416
ns/iter (± 0
)323
ns/iter (± 1
)1.29
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/primary/default
329
ns/iter (± 0
)240
ns/iter (± 0
)1.37
datastore/num_rows=1000/num_instances=1000/packed=false/latest_at_missing/secondaries/default
455
ns/iter (± 0
)356
ns/iter (± 0
)1.28
mono_points_arrow_batched/decode_message_bundles
7798324
ns/iter (± 10985
)5621010
ns/iter (± 33667
)1.39
mono_points_arrow_batched/decode_total
8220415
ns/iter (± 14368
)6092771
ns/iter (± 74020
)1.35
This comment was automatically generated by workflow using github-action-benchmark.