Add missing panels to View menu#60356
Open
dinocosta wants to merge 1 commit into
Open
Conversation
* Add both "Agent Panel" and "Git Panel" entries to the menu items for
the "View" app menu.
* Update the action used for the "Terminal Panel" menu item from
`terminal_panel::ToggleFocus` to `terminal_panel::Toggle` to ensure we
display a shortcut for this menu item.
* Another valid option would be to update the default keymap to use
`terminal_panel::ToggleFocus` instead but that would probably break
existing user's expectations that the default shortcut toggles the
terminal panel, instead of toggling its focus.
* Introduce `zed_actions::git_panel` to be able to extract its
`ToggleFocus` action, following the existing pattern.
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.
Objective
Ensure that all existing panels have corresponding menu items in the "View" menu. I was onboarding a friend to Zed yesterday that was having a hard time figuring out how to interact with the Agent. Although he did open the "View" menu, I noticed that the Agent panel item was missing from there, making it hard for new users to discover it exists.
Solution
terminal_panel::ToggleFocustoterminal_panel::Toggleto ensure we display a shortcut for this menu item.terminal_panel::ToggleFocusinstead but that would probably break existing user's expectations that the default shortcut toggles the terminal panel, instead of toggling its focus.zed_actions::git_panelto be able to extract itsToggleFocusaction, following the existing pattern.Next Steps
It's worth noting that, even though there's now an "Agent Panel" item mapped to the
assistant::ToggleFocusaction, its default keybinding is not displayed (at least on macOS), because of the way it's defined ascmd-?. Usingcmd-shift-/instead doesn't work, so we'll likely have to updateMacKeyboardMapperto allow mapping between shifted and unshifted keys equivalent, that is, when?is detected, it is able to determine that, in the user's layout that is the result ofshift-/.Testing
Manually tested, screenshots can be seen in the "Showcase" section.
Self-Review Checklist:
Showcase
Before
After
Release Notes: