From 8b8ad7502400b45889e6f7f8e3e8b73064d32468 Mon Sep 17 00:00:00 2001 From: PankajBhojwani Date: Wed, 20 Oct 2021 11:12:17 -0700 Subject: [PATCH 01/16] Update version to 1.13 on main (#11550) --- custom.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom.props b/custom.props index 95b29b746ab..23f7ff5aa82 100644 --- a/custom.props +++ b/custom.props @@ -5,7 +5,7 @@ true 2021 1 - 12 + 13 Windows Terminal From 5cd966326913298f9d5570717a94972728f63065 Mon Sep 17 00:00:00 2001 From: Leonard Hecker Date: Wed, 20 Oct 2021 21:57:55 +0200 Subject: [PATCH 02/16] Fixed VsDevCmd command line quoting (#11554) --- src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp b/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp index 39ee490ce77..e00f9f3841f 100644 --- a/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp +++ b/src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp @@ -40,7 +40,7 @@ std::wstring VsDevCmdGenerator::GetProfileCommandLine(const VsSetupConfiguration { std::wstring commandLine; commandLine.reserve(256); - commandLine.append(LR"("cmd.exe /k ")"); + commandLine.append(LR"(cmd.exe /k ")"); commandLine.append(GetDevCmdScriptPath(instance)); #if defined(_M_ARM64) commandLine.append(LR"(" -arch=arm64 -host_arch=x64)"); From 670ae2bd1c78fd2cc5b8e88f426eacab71fe1bfb Mon Sep 17 00:00:00 2001 From: Mahdi Hosseini Date: Fri, 22 Oct 2021 00:35:12 +0330 Subject: [PATCH 03/16] Link 1.12 blog and milestones on roadmap (#11562) --- doc/terminal-v2-roadmap.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/terminal-v2-roadmap.md b/doc/terminal-v2-roadmap.md index 8f4cab23573..34fe686ee2e 100644 --- a/doc/terminal-v2-roadmap.md +++ b/doc/terminal-v2-roadmap.md @@ -31,7 +31,7 @@ Below is the schedule for when milestones will be included in release builds of | 2021-05-31 | [1.9] in Windows Terminal Preview
[1.8] in Windows Terminal | [Windows Terminal Preview 1.9 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-9-release/) | | 2021-07-14 | [1.10] in Windows Terminal Preview
[1.9] in Windows Terminal | [Windows Terminal Preview 1.10 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-10-release/) | | 2021-08-31 | [1.11] in Windows Terminal Preview
[1.10] in Windows Terminal | [Windows Terminal Preview 1.11 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-11-release/) | -| 2021-10-31 | 1.12 in Windows Terminal Preview
1.11 in Windows Terminal | | +| 2021-10-20 | [1.12] in Windows Terminal Preview
[1.11] in Windows Terminal | [Windows Terminal Preview 1.12 Release](https://devblogs.microsoft.com/commandline/windows-terminal-preview-1-12-release/) | | 2021-11-30 | 2.0 RC in Windows Terminal Preview
2.0 RC in Windows Terminal | | | 2021-12-31 | [2.0] in Windows Terminal Preview
[2.0] in Windows Terminal | | @@ -91,6 +91,8 @@ Feature Notes: [1.9]: https://github.com/microsoft/terminal/milestone/34 [1.10]: https://github.com/microsoft/terminal/milestone/35 [1.11]: https://github.com/microsoft/terminal/milestone/36 +[1.12]: https://github.com/microsoft/terminal/milestone/38 +[1.13]: https://github.com/microsoft/terminal/milestone/39 [2.0]: https://github.com/microsoft/terminal/milestone/22 [#1564]: https://github.com/microsoft/terminal/issues/1564 [#6720]: https://github.com/microsoft/terminal/pull/6720 From a2f26850c6c5a1dcc3d66e08bb64e44909a4afff Mon Sep 17 00:00:00 2001 From: Blake Heimann <43186444+BlakeHeimann@users.noreply.github.com> Date: Mon, 25 Oct 2021 06:16:30 -0500 Subject: [PATCH 04/16] Fixed grammatical error (#11604) Found a small grammatical error in the documentation of this particular file. --- doc/EXCEPTIONS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/EXCEPTIONS.md b/doc/EXCEPTIONS.md index 48a6017ede2..d6e90988f3a 100644 --- a/doc/EXCEPTIONS.md +++ b/doc/EXCEPTIONS.md @@ -4,7 +4,7 @@ Introducing exceptions to an existing non-exception-based codebase can be perilous. The console was originally written in C at a time when C++ was relatively unused in the Windows operating system. As part of our project to modernize the Windows console, we converted to use C++, but still had an aversion to using exception-based error handling in -our code for fear that it introduce unexpected failures. However, the STL and other libraries like it are so useful that +our code for fear that it might introduce unexpected failures. However, the STL and other libraries like it are so useful that sometimes it's significantly simpler to use them. Given that, we have a set of rules that we follow when considering exception use. From e10e1d8ef1c0c6c7f67f00aabb71babaca9b972f Mon Sep 17 00:00:00 2001 From: Carlos Zamora Date: Mon, 25 Oct 2021 04:16:49 -0700 Subject: [PATCH 05/16] Remove feature flag code for editable actions page (#11576) ## Summary of the Pull Request Removes the feature flag code for the editable actions page. Pretty straightforward. ## PR Checklist Closes #11482 --- .../TerminalSettingsEditor/MainPage.cpp | 17 +- ...Microsoft.Terminal.Settings.Editor.vcxproj | 13 - ...t.Terminal.Settings.Editor.vcxproj.filters | 1 - .../ReadOnlyActions.cpp | 64 ----- .../TerminalSettingsEditor/ReadOnlyActions.h | 57 ----- .../ReadOnlyActions.idl | 23 -- .../ReadOnlyActions.xaml | 222 ------------------ src/features.xml | 6 - 8 files changed, 1 insertion(+), 402 deletions(-) delete mode 100644 src/cascadia/TerminalSettingsEditor/ReadOnlyActions.cpp delete mode 100644 src/cascadia/TerminalSettingsEditor/ReadOnlyActions.h delete mode 100644 src/cascadia/TerminalSettingsEditor/ReadOnlyActions.idl delete mode 100644 src/cascadia/TerminalSettingsEditor/ReadOnlyActions.xaml diff --git a/src/cascadia/TerminalSettingsEditor/MainPage.cpp b/src/cascadia/TerminalSettingsEditor/MainPage.cpp index 414bd4f0d2a..e7b13ce5316 100644 --- a/src/cascadia/TerminalSettingsEditor/MainPage.cpp +++ b/src/cascadia/TerminalSettingsEditor/MainPage.cpp @@ -8,7 +8,6 @@ #include "Interaction.h" #include "Rendering.h" #include "Actions.h" -#include "ReadOnlyActions.h" #include "Profiles.h" #include "GlobalAppearance.h" #include "ColorSchemes.h" @@ -293,21 +292,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation } else if (clickedItemTag == actionsTag) { - if constexpr (Feature_EditableActionsPage::IsEnabled()) - { - contentFrame().Navigate(xaml_typename(), winrt::make(_settingsClone)); - } - else - { - auto actionsState{ winrt::make(_settingsClone) }; - actionsState.OpenJson([weakThis = get_weak()](auto&&, auto&& arg) { - if (auto self{ weakThis.get() }) - { - self->_OpenJsonHandlers(nullptr, arg); - } - }); - contentFrame().Navigate(xaml_typename(), actionsState); - } + contentFrame().Navigate(xaml_typename(), winrt::make(_settingsClone)); } else if (clickedItemTag == globalProfileTag) { diff --git a/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj b/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj index e4335126c48..36caf5524e3 100644 --- a/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj +++ b/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj @@ -77,9 +77,6 @@ Appearances.xaml Code - - ReadOnlyActions.xaml - Rendering.xaml @@ -121,9 +118,6 @@ Designer - - Designer - Designer @@ -177,9 +171,6 @@ Appearances.xaml Code - - ReadOnlyActions.xaml - Rendering.xaml @@ -223,10 +214,6 @@ Interaction.xaml Code - - ReadOnlyActions.xaml - Code - Rendering.xaml Code diff --git a/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters b/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters index 3b0b9186e6a..373fb3061a0 100644 --- a/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters +++ b/src/cascadia/TerminalSettingsEditor/Microsoft.Terminal.Settings.Editor.vcxproj.filters @@ -40,7 +40,6 @@ - \ No newline at end of file diff --git a/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.cpp b/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.cpp deleted file mode 100644 index 50403383d88..00000000000 --- a/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.cpp +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -#include "pch.h" -#include "ReadOnlyActions.h" -#include "ReadOnlyActions.g.cpp" -#include "ReadOnlyActionsPageNavigationState.g.cpp" -#include "EnumEntry.h" - -using namespace winrt::Windows::Foundation; -using namespace winrt::Windows::System; -using namespace winrt::Windows::UI::Core; -using namespace winrt::Windows::UI::Xaml::Navigation; -using namespace winrt::Microsoft::Terminal::Settings::Model; - -namespace winrt::Microsoft::Terminal::Settings::Editor::implementation -{ - ReadOnlyActions::ReadOnlyActions() - { - InitializeComponent(); - - _filteredActions = winrt::single_threaded_observable_vector(); - } - - void ReadOnlyActions::OnNavigatedTo(const NavigationEventArgs& e) - { - _State = e.Parameter().as(); - - std::vector keyBindingList; - for (const auto& [_, command] : _State.Settings().GlobalSettings().ActionMap().NameMap()) - { - // Filter out nested commands, and commands that aren't bound to a - // key. This page is currently just for displaying the actions that - // _are_ bound to keys. - if (command.HasNestedCommands() || !command.Keys()) - { - continue; - } - keyBindingList.push_back(command); - } - std::sort(begin(keyBindingList), end(keyBindingList), CommandComparator{}); - _filteredActions = single_threaded_observable_vector(std::move(keyBindingList)); - } - - Collections::IObservableVector ReadOnlyActions::FilteredActions() - { - return _filteredActions; - } - - void ReadOnlyActions::_OpenSettingsClick(const IInspectable& /*sender*/, - const Windows::UI::Xaml::RoutedEventArgs& /*eventArgs*/) - { - const CoreWindow window = CoreWindow::GetForCurrentThread(); - const auto rAltState = window.GetKeyState(VirtualKey::RightMenu); - const auto lAltState = window.GetKeyState(VirtualKey::LeftMenu); - const bool altPressed = WI_IsFlagSet(lAltState, CoreVirtualKeyStates::Down) || - WI_IsFlagSet(rAltState, CoreVirtualKeyStates::Down); - - const auto target = altPressed ? SettingsTarget::DefaultsFile : SettingsTarget::SettingsFile; - - _State.RequestOpenJson(target); - } - -} diff --git a/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.h b/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.h deleted file mode 100644 index 274fcb164c7..00000000000 --- a/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -#pragma once - -#include "ReadOnlyActions.g.h" -#include "ReadOnlyActionsPageNavigationState.g.h" -#include "Utils.h" - -namespace winrt::Microsoft::Terminal::Settings::Editor::implementation -{ - struct CommandComparator - { - bool operator()(const Model::Command& lhs, const Model::Command& rhs) const - { - return lhs.Name() < rhs.Name(); - } - }; - - struct ReadOnlyActionsPageNavigationState : ReadOnlyActionsPageNavigationStateT - { - public: - ReadOnlyActionsPageNavigationState(const Model::CascadiaSettings& settings) : - _Settings{ settings } {} - - void RequestOpenJson(const Model::SettingsTarget target) - { - _OpenJsonHandlers(nullptr, target); - } - - WINRT_PROPERTY(Model::CascadiaSettings, Settings, nullptr) - TYPED_EVENT(OpenJson, Windows::Foundation::IInspectable, Model::SettingsTarget); - }; - - struct ReadOnlyActions : public HasScrollViewer, ReadOnlyActionsT - { - public: - ReadOnlyActions(); - - void OnNavigatedTo(const winrt::Windows::UI::Xaml::Navigation::NavigationEventArgs& e); - - Windows::Foundation::Collections::IObservableVector FilteredActions(); - - WINRT_PROPERTY(Editor::ReadOnlyActionsPageNavigationState, State, nullptr); - - private: - friend struct ReadOnlyActionsT; // for Xaml to bind events - Windows::Foundation::Collections::IObservableVector _filteredActions{ nullptr }; - - void _OpenSettingsClick(const IInspectable& sender, const Windows::UI::Xaml::RoutedEventArgs& eventArgs); - }; -} - -namespace winrt::Microsoft::Terminal::Settings::Editor::factory_implementation -{ - BASIC_FACTORY(ReadOnlyActions); -} diff --git a/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.idl b/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.idl deleted file mode 100644 index 49e01bf5769..00000000000 --- a/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.idl +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import "EnumEntry.idl"; - -namespace Microsoft.Terminal.Settings.Editor -{ - runtimeclass ReadOnlyActionsPageNavigationState - { - Microsoft.Terminal.Settings.Model.CascadiaSettings Settings; - void RequestOpenJson(Microsoft.Terminal.Settings.Model.SettingsTarget target); - event Windows.Foundation.TypedEventHandler OpenJson; - }; - - [default_interface] runtimeclass ReadOnlyActions : Windows.UI.Xaml.Controls.Page - { - ReadOnlyActions(); - ReadOnlyActionsPageNavigationState State { get; }; - - IObservableVector FilteredActions { get; }; - - } -} diff --git a/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.xaml b/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.xaml deleted file mode 100644 index c5c1844cc98..00000000000 --- a/src/cascadia/TerminalSettingsEditor/ReadOnlyActions.xaml +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -