Improve visibility and wording around close panel on toggle setting (#63548)
# Objective - Improve documentation for `close_panel_on_toggle` setting. ## Solution - Previous docs were a bit ambiguous and since refactoring the setting name is not possible at the time, I improved the documentation. ## Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed's UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [ ] Tests cover the new/changed behavior - [ ] Performance impact has been considered and is acceptable Release Notes: - Added the`close_panel_on_toggle` setting to the settings UI and improved its documentation.
This commit is contained in:
1 parent
ad0d789038
commit
04fc4edf86
4 files changed
+35
-7
No files matched your search
@@ -192,9 +192,10 @@
|
||||
"reveal_if_open": false,
|
||||
// Whether to automatically close files that have been deleted on disk.
|
||||
"close_on_file_delete": false,
|
||||
// Whether toggling a panel (e.g. with its keyboard shortcut) also closes
|
||||
// the panel when it is already focused, instead of just moving focus back
|
||||
// to the editor.
|
||||
// Whether invoking a panel's ToggleFocus action while the panel is already
|
||||
// focused closes the panel, instead of just moving focus back to the
|
||||
// editor. This only applies to a panel's focus-toggle action, not to its
|
||||
// regular visibility-toggle action.
|
||||
"close_panel_on_toggle": false,
|
||||
// Relative size of the drop target in the editor that will open dropped file as a split pane (0-0.5)
|
||||
// E.g. 0.25 == If you drop onto the top/bottom quarter of the pane a new vertical split will be used
|
||||
|
||||
@@ -135,9 +135,10 @@ pub struct WorkspaceSettingsContent {
|
||||
///
|
||||
/// Default: true
|
||||
pub zoomed_padding: Option<bool>,
|
||||
/// Whether toggling a panel (e.g. with its keyboard shortcut) also closes
|
||||
/// the panel when it is already focused, instead of just moving focus back
|
||||
/// to the editor.
|
||||
/// Whether invoking a panel's `ToggleFocus` action while the panel is
|
||||
/// already focused closes the panel, instead of just moving focus back
|
||||
/// to the editor. This only applies to a panel's focus-toggle action, not
|
||||
/// to its regular visibility-toggle action.
|
||||
///
|
||||
/// Default: false
|
||||
pub close_panel_on_toggle: Option<bool>,
|
||||
|
||||
@@ -5042,7 +5042,7 @@ fn window_and_layout_page() -> SettingsPage {
|
||||
]
|
||||
}
|
||||
|
||||
fn pane_modifiers_section() -> [SettingsPageItem; 4] {
|
||||
fn pane_modifiers_section() -> [SettingsPageItem; 5] {
|
||||
[
|
||||
SettingsPageItem::SectionHeader("Pane Modifiers"),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
@@ -5109,6 +5109,22 @@ fn window_and_layout_page() -> SettingsPage {
|
||||
metadata: None,
|
||||
files: USER,
|
||||
}),
|
||||
SettingsPageItem::SettingItem(SettingItem {
|
||||
title: "Close Panel on Toggle",
|
||||
description: "Whether invoking a panel's ToggleFocus action while it's already focused closes the panel, instead of just moving focus back to the editor.",
|
||||
field: Box::new(SettingField {
|
||||
organization_override: None,
|
||||
json_path: Some("close_panel_on_toggle"),
|
||||
pick: |settings_content| {
|
||||
settings_content.workspace.close_panel_on_toggle.as_ref()
|
||||
},
|
||||
write: |settings_content, value, _| {
|
||||
settings_content.workspace.close_panel_on_toggle = value;
|
||||
},
|
||||
}),
|
||||
metadata: None,
|
||||
files: USER,
|
||||
}),
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -502,6 +502,16 @@ When enabled, this setting will automatically close tabs for files that have bee
|
||||
|
||||
> Note: Dirty files (files with unsaved changes) will not be automatically closed even when this setting is enabled, ensuring you don't lose unsaved work.
|
||||
|
||||
## Close Panel on Toggle
|
||||
|
||||
- Description: Whether invoking a panel's `ToggleFocus` action while the panel is already focused closes the panel, instead of just moving focus back to the editor. This only applies to a panel's focus-toggle action, not to its regular visibility-toggle action.
|
||||
- Setting: `close_panel_on_toggle`
|
||||
- Default: `false`
|
||||
|
||||
**Options**
|
||||
|
||||
`boolean` values
|
||||
|
||||
## Code Lens
|
||||
|
||||
- Description: Whether and how to display code lenses from language servers. Code lenses show contextual information such as reference counts, implementations, and other metadata provided by the language server.
|
||||
|
||||
Reference in new issue
Block a user