-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teach tab tool tips to show key bindings #8810
Conversation
SwitchToTabArgs args{ _TabViewIndex }; | ||
ActionAndArgs switchToTab{ ShortcutAction::SwitchToTab, args }; | ||
const auto keyChord = _keymap ? _keymap.GetKeyBindingForActionWithArgs(switchToTab) : nullptr; | ||
const auto keyChordText = keyChord ? KeyChordSerialization::ToString(keyChord) : L""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird enough, I think we have another keychord->string converter too living in TerminalPage. Not sure which one we should use here. This one used to be used in settings re-serialization, so it was less user-facing.
The one in TerminalApp is admittedly strange. Probably best not to use it.
This is great! Thank you 😄 |
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
<!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes microsoft#2886 * [x] CLA signed. * [ ] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [ ] I've discussed this with core contributors already. ## Detailed Description of the Pull Request / Additional comments Currently the tab tool tip is the tab's title. The PR teaches the TabBase to check if there is a switch to tab command associated with the current tab index, if so concatenates the the relevant mapping to the too tip. Of course, prefers user defined bindings to the default ones. Moved tool tip logic to TabBase so SettingsTab has tooltip as well. 
PR Checklist
Detailed Description of the Pull Request / Additional comments
Currently the tab tool tip is the tab's title.
The PR teaches the TabBase to check if there is a switch to tab command
associated with the current tab index,
if so concatenates the the relevant mapping to the too tip.
Of course, prefers user defined bindings to the default ones.
Moved tool tip logic to TabBase so SettingsTab has tooltip as well.