At RustConf we were demo'ing zed, and it continually popped open the chat panel. We're usually inured to this because the Chat panel doesn't open unless a Guest is in the channel, but it made me sad that we were showing a long stream of vacuous comments and unresponded to questions on every demo screen. We may bring chat back in the future, but we need more thought on the UX, and we need to rebuild the backend to not use the existing collab server that we're trying to move off of. Release Notes: - Removed the chat feature from Zed (Sorry to the 5 of you who use this on the regular!)
103 lines
2.9 KiB
Rust
103 lines
2.9 KiB
Rust
use gpui::Pixels;
|
|
use schemars::JsonSchema;
|
|
use serde::{Deserialize, Serialize};
|
|
use settings::{Settings, SettingsKey, SettingsSources, SettingsUi};
|
|
use workspace::dock::DockPosition;
|
|
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct CollaborationPanelSettings {
|
|
pub button: bool,
|
|
pub dock: DockPosition,
|
|
pub default_width: Pixels,
|
|
}
|
|
|
|
#[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,
|
|
pub default_width: Pixels,
|
|
}
|
|
|
|
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, SettingsUi, SettingsKey)]
|
|
#[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: right
|
|
pub dock: Option<DockPosition>,
|
|
/// Default width of the panel in pixels.
|
|
///
|
|
/// Default: 300
|
|
pub default_width: Option<f32>,
|
|
}
|
|
|
|
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug, SettingsUi, SettingsKey)]
|
|
#[settings_key(key = "message_editor")]
|
|
pub struct MessageEditorSettings {
|
|
/// Whether to automatically replace emoji shortcodes with emoji characters.
|
|
/// For example: typing `:wave:` gets replaced with `👋`.
|
|
///
|
|
/// Default: false
|
|
pub auto_replace_emoji_shortcode: Option<bool>,
|
|
}
|
|
|
|
impl Settings for CollaborationPanelSettings {
|
|
type FileContent = PanelSettingsContent;
|
|
|
|
fn load(
|
|
sources: SettingsSources<Self::FileContent>,
|
|
_: &mut gpui::App,
|
|
) -> anyhow::Result<Self> {
|
|
sources.json_merge()
|
|
}
|
|
|
|
fn import_from_vscode(_vscode: &settings::VsCodeSettings, _current: &mut Self::FileContent) {}
|
|
}
|
|
|
|
impl Settings for NotificationPanelSettings {
|
|
type FileContent = NotificationPanelSettingsContent;
|
|
|
|
fn load(
|
|
sources: SettingsSources<Self::FileContent>,
|
|
_: &mut gpui::App,
|
|
) -> anyhow::Result<Self> {
|
|
sources.json_merge()
|
|
}
|
|
|
|
fn import_from_vscode(_vscode: &settings::VsCodeSettings, _current: &mut Self::FileContent) {}
|
|
}
|
|
|
|
impl Settings for MessageEditorSettings {
|
|
type FileContent = MessageEditorSettings;
|
|
|
|
fn load(
|
|
sources: SettingsSources<Self::FileContent>,
|
|
_: &mut gpui::App,
|
|
) -> anyhow::Result<Self> {
|
|
sources.json_merge()
|
|
}
|
|
|
|
fn import_from_vscode(_vscode: &settings::VsCodeSettings, _current: &mut Self::FileContent) {}
|
|
}
|