-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Remove command's knowledge of its keys #17215
Merged
Merged
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
90627b3
add origin tag
PankajBhojwani 9dff28f
update calls in tests
PankajBhojwani 8bcbd0b
fix tests
PankajBhojwani 052d063
ah one of the tests uses this
PankajBhojwani 8cc82de
generated
PankajBhojwani 642d0ab
inbox makes more sense
PankajBhojwani 66fe08f
default ids
PankajBhojwani 2bb1b6c
conflict
PankajBhojwani be193b2
merge origin
PankajBhojwani db528c9
generate IDs for user commands
PankajBhojwani 7c907fe
nits
PankajBhojwani b43191d
spacing
PankajBhojwani 2093660
line
PankajBhojwani 6c32539
string of numbers is unsightly but it works
PankajBhojwani eccd87f
update comment
PankajBhojwani 44510dc
move id generation to fixupusersettings
PankajBhojwani 10d1fc8
this way is better
PankajBhojwani 71bf90f
even better, also get the ID from json
PankajBhojwani d57c7a1
move this
PankajBhojwani 5c2307c
fix test
PankajBhojwani 9fc6972
add tests
PankajBhojwani dca7df5
excess line
PankajBhojwani dd25ed7
change tests
PankajBhojwani 6e293a5
Everytime
PankajBhojwani af2d22f
defaults conflict
PankajBhojwani bdf42c2
first round of nits
PankajBhojwani 12f3aa9
truncate and hex, debug assert
PankajBhojwani aa49212
null check
PankajBhojwani 5ee630e
fmt is smart
PankajBhojwani 360b92e
fmt_compile, fix test
PankajBhojwani 5e70911
remove 0
PankajBhojwani ca3eb87
rename and comment
PankajBhojwani 85933e2
midpoint
PankajBhojwani c134402
about to test stage 1
PankajBhojwani 22ab936
works??
PankajBhojwani 0a3e17e
edge cases
PankajBhojwani e28d478
some todos for later
PankajBhojwani f425746
remove keysmap
PankajBhojwani d0938e2
ugly way to make sure we fixup
PankajBhojwani 12a61c5
shows up in sui and all keybindings work
PankajBhojwani f1633e0
overwritten IDs and overwritten keychords show up properly in the SUI
PankajBhojwani ddfac90
Merge branch 'main' of https://github.com/microsoft/terminal into dev…
PankajBhojwani 3e7ab38
sui works?
PankajBhojwani ae16a5e
started stage 3
PankajBhojwani dc874c3
rename to special/standard
PankajBhojwani 936afd6
_getactionbyid no longer returns optional
PankajBhojwani b3e9c26
remove check for invalid
PankajBhojwani 5a1b822
reimplement populating all known keybindings
PankajBhojwani c51558f
unmark these
PankajBhojwani 754bf04
mark gh todo
PankajBhojwani 2f1d8d2
update defaults
PankajBhojwani 2b4aeb2
don't check for special in standard
PankajBhojwani e62dfa2
some comments
PankajBhojwani e725f1e
resolve conflict
PankajBhojwani db00b90
spelling things
PankajBhojwani 3d92f27
format
PankajBhojwani 428821b
remove _idwasgenerated
PankajBhojwani 6437b9f
fix user defaults file
PankajBhojwani 4c744e6
misc
PankajBhojwani ca4015f
only one tojson
PankajBhojwani 45cfcd6
just add duplicate pane auto to defaults
PankajBhojwani 3c6015d
remove _getcumulativeactions
PankajBhojwani c2c75c8
bandaid temporary fix for name
PankajBhojwani 3e601f5
better if
PankajBhojwani cdb907d
mark todo
PankajBhojwani f35bf20
Merge branch 'main' of https://github.com/microsoft/terminal into dev…
PankajBhojwani 2b16acd
check for name, fix some tests
PankajBhojwani 193e573
fix remaining tests
PankajBhojwani 0480d65
this is better
PankajBhojwani 02a1e37
correct GH todo
PankajBhojwani 80fc299
some new tests
PankajBhojwani ebc03e9
another test
PankajBhojwani ccf1cc9
nits
PankajBhojwani 7793c5c
schema
PankajBhojwani abef25d
move this to header
PankajBhojwani 4d35c14
schema conflict
PankajBhojwani 3e31bda
generate here instead
PankajBhojwani 14d83b5
delete user actions that are identical to inbox actions
PankajBhojwani 5e48a45
update add action
PankajBhojwani ba375ec
remove keys from command
PankajBhojwani 7d00b25
spelling
PankajBhojwani d4d216c
don't need helper anymore
PankajBhojwani 6c6dd46
leonard comments
PankajBhojwani b88a8c5
eraseif
PankajBhojwani 9703815
nits n fixes
PankajBhojwani a80316d
1 more test
PankajBhojwani 625753c
x86 hash
PankajBhojwani 406312f
fix loops
PankajBhojwani 253dedf
conflict
PankajBhojwani 5a00d5f
nits and changes
PankajBhojwani 96d8d1f
Merge branch 'main' of https://github.com/microsoft/terminal into dev…
PankajBhojwani 327858b
Merge branch 'dev/pabhoj/action_refactor' into dev/pabhoj/command_keys
PankajBhojwani 258c6eb
O(1), rename maps for clarity
PankajBhojwani 6ea25e4
ID
PankajBhojwani 589a1e0
IDTo
PankajBhojwani cc837b6
fix test
PankajBhojwani File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ hyperlink | |
hyperlinking | ||
hyperlinks | ||
iconify | ||
ID | ||
img | ||
inlined | ||
issuetitle | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -508,7 +508,7 @@ namespace winrt::TerminalApp::implementation | |
automationPeer.RaiseNotificationEvent( | ||
Automation::Peers::AutomationNotificationKind::ItemAdded, | ||
Automation::Peers::AutomationNotificationProcessing::MostRecent, | ||
paletteItem.Name() + L" " + paletteItem.KeyChordText(), | ||
paletteItem.Name(), | ||
PankajBhojwani marked this conversation as resolved.
Show resolved
Hide resolved
|
||
L"SuggestionsControlSelectedItemChanged" /* unique name for this notification category */); | ||
} | ||
} | ||
|
@@ -751,17 +751,13 @@ namespace winrt::TerminalApp::implementation | |
return _filteredActions; | ||
} | ||
|
||
void SuggestionsControl::SetActionMap(const Microsoft::Terminal::Settings::Model::IActionMapView& actionMap) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was never being called anywhere |
||
{ | ||
_actionMap = actionMap; | ||
} | ||
|
||
void SuggestionsControl::SetCommands(const Collections::IVector<Command>& actions) | ||
{ | ||
_allCommands.Clear(); | ||
for (const auto& action : actions) | ||
{ | ||
auto actionPaletteItem{ winrt::make<winrt::TerminalApp::implementation::ActionPaletteItem>(action) }; | ||
// key chords aren't relevant in the suggestions control, so make the palette item with just the command and no keys | ||
auto actionPaletteItem{ winrt::make<winrt::TerminalApp::implementation::ActionPaletteItem>(action, winrt::hstring{}) }; | ||
auto filteredCommand{ winrt::make<FilteredCommand>(actionPaletteItem) }; | ||
_allCommands.Append(filteredCommand); | ||
} | ||
|
@@ -915,7 +911,7 @@ namespace winrt::TerminalApp::implementation | |
for (const auto& nameAndCommand : parentCommand.NestedCommands()) | ||
{ | ||
const auto action = nameAndCommand.Value(); | ||
auto nestedActionPaletteItem{ winrt::make<winrt::TerminalApp::implementation::ActionPaletteItem>(action) }; | ||
auto nestedActionPaletteItem{ winrt::make<winrt::TerminalApp::implementation::ActionPaletteItem>(action, winrt::hstring{}) }; | ||
auto nestedFilteredCommand{ winrt::make<FilteredCommand>(nestedActionPaletteItem) }; | ||
_currentNestedCommands.Append(nestedFilteredCommand); | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
SetCommands
was only ever being called in conjunction withSetActionMap
, so I figured it'd make more sense for this to just be a private helper thatSetActionMap
calls