Skip to content

Commit

Permalink
Update to latest egui master (#6593)
Browse files Browse the repository at this point in the history
### What
* Update to latest egui, including
emilk/egui#4676 (among other things)
* Removes workaround for #6227
added in #6255
* Closes #6256

### 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 examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6593?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6593?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
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/6593)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
  • Loading branch information
emilk authored Jun 19, 2024
1 parent 1fdd77f commit 0fe47d1
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 50 deletions.
48 changes: 27 additions & 21 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1485,24 +1485,24 @@ dependencies = [
]

[[package]]
name = "directories-next"
version = "2.0.0"
name = "directories"
version = "5.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc"
checksum = "9a49173b84e034382284f27f1af4dcbbd231ffa358c0fe316541a7337f376a35"
dependencies = [
"cfg-if",
"dirs-sys-next",
"dirs-sys",
]

[[package]]
name = "dirs-sys-next"
version = "0.1.2"
name = "dirs-sys"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d"
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
dependencies = [
"libc",
"option-ext",
"redox_users",
"winapi",
"windows-sys 0.48.0",
]

[[package]]
Expand Down Expand Up @@ -1553,7 +1553,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
[[package]]
name = "ecolor"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"bytemuck",
"emath",
Expand All @@ -1563,11 +1563,11 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"ahash",
"bytemuck",
"directories-next",
"directories",
"document-features",
"egui",
"egui-wgpu",
Expand Down Expand Up @@ -1599,7 +1599,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"accesskit",
"ahash",
Expand All @@ -1616,7 +1616,7 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -1635,7 +1635,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"accesskit_winit",
"ahash",
Expand Down Expand Up @@ -1675,7 +1675,7 @@ dependencies = [
[[package]]
name = "egui_extras"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"ahash",
"egui",
Expand All @@ -1691,7 +1691,7 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -1709,7 +1709,7 @@ dependencies = [
[[package]]
name = "egui_plot"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"ahash",
"egui",
Expand Down Expand Up @@ -1752,7 +1752,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "emath"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"bytemuck",
"serde",
Expand Down Expand Up @@ -1853,7 +1853,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.27.2"
source = "git+https://github.com/emilk/egui.git?rev=814ad0783cf8b826a258e29ed4c50ae6daa2e890#814ad0783cf8b826a258e29ed4c50ae6daa2e890"
source = "git+https://github.com/emilk/egui.git?rev=8ac1d613fc69d2eb4235cda47cf2fbd5a8292150#8ac1d613fc69d2eb4235cda47cf2fbd5a8292150"
dependencies = [
"ab_glyph",
"ahash",
Expand Down Expand Up @@ -3549,6 +3549,12 @@ version = "11.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"

[[package]]
name = "option-ext"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"

[[package]]
name = "orbclient"
version = "0.3.45"
Expand Down Expand Up @@ -4177,7 +4183,7 @@ name = "re_analytics"
version = "0.17.0-alpha.4"
dependencies = [
"crossbeam",
"directories-next",
"directories",
"ehttp",
"re_build_info",
"re_build_tools",
Expand Down
23 changes: 14 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ egui = { version = "0.27.2", features = [
"rayon",
] }
egui_commonmark = { version = "0.16", default-features = false }
egui_extras = { version = "0.27.2", features = ["http", "image", "puffin"] }
egui_extras = { version = "0.27.2", features = [
"http",
"image",
"puffin",
"serde",
] }
egui_plot = "0.27.2"
egui_tiles = "0.8.0"
egui-wgpu = "0.27.2"
Expand Down Expand Up @@ -131,7 +136,7 @@ console_error_panic_hook = "0.1.6"
convert_case = "0.6"
criterion = "0.5"
crossbeam = "0.8"
directories-next = "2"
directories = "5"
document-features = "0.2.8"
ehttp = "0.5.0"
enumset = "1.0.12"
Expand Down Expand Up @@ -454,13 +459,13 @@ missing_errors_doc = "allow"
# As a last resport, patch with a commit to our own repository.
# ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk.

ecolor = { git = "https://github.com/emilk/egui.git", rev = "814ad0783cf8b826a258e29ed4c50ae6daa2e890" } # egui master 2024-06-13
eframe = { git = "https://github.com/emilk/egui.git", rev = "814ad0783cf8b826a258e29ed4c50ae6daa2e890" } # egui master 2024-06-13
egui = { git = "https://github.com/emilk/egui.git", rev = "814ad0783cf8b826a258e29ed4c50ae6daa2e890" } # egui master 2024-06-13
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "814ad0783cf8b826a258e29ed4c50ae6daa2e890" } # egui master 2024-06-13
egui_plot = { git = "https://github.com/emilk/egui.git", rev = "814ad0783cf8b826a258e29ed4c50ae6daa2e890" } # egui master 2024-06-13
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "814ad0783cf8b826a258e29ed4c50ae6daa2e890" } # egui master 2024-06-13
emath = { git = "https://github.com/emilk/egui.git", rev = "814ad0783cf8b826a258e29ed4c50ae6daa2e890" } # egui master 2024-06-13
ecolor = { git = "https://github.com/emilk/egui.git", rev = "8ac1d613fc69d2eb4235cda47cf2fbd5a8292150" } # egui master 2024-06-19
eframe = { git = "https://github.com/emilk/egui.git", rev = "8ac1d613fc69d2eb4235cda47cf2fbd5a8292150" } # egui master 2024-06-19
egui = { git = "https://github.com/emilk/egui.git", rev = "8ac1d613fc69d2eb4235cda47cf2fbd5a8292150" } # egui master 2024-06-19
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "8ac1d613fc69d2eb4235cda47cf2fbd5a8292150" } # egui master 2024-06-19
egui_plot = { git = "https://github.com/emilk/egui.git", rev = "8ac1d613fc69d2eb4235cda47cf2fbd5a8292150" } # egui master 2024-06-19
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "8ac1d613fc69d2eb4235cda47cf2fbd5a8292150" } # egui master 2024-06-19
emath = { git = "https://github.com/emilk/egui.git", rev = "8ac1d613fc69d2eb4235cda47cf2fbd5a8292150" } # egui master 2024-06-19

# Useful while developing:
# ecolor = { path = "../../egui/crates/ecolor" }
Expand Down
2 changes: 1 addition & 1 deletion crates/re_analytics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ url = { workspace = true }
uuid = { workspace = true, features = ["serde", "v4", "js"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
directories-next.workspace = true
directories.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { workspace = true, features = ["Storage"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/re_analytics/src/native/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
path::{Path, PathBuf},
};

use directories_next::ProjectDirs;
use directories::ProjectDirs;
use uuid::Uuid;

use crate::Property;
Expand Down
2 changes: 2 additions & 0 deletions crates/re_ui/examples/re_ui_example/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ impl ExampleApp {
ui.ctx()
.send_viewport_cmd(egui::ViewportCommand::Maximized(!maximized));
} else if title_bar_response.is_pointer_button_down_on() {
// TODO(emilk): This should probably only run on `title_bar_response.drag_started_by(PointerButton::Primary)`,
// see https://github.com/emilk/egui/pull/4656
ui.ctx().send_viewport_cmd(egui::ViewportCommand::StartDrag);
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/re_ui/src/command_palette.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl CommandPalette {
/// Show the command palette, if it is visible.
#[must_use = "Returns the command that was selected"]
pub fn show(&mut self, egui_ctx: &egui::Context) -> Option<UICommand> {
self.visible &= !egui_ctx.input_mut(|i| i.consume_key(Default::default(), Key::Escape));
self.visible &= !egui_ctx.input_mut(|i| i.key_pressed(Key::Escape));
if !self.visible {
self.query.clear();
return None;
Expand Down
18 changes: 1 addition & 17 deletions crates/re_viewer/src/app_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ impl AppState {
// Left panel (recordings and blueprint)
//

let mut left_panel = egui::SidePanel::left("blueprint_panel")
let left_panel = egui::SidePanel::left("blueprint_panel")
.resizable(true)
.frame(egui::Frame {
fill: ui.visuals().panel_fill,
Expand All @@ -382,26 +382,10 @@ impl AppState {
let show_welcome =
store_context.blueprint.app_id() == Some(&StoreHub::welcome_screen_app_id());

//TODO(#6256): workaround for https://github.com/emilk/egui/issues/4475
left_panel = left_panel
.frame(egui::Frame::default())
.show_separator_line(false);

left_panel.show_animated_inside(
ui,
app_blueprint.blueprint_panel_state().is_expanded(),
|ui: &mut egui::Ui| {
//TODO(#6256): workaround for https://github.com/emilk/egui/issues/4475
let max_rect = ui.max_rect();
ui.painter()
.rect_filled(max_rect, 0.0, ui.visuals().panel_fill);
ui.painter().vline(
max_rect.right(),
max_rect.y_range(),
ui.visuals().widgets.noninteractive.bg_stroke,
);
ui.set_clip_rect(max_rect);

// ListItem don't need vertical spacing so we disable it, but restore it
// before drawing the blueprint panel.
ui.spacing_mut().item_spacing.y = 0.0;
Expand Down
2 changes: 2 additions & 0 deletions crates/re_viewer/src/ui/top_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ pub fn top_panel(
ui.ctx()
.send_viewport_cmd(egui::ViewportCommand::Maximized(!maximized));
} else if title_bar_response.is_pointer_button_down_on() {
// TODO(emilk): This should probably only run on `title_bar_response.drag_started_by(PointerButton::Primary)`,
// see https://github.com/emilk/egui/pull/4656
ui.ctx().send_viewport_cmd(egui::ViewportCommand::StartDrag);
}
}
Expand Down

0 comments on commit 0fe47d1

Please sign in to comment.