settings ui: Add basic setting page fields to UI (#39343)
This PR starts the process of adding each setting field manually to their respective page in the UI and organizes user/project fields as well. The next major step is implementing a numeric stepper component, and handling discriminate union enums as well. I also did some minor polish in this PR as well - Switches now use accent color - Fixed text input rendering with zero width - Made setting pages scrollable - Set drop down context menu style to outline Release Notes: - N/A --------- Co-authored-by: dino <dinojoaocosta@gmail.com>
This commit is contained in:
@@ -220,7 +220,18 @@ impl UserSettingsContent {
|
||||
///
|
||||
/// Default: VSCode
|
||||
#[derive(
|
||||
Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, MergeFrom, PartialEq, Eq, Default,
|
||||
Copy,
|
||||
Clone,
|
||||
Debug,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
PartialEq,
|
||||
Eq,
|
||||
Default,
|
||||
strum::VariantArray,
|
||||
strum::VariantNames,
|
||||
)]
|
||||
pub enum BaseKeymapContent {
|
||||
#[default]
|
||||
@@ -313,7 +324,7 @@ pub struct AudioSettingsContent {
|
||||
|
||||
/// Control what info is collected by Zed.
|
||||
#[skip_serializing_none]
|
||||
#[derive(Default, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema, Debug, MergeFrom)]
|
||||
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema, Debug, MergeFrom)]
|
||||
pub struct TelemetrySettingsContent {
|
||||
/// Send debug info like crash reports.
|
||||
///
|
||||
@@ -325,6 +336,15 @@ pub struct TelemetrySettingsContent {
|
||||
pub metrics: Option<bool>,
|
||||
}
|
||||
|
||||
impl Default for TelemetrySettingsContent {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
diagnostics: Some(true),
|
||||
metrics: Some(true),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[skip_serializing_none]
|
||||
#[derive(Default, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema, Clone, MergeFrom)]
|
||||
pub struct DebuggerSettingsContent {
|
||||
@@ -706,7 +726,19 @@ pub struct OutlinePanelSettingsContent {
|
||||
pub expand_outlines_with_depth: Option<usize>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, MergeFrom, Copy, PartialEq)]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
PartialEq,
|
||||
Eq,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
JsonSchema,
|
||||
MergeFrom,
|
||||
strum::VariantArray,
|
||||
strum::VariantNames,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum DockSide {
|
||||
Left,
|
||||
|
||||
Reference in New Issue
Block a user