From 74698fa89fb1219d219a9e1bbd102f1154f4cedd Mon Sep 17 00:00:00 2001 From: Oleksii Sukholita <72558888+aleksei-suholita@users.noreply.github.com> Date: Wed, 11 Nov 2026 20:23:45 +0100 Subject: [PATCH] M7: links open in the browser in the desktop app, What's new on the update prompt among them (#2216) The desktop app built eframe without its `links` feature, so egui-winit dropped every `ctx.open_url` with only a log warning: the update prompt's What's new link and Download button, the About and Credits links, Terms in Live and the link in the Dev Mode panel did nothing on click. The feature adds no crate: `webbrowser` is already a dependency of the app. DeckCraft's desktop app builds eframe with it too. `links_in_the_interface_open_in_the_browser` fails without the feature. Co-authored-by: Oleksii Sukholita --- Cargo.lock | 1 + apps/figcraft/Cargo.toml | 4 +++- apps/figcraft/src/services_tests.rs | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 73d4d60fb..6714be11b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1547,6 +1547,7 @@ dependencies = [ "raw-window-handle", "smithay-clipboard", "web-time", + "webbrowser", "windows-sys 0.61.2", "winit", ] diff --git a/apps/figcraft/Cargo.toml b/apps/figcraft/Cargo.toml index f2ea73ba8..386cb1f33 100644 --- a/apps/figcraft/Cargo.toml +++ b/apps/figcraft/Cargo.toml @@ -23,7 +23,9 @@ craft-window = { workspace = true } # The suite's settings folder: `FIGCRAFT_CONFIG_DIR`, a portable marker, then the platform folder. craft-settings = { workspace = true } egui = { workspace = true } -eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "clipboard", "wayland", "x11"] } +# `links`: without it eframe drops every `ctx.open_url` and hyperlink click (the update prompt's +# What's new and Download, About, Credits) with only a log warning. +eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "clipboard", "links", "wayland", "x11"] } serde_json = { workspace = true } log = { workspace = true } rfd = { workspace = true } diff --git a/apps/figcraft/src/services_tests.rs b/apps/figcraft/src/services_tests.rs index 970f1729e..0d197f5ce 100644 --- a/apps/figcraft/src/services_tests.rs +++ b/apps/figcraft/src/services_tests.rs @@ -142,3 +142,13 @@ fn the_next_dialog_starts_in_the_folder_of_the_last_pick() { let _ = std::fs::remove_dir_all(&dir); assert_eq!(start_folder(Some(dir)), None, "a folder deleted since: the system's own"); } + +/// The update prompt's What's new and Download, and the About and Credits links, open through +/// `ctx.open_url`. eframe drops those with only a log warning unless it is built with `links`. +#[test] +fn links_in_the_interface_open_in_the_browser() { + let manifest = include_str!("../Cargo.toml"); + let eframe: Vec<&str> = manifest.lines().filter(|l| l.trim_start().starts_with("eframe =")).collect(); + assert!(!eframe.is_empty(), "the app depends on eframe"); + assert!(eframe.iter().any(|l| l.contains("\"links\"")), "eframe is built with `links`: {eframe:?}"); +}