-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Show close button in place of file icon on hover for narrow code-pane tabs #10592
Copy link
Copy link
Open
Labels
area:editor-notebooksEditors, notebooks, markdown rendering, LSP, and code display.Editors, notebooks, markdown rendering, LSP, and code display.area:window-tabs-panesWindow, tab, pane, and workspace layout management.Window, tab, pane, and workspace layout management.bugSomething isn't working.Something isn't working.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Metadata
Metadata
Assignees
Labels
area:editor-notebooksEditors, notebooks, markdown rendering, LSP, and code display.Editors, notebooks, markdown rendering, LSP, and code display.area:window-tabs-panesWindow, tab, pane, and workspace layout management.Window, tab, pane, and workspace layout management.bugSomething isn't working.Something isn't working.repro:highThe report includes enough evidence that the issue appears highly reproducible.The report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.Issue has received an initial automated triage pass.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
When many files are open in the code pane, individual editor tabs become too narrow to interact with. Hovering a tab should reveal a close button (×) in place of the file icon, similar to Chrome's tab behavior, so users can still close a specific file even when the tab bar is crowded.
Problem
Opening many files in the code pane causes each editor tab to shrink. Currently the tab layout always shows the file-type icon and only reveals the close button when there is enough horizontal space. Once tabs become narrow, it becomes difficult or impossible to close a specific file from the tab because the close affordance is not visible or easily clickable.
Expected behavior
When hovering over a narrow code-pane tab, the file icon should be temporarily replaced by a close (×) button so the user can close that file without needing keyboard shortcuts or first activating the tab.
I believe that there should be different display methods for tabs occupying varying degrees of overall space:
Actual behavior
The file icon remains visible on hover, and the close button is either hidden or clipped when tabs are narrow, making it hard to close individual files from the tab bar.
Reproduction steps or desired workflow
Desired workflow:
Artifacts
None attached.
Warp version
Unknown.
Operating system
macOS.
Possible source references
app/src/code/view.rs(render_tab_internal): tab rendering logic that shows the file icon and conditionally shows the close button based on hover and active state.