Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIntroduce KeyMapping and Move TerminalSettings construction #7537
Conversation
|
As far as I can see this looks pretty good, but I'd like to get other eyes on it too bc there's a lot here |
added 2 commits
Sep 9, 2020
|
I love love love this. Just some fit and finish stuff. |
| @@ -1030,8 +1030,7 @@ namespace winrt::TerminalApp::implementation | |||
| const auto& profileGuid = focusedTab->GetFocusedProfile(); | |||
| if (profileGuid.has_value()) | |||
| { | |||
| const auto settingsImpl{ winrt::get_self<implementation::CascadiaSettings>(_settings) }; | |||
| const auto settings = settingsImpl->BuildSettings(profileGuid.value()); | |||
| const auto settings{ winrt::make<TerminalSettings>(_settings, profileGuid.value(), *_bindings) }; | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
carlos-zamora
Sep 14, 2020
Author
Member
| Function | Params |
|---|---|
Constructor |
CascadiaSettings, guid, IKeyBindings |
BuildSettings |
CascadiaSettings, NewTerminalArgs, IKeyBindings |
Before, they were both BuildSettings. But the second BuildSettings needs to return a tuple so we can't just make that another constructor :(
added 2 commits
Sep 14, 2020
…osoft/Terminal into dev/cazamor/set/key-mapping
|
Hello @DHowett! 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 (
|
abf8805
into
master
8 checks passed
8 checks passed
Terminal CI (Audit Mode Static Analysis Build x64)
Audit Mode Static Analysis Build x64 succeeded
Details
Terminal CI (Code Health Scripts Proper Code Formatting Check)
Code Health Scripts Proper Code Formatting Check succeeded
Details
auto-merge.config.enforce
No dynamic merge policies are applicable.
|
Handy links: |
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.
carlos-zamora commentedSep 4, 2020
•
edited by DHowett
KeyMappingwas introduced to break upAppKeyBindings.KeyMappingrecords the keybindings from the JSON and lets you query them.
AppKeyBindingsnow just holds aShortcutActionDispatcherto runactions, and a
KeyMappingto record/query your existing keybindings.This refactor allows
KeyMappingto be moved to theTerminalSettingsModel, and
ShortcutActionDispatcherandAppKeyBindingswill stay in TerminalApp.AppKeyBindingshad to be passed down to a terminal viaTerminalSettings. Since each settings object had its ownresponsibility to update/create a
TerminalSettingsobject, I moved allof that logic to
TerminalSettings. This helps with theTerminalSettingsModel refactor, and makes the construction of
TerminalSettingsa bit cleaner and more centralized.References
#885 - this is all in preparation for the TerminalSettingsModel
Validation Steps Performed