Skip to content

Commit b64aaf3

Browse files
authored
Rename UI and crate for the Redap browser (#9074)
Pure rename PR. Since we don't have a clear product name to use yet, the UI tab is renamed as follows: <img width="359" alt="image" src="https://github.com/user-attachments/assets/7f5bc1fd-8831-40f7-8471-2060b7cd5d82" /> The underlying crate is now named `re_redap_browser`, as `redap` is commonly used in the code base to refer to catalog servers.
1 parent de3e9ea commit b64aaf3

File tree

12 files changed

+84
-79
lines changed

12 files changed

+84
-79
lines changed

ARCHITECTURE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ Of course, this will only take us so far. In the future we plan on caching queri
9898
Here is an overview of the crates included in the project:
9999

100100
<picture>
101-
<img src="https://static.rerun.io/crates/4ebb81d4dc640dfb2634d37fec5c53e80fb25f51/full.png" alt="">
102-
<source media="(max-width: 480px)" srcset="https://static.rerun.io/crates/4ebb81d4dc640dfb2634d37fec5c53e80fb25f51/480w.png">
103-
<source media="(max-width: 768px)" srcset="https://static.rerun.io/crates/4ebb81d4dc640dfb2634d37fec5c53e80fb25f51/768w.png">
104-
<source media="(max-width: 1024px)" srcset="https://static.rerun.io/crates/4ebb81d4dc640dfb2634d37fec5c53e80fb25f51/1024w.png">
105-
<source media="(max-width: 1200px)" srcset="https://static.rerun.io/crates/4ebb81d4dc640dfb2634d37fec5c53e80fb25f51/1200w.png">
101+
<img src="https://static.rerun.io/crates/425c53093e8ce590bc8bfc0c2a71ae2d9ec2fafc/full.png" alt="">
102+
<source media="(max-width: 480px)" srcset="https://static.rerun.io/crates/425c53093e8ce590bc8bfc0c2a71ae2d9ec2fafc/480w.png">
103+
<source media="(max-width: 768px)" srcset="https://static.rerun.io/crates/425c53093e8ce590bc8bfc0c2a71ae2d9ec2fafc/768w.png">
104+
<source media="(max-width: 1024px)" srcset="https://static.rerun.io/crates/425c53093e8ce590bc8bfc0c2a71ae2d9ec2fafc/1024w.png">
105+
<source media="(max-width: 1200px)" srcset="https://static.rerun.io/crates/425c53093e8ce590bc8bfc0c2a71ae2d9ec2fafc/1200w.png">
106106
</picture>
107107

108108
<!-- !!! IMPORTANT!!!
@@ -136,7 +136,7 @@ Update instructions:
136136
| Crate | Description |
137137
|-----------------------|------------------------------------------------------------------------------------------------------------|
138138
| re_blueprint_tree | The UI for the blueprint tree in the left panel. |
139-
| re_catalog_hub | The UI and communication to implement the in-viewer catalog browser |
139+
| re_redap_browser | The UI and communication to implement the in-viewer redap server browser. |
140140
| re_chunk_store_ui | A chunk store browser UI. |
141141
| re_component_ui | Provides UI editors for Rerun component data for registration with the Rerun Viewer component UI registry. |
142142
| re_selection_panel | The UI for the selection panel. |

Cargo.lock

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5815,34 +5815,6 @@ dependencies = [
58155815
"convert_case",
58165816
]
58175817

5818-
[[package]]
5819-
name = "re_catalog_hub"
5820-
version = "0.23.0-alpha.1+dev"
5821-
dependencies = [
5822-
"ahash",
5823-
"arrow",
5824-
"egui",
5825-
"egui_table",
5826-
"once_cell",
5827-
"parking_lot",
5828-
"re_arrow_util",
5829-
"re_grpc_client",
5830-
"re_log",
5831-
"re_log_encoding",
5832-
"re_log_types",
5833-
"re_protos",
5834-
"re_sorbet",
5835-
"re_types",
5836-
"re_types_core",
5837-
"re_ui",
5838-
"re_view_dataframe",
5839-
"re_viewer_context",
5840-
"thiserror 1.0.65",
5841-
"tokio-stream",
5842-
"tonic",
5843-
"tonic-web-wasm-client",
5844-
]
5845-
58465818
[[package]]
58475819
name = "re_chunk"
58485820
version = "0.23.0-alpha.1+dev"
@@ -6458,6 +6430,34 @@ dependencies = [
64586430
"zerocopy",
64596431
]
64606432

6433+
[[package]]
6434+
name = "re_redap_browser"
6435+
version = "0.23.0-alpha.1+dev"
6436+
dependencies = [
6437+
"ahash",
6438+
"arrow",
6439+
"egui",
6440+
"egui_table",
6441+
"once_cell",
6442+
"parking_lot",
6443+
"re_arrow_util",
6444+
"re_grpc_client",
6445+
"re_log",
6446+
"re_log_encoding",
6447+
"re_log_types",
6448+
"re_protos",
6449+
"re_sorbet",
6450+
"re_types",
6451+
"re_types_core",
6452+
"re_ui",
6453+
"re_view_dataframe",
6454+
"re_viewer_context",
6455+
"thiserror 1.0.65",
6456+
"tokio-stream",
6457+
"tonic",
6458+
"tonic-web-wasm-client",
6459+
]
6460+
64616461
[[package]]
64626462
name = "re_renderer"
64636463
version = "0.23.0-alpha.1+dev"
@@ -7131,7 +7131,6 @@ dependencies = [
71317131
"re_build_info",
71327132
"re_build_tools",
71337133
"re_capabilities",
7134-
"re_catalog_hub",
71357134
"re_chunk",
71367135
"re_chunk_store",
71377136
"re_chunk_store_ui",
@@ -7148,6 +7147,7 @@ dependencies = [
71487147
"re_log_types",
71497148
"re_memory",
71507149
"re_query",
7150+
"re_redap_browser",
71517151
"re_renderer",
71527152
"re_selection_panel",
71537153
"re_smart_channel",

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ re_video = { path = "crates/utils/re_video", version = "=0.23.0-alpha.1", defaul
9191

9292
# crates/viewer:
9393
re_blueprint_tree = { path = "crates/viewer/re_blueprint_tree", version = "=0.23.0-alpha.1", default-features = false }
94-
re_catalog_hub = { path = "crates/viewer/re_catalog_hub", version = "=0.23.0-alpha.1", default-features = false }
94+
re_redap_browser = { path = "crates/viewer/re_redap_browser", version = "=0.23.0-alpha.1", default-features = false }
9595
re_component_ui = { path = "crates/viewer/re_component_ui", version = "=0.23.0-alpha.1", default-features = false }
9696
re_context_menu = { path = "crates/viewer/re_context_menu", version = "=0.23.0-alpha.1", default-features = false }
9797
re_chunk_store_ui = { path = "crates/viewer/re_chunk_store_ui", version = "=0.23.0-alpha.1", default-features = false }

crates/viewer/re_catalog_hub/README.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

crates/viewer/re_catalog_hub/Cargo.toml renamed to crates/viewer/re_redap_browser/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
22
authors.workspace = true
3-
description = "The UI and communication for the in-viewer catalog browser."
3+
description = "The UI and communication to implement the in-viewer redap server browser."
44
edition.workspace = true
55
homepage.workspace = true
66
license.workspace = true
7-
name = "re_catalog_hub"
7+
name = "re_redap_browser"
88
publish = true
99
readme = "README.md"
1010
repository.workspace = true
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# re_redap_browser
2+
3+
Part of the [`rerun`](https://github.com/rerun-io/rerun) family of crates.
4+
5+
[![Latest version](https://img.shields.io/crates/v/re_redap_browser.svg)](https://crates.io/crates/re_redap_browser?speculative-link)
6+
[![Documentation](https://docs.rs/re_redap_browser/badge.svg)](https://docs.rs/re_redap_browser?speculative-link)
7+
![MIT](https://img.shields.io/badge/license-MIT-blue.svg)
8+
![Apache](https://img.shields.io/badge/license-Apache-blue.svg)
9+
10+
The UI and communication to implement the in-viewer redap server browser

crates/viewer/re_catalog_hub/src/collection_ui.rs renamed to crates/viewer/re_redap_browser/src/collection_ui.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use re_ui::UiExt as _;
1515
use re_view_dataframe::display_record_batch::{DisplayRecordBatch, DisplayRecordBatchError};
1616
use re_viewer_context::ViewerContext;
1717

18-
use super::hub::{Command, RecordingCollection};
18+
use super::servers::{Command, RecordingCollection};
1919

2020
#[derive(thiserror::Error, Debug)]
2121
enum CollectionUiError {

crates/viewer/re_catalog_hub/src/lib.rs renamed to crates/viewer/re_redap_browser/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
//! it.
33
44
mod collection_ui;
5-
mod hub;
5+
mod servers;
66

7-
pub use hub::CatalogHub;
7+
pub use servers::RedapServers;

crates/viewer/re_catalog_hub/src/hub.rs renamed to crates/viewer/re_redap_browser/src/servers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub struct RecordingCollection {
4040
/// All catalogs known to the viewer.
4141
// TODO(andreas,antoine): Eventually, collections are part of a catalog, meaning there is going to be multiple ones.
4242
#[derive(Default)]
43-
pub struct CatalogHub {
43+
pub struct RedapServers {
4444
// TODO(andreas,antoine): One of those Urls is probably going to be a local catalog.
4545
catalogs: Arc<Mutex<HashMap<redap::Origin, Catalog>>>,
4646

@@ -56,7 +56,7 @@ pub enum Command {
5656
DeselectCollection,
5757
}
5858

59-
impl CatalogHub {
59+
impl RedapServers {
6060
/// Asynchronously fetches a catalog from a URL and adds it to the hub.
6161
///
6262
/// If this url was used before, it will refresh the existing catalog in the hub.

crates/viewer/re_viewer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ map_view = ["dep:re_view_map"]
4646
re_blueprint_tree.workspace = true
4747
re_build_info.workspace = true
4848
re_capabilities.workspace = true
49-
re_catalog_hub.workspace = true
49+
re_redap_browser.workspace = true
5050
re_chunk.workspace = true
5151
re_chunk_store.workspace = true
5252
re_component_ui.workspace = true

crates/viewer/re_viewer/src/app.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use itertools::Itertools as _;
44

55
use re_build_info::CrateVersion;
66
use re_capabilities::MainThreadToken;
7-
use re_catalog_hub::CatalogHub;
87
use re_data_source::{DataSource, FileContents};
98
use re_entity_db::entity_db::EntityDb;
109
use re_log_types::{ApplicationId, FileSource, LogMsg, StoreKind};
10+
use re_redap_browser::RedapServers;
1111
use re_renderer::WgpuResourcePoolStatistics;
1212
use re_smart_channel::{ReceiveSet, SmartChannelSource};
1313
use re_ui::{notifications, DesignTokens, UICommand, UICommandSender};
@@ -205,8 +205,8 @@ pub struct App {
205205
/// Interface for all recordings and blueprints
206206
pub(crate) store_hub: Option<StoreHub>,
207207

208-
/// Interface for all catalogs
209-
catalog_hub: CatalogHub,
208+
/// Redap server catalogs and browser UI
209+
redap_servers: RedapServers,
210210

211211
/// Notification panel.
212212
pub(crate) notifications: notifications::NotificationUi,
@@ -422,7 +422,7 @@ impl App {
422422
blueprint_loader(),
423423
&crate::app_blueprint::setup_welcome_screen_blueprint,
424424
)),
425-
catalog_hub: CatalogHub::default(),
425+
redap_servers: RedapServers::default(),
426426
notifications: notifications::NotificationUi::new(),
427427

428428
memory_panel: Default::default(),
@@ -590,7 +590,7 @@ impl App {
590590
match data_source.stream(Some(waker)) {
591591
Ok(re_data_source::StreamSource::LogMessages(rx)) => self.add_receiver(rx),
592592
Ok(re_data_source::StreamSource::CatalogData { origin: url }) => {
593-
self.catalog_hub.fetch_catalog(&self.async_runtime, url);
593+
self.redap_servers.fetch_catalog(&self.async_runtime, url);
594594
}
595595
Err(err) => {
596596
re_log::error!("Failed to open data source: {}", re_error::format(err));
@@ -880,10 +880,12 @@ impl App {
880880
UICommand::ToggleTimePanel => app_blueprint.toggle_time_panel(&self.command_sender),
881881

882882
UICommand::ToggleChunkStoreBrowser => match self.state.display_mode {
883-
DisplayMode::Viewer | DisplayMode::RedapBrowser => {
883+
DisplayMode::LocalRecordings | DisplayMode::RedapBrowser => {
884884
self.state.display_mode = DisplayMode::ChunkStoreBrowser;
885885
}
886-
DisplayMode::ChunkStoreBrowser => self.state.display_mode = DisplayMode::Viewer,
886+
DisplayMode::ChunkStoreBrowser => {
887+
self.state.display_mode = DisplayMode::LocalRecordings;
888+
}
887889
},
888890

889891
#[cfg(debug_assertions)]
@@ -1198,7 +1200,7 @@ impl App {
11981200
#[cfg(not(target_arch = "wasm32"))]
11991201
let is_history_enabled = false;
12001202

1201-
self.catalog_hub.on_frame_start();
1203+
self.redap_servers.on_frame_start();
12021204

12031205
render_ctx.begin_frame();
12041206
self.state.show(
@@ -1207,7 +1209,7 @@ impl App {
12071209
render_ctx,
12081210
entity_db,
12091211
store_context,
1210-
&self.catalog_hub,
1212+
&self.redap_servers,
12111213
&self.reflection,
12121214
&self.component_ui_registry,
12131215
&self.view_class_registry,
@@ -1734,7 +1736,8 @@ impl App {
17341736
}
17351737

17361738
pub fn fetch_catalog(&self, origin: re_grpc_client::redap::Origin) {
1737-
self.catalog_hub.fetch_catalog(&self.async_runtime, origin);
1739+
self.redap_servers
1740+
.fetch_catalog(&self.async_runtime, origin);
17381741
}
17391742
}
17401743

0 commit comments

Comments
 (0)