From 47af878ebbcbff6053febdd50be7bbd389ecbfea Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Thu, 31 Jul 2025 03:34:35 -0400 Subject: [PATCH] Do not sort settings profiles (#35389) After playing with this for a bit, I realize it does not feel good to not have control over the order of profiles. I find myself wanting to group similar profiles together and not being able to. Release Notes: - N/A --- .../src/settings_profile_selector.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/crates/settings_profile_selector/src/settings_profile_selector.rs b/crates/settings_profile_selector/src/settings_profile_selector.rs index 698733c010987d871df9a44812a461cafd45eb15..3b057c2507ac814808fd6996485c6c8813d5547b 100644 --- a/crates/settings_profile_selector/src/settings_profile_selector.rs +++ b/crates/settings_profile_selector/src/settings_profile_selector.rs @@ -74,13 +74,10 @@ impl SettingsProfileSelectorDelegate { cx: &mut Context, ) -> Self { let settings_store = cx.global::(); - let mut profile_names: Vec = settings_store + let mut profile_names: Vec> = settings_store .configured_settings_profiles() - .map(|s| s.to_string()) + .map(|s| Some(s.to_string())) .collect(); - - profile_names.sort(); - let mut profile_names: Vec<_> = profile_names.into_iter().map(Some).collect(); profile_names.insert(0, None); let matches = profile_names @@ -359,15 +356,15 @@ mod tests { #[gpui::test] async fn test_settings_profile_selector_state(cx: &mut TestAppContext) { - let demo_videos_profile_name = "Demo Videos".to_string(); let classroom_and_streaming_profile_name = "Classroom / Streaming".to_string(); + let demo_videos_profile_name = "Demo Videos".to_string(); let profiles_json = json!({ - demo_videos_profile_name.clone(): { - "buffer_font_size": 15.0 - }, classroom_and_streaming_profile_name.clone(): { "buffer_font_size": 20.0, + }, + demo_videos_profile_name.clone(): { + "buffer_font_size": 15.0 } }); let (workspace, cx) = init_test(profiles_json.clone(), cx).await;