diff --git a/Cargo.lock b/Cargo.lock index e268bd11749903f4cac0ffe79c074917eb62c49a..8e0cffd24922f9e7494e17fa07ab765df96ea01f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6371,7 +6371,6 @@ dependencies = [ "async-tar", "async-trait", "collections", - "feature_flags", "futures 0.3.30", "gpui", "http_client", @@ -12127,7 +12126,6 @@ name = "theme_selector" version = "0.1.0" dependencies = [ "client", - "feature_flags", "fs", "fuzzy", "gpui", diff --git a/crates/extension/src/extension_store_test.rs b/crates/extension/src/extension_store_test.rs index 08dce1a98e50b3ec8a3babd196c924f2c22a0e14..f14707c3babb293543b2296282e0e00df601ffd8 100644 --- a/crates/extension/src/extension_store_test.rs +++ b/crates/extension/src/extension_store_test.rs @@ -296,7 +296,7 @@ async fn test_extension_store(cx: &mut TestAppContext) { ["ERB", "Plain Text", "Ruby"] ); assert_eq!( - theme_registry.list_names(false), + theme_registry.list_names(), [ "Monokai Dark", "Monokai Light", @@ -377,7 +377,7 @@ async fn test_extension_store(cx: &mut TestAppContext) { assert_eq!(index.themes, expected_index.themes); assert_eq!( - theme_registry.list_names(false), + theme_registry.list_names(), [ "Gruvbox", "Monokai Dark", @@ -424,7 +424,7 @@ async fn test_extension_store(cx: &mut TestAppContext) { ["embedded_template".into(), "ruby".into()] ); assert_eq!( - theme_registry.list_names(false), + theme_registry.list_names(), [ "Gruvbox", "Monokai Dark", diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml index 29c52ba301694e66f4c2969c72cf019a9c63bfea..d76dd5a327c8f159d5bbed765350c627fcc7a8c9 100644 --- a/crates/languages/Cargo.toml +++ b/crates/languages/Cargo.toml @@ -38,7 +38,6 @@ async-compression.workspace = true async-tar.workspace = true async-trait.workspace = true collections.workspace = true -feature_flags.workspace = true futures.workspace = true gpui.workspace = true http_client.workspace = true diff --git a/crates/languages/src/json.rs b/crates/languages/src/json.rs index 28ee884307f2dd6d7fcab52c1fa4c78177465800..d65b30ac79c499f5adac9dc18603a965a5707d02 100644 --- a/crates/languages/src/json.rs +++ b/crates/languages/src/json.rs @@ -3,7 +3,6 @@ use async_compression::futures::bufread::GzipDecoder; use async_tar::Archive; use async_trait::async_trait; use collections::HashMap; -use feature_flags::FeatureFlagAppExt; use futures::StreamExt; use gpui::{AppContext, AsyncAppContext}; use http_client::github::{latest_github_release, GitHubLspBinaryVersion}; @@ -77,13 +76,11 @@ impl JsonLspAdapter { fn get_workspace_config(language_names: Vec, cx: &mut AppContext) -> Value { let action_names = cx.all_action_names(); - let staff_mode = cx.is_staff(); let font_names = &cx.text_system().all_font_names(); let settings_schema = cx.global::().json_schema( &SettingsJsonSchemaParams { language_names: &language_names, - staff_mode, font_names, }, cx, diff --git a/crates/settings/src/json_schema.rs b/crates/settings/src/json_schema.rs index 6ee634a3b5b9bbe7e832ee87322526c8e4deca59..dd01a96c311cf948db909833f730d80974175b26 100644 --- a/crates/settings/src/json_schema.rs +++ b/crates/settings/src/json_schema.rs @@ -2,7 +2,6 @@ use schemars::schema::{ArrayValidation, InstanceType, RootSchema, Schema, Schema use serde_json::Value; pub struct SettingsJsonSchemaParams<'a> { - pub staff_mode: bool, pub language_names: &'a [String], pub font_names: &'a [String], } diff --git a/crates/settings_ui/src/appearance_settings_controls.rs b/crates/settings_ui/src/appearance_settings_controls.rs index 00dd8a4c0103c058c8c343f5a88ec73ae1ebdbb2..70e8e78cb4956316675fd0de9270f548e58b0293 100644 --- a/crates/settings_ui/src/appearance_settings_controls.rs +++ b/crates/settings_ui/src/appearance_settings_controls.rs @@ -85,7 +85,7 @@ impl RenderOnce for ThemeControl { ContextMenu::build(cx, |mut menu, cx| { let theme_registry = ::global(cx); - for theme in theme_registry.list_names(false) { + for theme in theme_registry.list_names() { menu = menu.custom_entry( { let theme = theme.clone(); diff --git a/crates/theme/src/registry.rs b/crates/theme/src/registry.rs index 38aadf6ece7ed99a4c558e2412c0a9e659a273a8..a78a22b08fbdb4e651904c5bfba3e593ca696671 100644 --- a/crates/theme/src/registry.rs +++ b/crates/theme/src/registry.rs @@ -39,10 +39,10 @@ impl Global for GlobalThemeRegistry {} #[async_trait] pub trait ThemeRegistry: Send + Sync + 'static { /// Returns the names of all themes in the registry. - fn list_names(&self, _staff: bool) -> Vec; + fn list_names(&self) -> Vec; /// Returns the metadata of all themes in the registry. - fn list(&self, _staff: bool) -> Vec; + fn list(&self) -> Vec; /// Returns the theme with the given name. fn get(&self, name: &str) -> Result>; @@ -171,13 +171,13 @@ impl Default for RealThemeRegistry { #[async_trait] impl ThemeRegistry for RealThemeRegistry { - fn list_names(&self, _staff: bool) -> Vec { + fn list_names(&self) -> Vec { let mut names = self.state.read().themes.keys().cloned().collect::>(); names.sort(); names } - fn list(&self, _staff: bool) -> Vec { + fn list(&self) -> Vec { self.state .read() .themes @@ -238,11 +238,11 @@ pub struct VoidThemeRegistry; #[async_trait] impl ThemeRegistry for VoidThemeRegistry { - fn list_names(&self, _staff: bool) -> Vec { + fn list_names(&self) -> Vec { Vec::new() } - fn list(&self, _staff: bool) -> Vec { + fn list(&self) -> Vec { Vec::new() } diff --git a/crates/theme/src/settings.rs b/crates/theme/src/settings.rs index fdae092c22ff3848a490665f27c64ccae13bbd2c..81e1958029421f5d89811f773fd69be75918e469 100644 --- a/crates/theme/src/settings.rs +++ b/crates/theme/src/settings.rs @@ -711,7 +711,7 @@ impl settings::Settings for ThemeSettings { ) -> schemars::schema::RootSchema { let mut root_schema = generator.root_schema_for::(); let theme_names = ::global(cx) - .list_names(params.staff_mode) + .list_names() .into_iter() .map(|theme_name| Value::String(theme_name.to_string())) .collect(); diff --git a/crates/theme_selector/Cargo.toml b/crates/theme_selector/Cargo.toml index 42087f2704af13a528a1971dc726d872bbce2c0c..ec7e9aa8776e19c4859f1361d3652e35a8be80f5 100644 --- a/crates/theme_selector/Cargo.toml +++ b/crates/theme_selector/Cargo.toml @@ -14,7 +14,6 @@ doctest = false [dependencies] client.workspace = true -feature_flags.workspace = true fs.workspace = true fuzzy.workspace = true gpui.workspace = true diff --git a/crates/theme_selector/src/theme_selector.rs b/crates/theme_selector/src/theme_selector.rs index 47750c0ea05dc1e78337c800a1facc2e5373ab6f..781a930607b856d572e095bc60b703bc8a389c9c 100644 --- a/crates/theme_selector/src/theme_selector.rs +++ b/crates/theme_selector/src/theme_selector.rs @@ -1,5 +1,4 @@ use client::telemetry::Telemetry; -use feature_flags::FeatureFlagAppExt; use fs::Fs; use fuzzy::{match_strings, StringMatch, StringMatchCandidate}; use gpui::{ @@ -96,10 +95,9 @@ impl ThemeSelectorDelegate { ) -> Self { let original_theme = cx.theme().clone(); - let staff_mode = cx.is_staff(); let registry = ::global(cx); let mut themes = registry - .list(staff_mode) + .list() .into_iter() .filter(|meta| { if let Some(theme_filter) = themes_filter { diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index c3d23572e2d9d5ae5c44569b425bc3135ed56f60..175497ffd79ffb917d9e943307770e0d401f76aa 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -3424,7 +3424,7 @@ mod tests { theme::init(theme::LoadThemes::JustBase, cx); let mut has_default_theme = false; - for theme_name in themes.list(false).into_iter().map(|meta| meta.name) { + for theme_name in themes.list().into_iter().map(|meta| meta.name) { let theme = themes.get(&theme_name).unwrap(); assert_eq!(theme.name, theme_name); if theme.name == ThemeSettings::get(None, cx).active_theme.name {