Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Restore notification panel settings (#37661)

Finn Evers45fa03410796
diff --git a/crates/collab_ui/src/panel_settings.rs b/crates/collab_ui/src/panel_settings.rs
index bae118d819c..81d441167c0 100644
--- a/crates/collab_ui/src/panel_settings.rs
+++ b/crates/collab_ui/src/panel_settings.rs
@@ -44,8 +44,24 @@ pub struct ChatPanelSettingsContent {
pub default_width: Option<f32>,
}
-#[derive(Deserialize, Debug, SettingsKey)]
-#[settings_key(key = "notification_panel")]
+#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, SettingsUi, SettingsKey)]
+#[settings_key(key = "collaboration_panel")]
+pub struct PanelSettingsContent {
+ /// Whether to show the panel button in the status bar.
+ ///
+ /// Default: true
+ pub button: Option<bool>,
+ /// Where to dock the panel.
+ ///
+ /// Default: left
+ pub dock: Option<DockPosition>,
+ /// Default width of the panel in pixels.
+ ///
+ /// Default: 240
+ pub default_width: Option<f32>,
+}
+
+#[derive(Deserialize, Debug)]
pub struct NotificationPanelSettings {
pub button: bool,
pub dock: DockPosition,
@@ -53,19 +69,19 @@ pub struct NotificationPanelSettings {
}
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, SettingsUi, SettingsKey)]
-#[settings_key(key = "collaboration_panel")]
-pub struct PanelSettingsContent {
+#[settings_key(key = "notification_panel")]
+pub struct NotificationPanelSettingsContent {
/// Whether to show the panel button in the status bar.
///
/// Default: true
pub button: Option<bool>,
/// Where to dock the panel.
///
- /// Default: left
+ /// Default: right
pub dock: Option<DockPosition>,
/// Default width of the panel in pixels.
///
- /// Default: 240
+ /// Default: 300
pub default_width: Option<f32>,
}
@@ -106,7 +122,7 @@ impl Settings for ChatPanelSettings {
}
impl Settings for NotificationPanelSettings {
- type FileContent = PanelSettingsContent;
+ type FileContent = NotificationPanelSettingsContent;
fn load(
sources: SettingsSources<Self::FileContent>,