Repository navigation
feat(menus): one tab context menu everywhere, one look for every menu - #109
Merged
Merged
Conversation
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.
What
shell/tab_menu.rs), used by every place a tab can be right-clicked.shell/menu.rs), so they share one look.Before: which tab menu where
After: one tab menu
Rule (also in the code comment): an item that can never apply to the tab is hidden (Split / Rename on History / Settings pages, Move to Space with one Space, Remove from split outside a group, Split on a tab that is already a pane); an item that applies but has nothing to do now is disabled (Close others / right / all). Every tab is a query tab or a page, so there are no kind-specific extras yet. Rename now opens the same small dialog everywhere (the inline rename by double click stays). Duplicate and Reveal in tree are not offered: there is no generic duplicate for a tab, and tabs have no tree node.
One look for every menu
shell/menu.rsis the only row component. Rows use the kit's own icon column, row height, text size, padding, separator and submenu chevron, with the shortcut right-aligned in muted mono, destructive rows in the same red, disabled rows muted. Removed the private row builders of the grid cell menu, the column header menu, the all-results menu and the Space switcher; grid and diagram menus open through onepopup_athelper (window-clamped with the same margin). Rows that were plain kit rows already matched and are unchanged.Icons are 16 px in every menu: the kit draws a 12 px slot, but a minimum size on the icon's own style widens it, so no fork or custom submenu is needed. Every row has the icon column (an empty icon when it has none), so labels share one x; pick lists use a check in that column. The tab menu never changes shape: Rename, Split, Remove from split are disabled when they do not apply, Move to Space always lists the other Spaces plus "New Space…" (creates one and moves the tab). Only Close has an icon; the other close rows keep the empty column.
Tests
-D warnings,cargo test --release --workspace --lib --binspass locally.Before / after screenshots are kept outside the repo.