-
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
Open image and mesh files with drag-drop and File->Open #3116
Conversation
578c0e7
to
7c77d75
Compare
Size changes
|
6c16a87
to
8e1ca38
Compare
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.
Great stuff! Lot's of the heavy lifting is beyond me, but I still got a few comments along the way (some may be me trying to understand more than anything else).
} else if uri.starts_with("ws://") || uri.starts_with("wss://") { | ||
DataSource::WebSocketAddr(uri) | ||
|
||
// Now we are into heuristics territory: |
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'm curious as to what the use cases for that heuristic. Wouldn't it be cleaner to bail and produce a proper error? On CLI, it certainly feels so ("Argument XXX couldn't be resolved and was ignored"). Try to construct a Path
from the input and checking for file existence feels like it should behave OK for CLI.
For drag and drop/File->Open, the OS should provide a well formed path by definition.
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 is all for making the CLI life nicer.
rerun 127.0.0.1
rerun foo.jpg
rerun www.host.com/bar.rrd
…
it's nice not having to spell out the protocol for each of these
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 guess what I fail to understand here is the use of looks_like_a_file_path()
. Isn't that handled by feeding whatever we have to Path
first, and check for existence? The other heuristics do make sense to me.
Co-authored-by: Antoine Beyeler <[email protected]>
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.
That welcome screen workflow is not done haunting us :)
SmartChannelSource::File(_) | SmartChannelSource::RrdHttpStream { .. } => { | ||
return true; | ||
return false; |
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 is not going to cut it either, I should have been clearer earlier—sorry for that. This also breaks the demo workflow: the loading screen is shown initially, but if you then close the recording, we're back to the loading screen—but that time it should be the welcome screen. This is way I originally used is_connected()
.
I'm not quite sure how to proceed here. That "is_connected" trick might be valid only if this is the only stream. The hole we dug with that whole "when to show welcome screen" thing is only getting deeper now 😓
Maybe that's something we can revisit later (maybe when my brain fog dissipate), in this case an issue with 0.9 milestone will do.
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.
Argh
I think #3125 covers it well
Co-authored-by: Antoine Beyeler <[email protected]>
Broke in #3116 Tried to use tokio from a rayon thread, which doesn't work out-of-the-box. But the rayon use is unnecessary - each call to `data_source.stream` is non-blocking anyways. ### 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/3160) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/3160) - [Docs preview](https://rerun.io/preview/11d5fea9d4982d50c808bc571299a9ded4d37177/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/11d5fea9d4982d50c808bc571299a9ded4d37177/examples) <!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
What
Supports mixing of:
in
rerun
command-line arguments. All will be streamed to the viewer in parallel.File->Open
and drag-and-dropping of files will use the same code path, and now supports meshes and images on native.Saving for later PR:
How
Created a new
re_data_source
crate with anenum DataSource
plus all the functions to stream data from all these sources.I also removed
RemoteViewerApp
which I originally created to have a custom GUI for selecting what server to connect to, but that GUI has been disabled since forever, so high time to remove it.On web, care is taken to wake up the ui thread when loading data from web-sockets or HTTP.
On native, we just spin up another thread that notices new messages and wakes up the ui.
Checklist