feat: maximize/zoom the focused split (ToggleSplitZoom)#1624
Open
nikicat wants to merge 3 commits into
Open
Conversation
Adds a tmux-style "zoom" action that temporarily expands the focused split to fill the whole tab and toggles back to the exact prior layout on a second press (FR raphamorim#1615). Siblings are hidden via Taffy `Display::None`, so the zoomed panel lays out identically to a lone panel while sibling processes keep running untouched. Hidden panels collapse to zero area and are skipped by the resize, render, scrollbar, border, and unfocused-dim passes via a new `ContextGridItem::is_hidden()` predicate. The dim-overlay selection is extracted to `ContextGrid::unfocused_panels()` so zoomed-away panels no longer paint stale-sized shadows over the maximized panel. Zoom is cleared automatically on split create/close and on split navigation. Bound to Ctrl+Shift+X (Cmd+Shift+X on macOS) and exposed via config (`action = "ToggleSplitZoom"`) and the command palette. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> (cherry picked from commit e203941)
Surfaces when a tab has a maximized (zoomed) pane. The tab strip draws a magnifier glyph (Nerd Font nf-fa-search, U+F002) on the left of any tab whose grid is zoomed. For a single tab — where the strip is normally hidden — the strip is forced visible while zoomed so it can carry the indicator (the window title bar can't render the glyph: it's drawn by sctk-adwaita with no font fallback). Island visibility now flows through a single zoom-aware predicate, `Navigation::island_visible_with(num_tabs, PaneZoom)`, used by the top-margin reservation, the render gate, and input routing so they agree. `PaneZoom` replaces a bare bool to avoid boolean blindness at the call sites; `ContextManager::current_pane_zoom()` centralizes deriving it from `grid_is_zoomed`. The reserved tab-bar height is re-synced on every zoom change (toggle, split navigation, split, close) for single-tab windows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> (cherry picked from commit f795479)
Formatting-only; no behavior change. (CI `cargo fmt --check` gate.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a tmux-style "zoom" action that temporarily expands the focused split to
fill the whole tab, toggling back to the exact prior layout on a second press
(FR #1615). Siblings are hidden via Taffy
Display::None, so the zoomed panellays out identically to a lone panel while sibling processes keep running.
Details
ToggleSplitZoomaction, bound to Ctrl+Shift+X (Cmd+Shift+X onmacOS), exposed via config (
action = "ToggleSplitZoom") and the command palette.scrollbar, border and unfocused-dim passes via a new
ContextGridItem::is_hidden().nf-fa-search, U+F002) marks a zoomed tab in thestrip; for a single tab the strip is forced visible while zoomed to carry the
indicator (the CSD title bar can't render the glyph). Island visibility now flows
through one zoom-aware predicate (
Navigation::island_visible_with) shared by thetop-margin reservation, the render gate and input routing.
Testing
cargo test -p rioterm— adds layout/compute tests covering zoom hide/restore,hidden-panel exclusion from resize/dim passes, and island re-reservation.
Closes #1615
🤖 Generated with Claude Code