From d23aaeebeafd509ff089cc822edd64ccce585181 Mon Sep 17 00:00:00 2001 From: saberoueslati Date: Fri, 24 Jul 2026 23:54:30 +0100 Subject: [PATCH] workspace: Rename read-only tab controls from File to Tab (#61202) ## Context The editor tab's read-only controls used "File" terminology in their tooltips and the tab context menu ("Make File Read-Only", "Locked File", "Read-Only File", etc.). This was misleading in two ways: the option also appears on unsaved and non-file tabs that have no file on disk, and the toggle only controls whether the buffer is editable in the editor, it does not change filesystem permissions. This renames the labels to lock/unlock "Tab" language, matching the lock icon shown when the tab is toggled. Closes #60079. Behavior after the change : [Screencast from 2026-07-17 15-35-30.webm](https://github.com/user-attachments/assets/5fb018cb-515f-449c-a57e-0c0bead250bd) ## How to Review 1 file changed: **crates/workspace/src/pane.rs** Renames three sets of user-facing strings, all pure text changes with no behavior change. The read-only toggle button tooltips become "Unlock Tab" / "This will make this tab editable" and "Locked Tab" / "This tab is read-only". The tab tooltip meta label becomes "Read-Only Tab". The context menu entry, whose label already depends on `capability.editable()`, becomes "Lock Tab for Editing" (when currently editable) and "Unlock Tab for Editing" (when currently read-only); the click handler still calls `toggle_read_only`, so the mapping from label to action is preserved. ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the UI/UX checklist - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Improved read-only tab controls to use "Tab" instead of "File" in tooltips and the tab context menu, since the toggle affects editability in the editor rather than filesystem permissions. --------- Co-authored-by: Nathan Sobo --- crates/workspace/src/pane.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/workspace/src/pane.rs b/crates/workspace/src/pane.rs index 32072f1772..3f8a4c83bf 100644 --- a/crates/workspace/src/pane.rs +++ b/crates/workspace/src/pane.rs @@ -2875,13 +2875,13 @@ impl Pane { .tooltip(move |_, cx| { if toggleable { Tooltip::with_meta( - "Unlock File", + "Unlock Tab", None, - "This will make this file editable", + "This will make this tab editable", cx, ) } else { - Tooltip::with_meta("Locked File", None, "This file is read-only", cx) + Tooltip::with_meta("Locked Tab", None, "This tab is read-only", cx) } }) .on_click(cx.listener(move |pane, _, window, cx| { @@ -3058,7 +3058,7 @@ impl Pane { } else { this.tooltip(move |_, cx| { let text = text.clone(); - Tooltip::with_meta(text, None, "Read-Only File", cx) + Tooltip::with_meta(text, None, "Read-Only Tab", cx) }) } } @@ -3240,9 +3240,9 @@ impl Pane { if capability != Capability::ReadOnly { let read_only_label = if capability.editable() { - "Make File Read-Only" + "Make Tab Read-Only" } else { - "Make File Editable" + "Make Tab Editable" }; menu = menu.separator().entry( read_only_label,