settings ui: Use font picker element from onboarding instead of editor for font components (#39593)

The font picker from onboarding is a lot friendlier to interact with and
makes it impossible for a user to select an invalid font from the
settings ui.

I also moved the font picker from the onboarding crate to the ui_input
crate

## New Look
<img width="1136" height="812" alt="image"
src="https://github.com/user-attachments/assets/7436682c-6a41-4860-a18b-13e15b8f3f31"
/>

Release Notes:

- N/A
This commit is contained in:
Anthony Eid
2025-10-06 13:04:43 -04:00
committed by GitHub
parent a67a55d81a
commit ea60a7b172
8 changed files with 272 additions and 183 deletions
+13 -1
View File
@@ -1,5 +1,5 @@
use collections::{HashMap, IndexMap};
use gpui::{FontFallbacks, FontFeatures, FontStyle, FontWeight};
use gpui::{FontFallbacks, FontFeatures, FontStyle, FontWeight, SharedString};
use schemars::{JsonSchema, JsonSchema_repr};
use serde::{Deserialize, Deserializer, Serialize};
use serde_json::Value;
@@ -237,6 +237,18 @@ impl AsRef<str> for FontFamilyName {
}
}
impl From<SharedString> for FontFamilyName {
fn from(value: SharedString) -> Self {
Self(Arc::from(value))
}
}
impl From<FontFamilyName> for SharedString {
fn from(value: FontFamilyName) -> Self {
SharedString::new(value.0)
}
}
impl From<String> for FontFamilyName {
fn from(value: String) -> Self {
Self(Arc::from(value))