-
Notifications
You must be signed in to change notification settings - Fork 373
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
Web: Support multiple .rrd
URLs
#4740
Conversation
self.store_bundle.entity_dbs.retain(|_, db| { | ||
let Some(data_source) = &db.data_source else { | ||
// no data source, keep | ||
return true; |
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.
Does this make sense? I'm not sure how it's possible to have a database without a data source, and if it should be handled differently here.
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.
Yeah -- I'd love for us to refactor things to make this not possible. Mostly this shows up in unit-tests with programmatically created stores.
Any data being streamed into the app should have it's store set based on the channel-source though:
See: https://github.com/rerun-io/rerun/blob/main/crates/re_viewer/src/app.rs#L819-L821
if LOG_INIT.load(Ordering::SeqCst) { | ||
return; | ||
} | ||
LOG_INIT.store(true, Ordering::SeqCst); |
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.
Calling new WebViewer
twice would cause a panic here, because the logger would be set by the previous call. Not sure if this is the best way to fix this, as a panic during initialization will cause the logger to not work anymore.
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.
This looks pretty reasonable -- definitely need to make sure it's well tested though.
self.store_bundle.entity_dbs.retain(|_, db| { | ||
let Some(data_source) = &db.data_source else { | ||
// no data source, keep | ||
return true; |
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.
Yeah -- I'd love for us to refactor things to make this not possible. Mostly this shows up in unit-tests with programmatically created stores.
Any data being streamed into the app should have it's store set based on the channel-source though:
See: https://github.com/rerun-io/rerun/blob/main/crates/re_viewer/src/app.rs#L819-L821
if let Some(store_hub) = app.store_hub.as_mut() { | ||
store_hub.remove_recording_by_uri(url); | ||
} |
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.
Is there any situation where we want to remove the receiver, but keep the recording that has been received so far? I'm imagining a case where a user is connected to a live stream and they want to stop getting updates but still inspect the data.
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.
Definitely. The APIs exposed here were made just to faciliate the React-style magic. I guess we could expose a separate disconnect
API that just closes the stream, and preserves the recording.
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.
I'll leave it out of here for now, I don't know what that would look like on the React side
### What Fixes #4630 New API can be seen here: https://github.com/rerun-io/web-viewer-react-example/blob/main/src/App.tsx ### 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 newly built examples: [app.rerun.io](https://app.rerun.io/pr/4740/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/4740/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/4740/index.html?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 - [PR Build Summary](https://build.rerun.io/pr/4740) - [Docs preview](https://rerun.io/preview/165842ec644787f1b959e93fd14071c3ac7b6986/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/165842ec644787f1b959e93fd14071c3ac7b6986/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
What
Fixes #4630
New API can be seen here: https://github.com/rerun-io/web-viewer-react-example/blob/main/src/App.tsx
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io