From 5cb801fb1cc046bfab89bcdf2412ee2c8a79eb01 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 17 Nov 2026 16:34:09 +0000 Subject: [PATCH] Gallery: theme-editor stories behind a gallery feature, like the other domain crates --- crates/story-render/Cargo.toml | 1 + crates/ui-gallery/Cargo.toml | 6 ++++-- crates/ui-gallery/src/lib.rs | 1 + tools/cl | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/story-render/Cargo.toml b/crates/story-render/Cargo.toml index 54a8c5b9b..94779a1be 100644 --- a/crates/story-render/Cargo.toml +++ b/crates/story-render/Cargo.toml @@ -34,6 +34,7 @@ print = ["craft-ui-gallery/print"] review = ["craft-ui-gallery/review"] table = ["craft-ui-gallery/table"] text = ["craft-ui-gallery/text"] +theme-editor = ["craft-ui-gallery/theme-editor"] theme-store = ["craft-ui-gallery/theme-store"] timeline = ["craft-ui-gallery/timeline"] dialogs = ["craft-ui-gallery/dialogs"] diff --git a/crates/ui-gallery/Cargo.toml b/crates/ui-gallery/Cargo.toml index 39c2b81c7..1e9167542 100644 --- a/crates/ui-gallery/Cargo.toml +++ b/crates/ui-gallery/Cargo.toml @@ -34,7 +34,7 @@ test = false # One feature per domain crate whose stories the viewer links; `apps` is all of them and the default. A build # that needs one crate's stories only (the story renderer) turns the default off and names the crate. default = ["apps"] -apps = ["automation", "browse", "color-ui", "draw", "imaging", "layers", "menu", "pages", "print", "review", "table", "text", "theme-store", "timeline", "dialogs", "font-manager", "update"] +apps = ["automation", "browse", "color-ui", "draw", "imaging", "layers", "menu", "pages", "print", "review", "table", "text", "theme-editor", "theme-store", "timeline", "dialogs", "font-manager", "update"] automation = ["dep:craft-automation"] browse = ["dep:craft-browse"] color-ui = ["dep:craft-color-ui"] @@ -47,6 +47,8 @@ print = ["dep:craft-print"] review = ["dep:craft-review"] table = ["dep:craft-table"] text = ["dep:craft-text"] +# The theme panels are linked in every build (the Theme workspace uses them); the feature adds their stories. +theme-editor = ["craft-theme-editor/screen-testing"] theme-store = ["dep:craft-theme-store"] timeline = ["dep:craft-timeline"] dialogs = ["dep:craft-dialogs"] @@ -65,7 +67,7 @@ workspace = true craft-ui = { workspace = true, features = ["app", "testing"] } craft-i18n = { workspace = true } craft-theme = { workspace = true } -craft-theme-editor = { workspace = true, features = ["screen-testing"] } +craft-theme-editor = { workspace = true } craft-window = { workspace = true } egui = { workspace = true } eframe = { version = "0.37", default-features = false } diff --git a/crates/ui-gallery/src/lib.rs b/crates/ui-gallery/src/lib.rs index 53b6cc6ef..85e9b8240 100644 --- a/crates/ui-gallery/src/lib.rs +++ b/crates/ui-gallery/src/lib.rs @@ -46,6 +46,7 @@ fn crates() -> Vec<(&'static str, Registered)> { crates.push(("craft-table", craft_table::ui::testing::registered)); #[cfg(feature = "text")] crates.push(("craft-text", craft_text::testing::registered)); + #[cfg(feature = "theme-editor")] crates.push(("craft-theme-editor", craft_theme_editor::testing::registered)); #[cfg(feature = "theme-store")] crates.push(("craft-theme-store", craft_theme_store::ui::registered)); diff --git a/tools/cl b/tools/cl index c4bb393ec..64e49a79b 100755 --- a/tools/cl +++ b/tools/cl @@ -68,7 +68,7 @@ ROOT = "feature-root" # Domain crates the story renderer can link, by the crate's short name. RENDER_FEATURES = { "automation", "browse", "color-ui", "draw", "imaging", "layers", "menu", "pages", "print", "review", "table", "text", - "theme-store", "timeline", "dialogs", "font-manager", "update", + "theme-editor", "theme-store", "timeline", "dialogs", "font-manager", "update", } REFUSED = { "--all-features": "it enables snapshot, system_fonts, color_fonts, all-languages and more, a set no loop uses, which rebuilds every dependency and the whole framework once; CI runs it",