From 150ffe60131b4f74a05a64a8f69eb65ef0ca3201 Mon Sep 17 00:00:00 2001 From: Enrico Giordani Date: Wed, 21 Apr 2021 03:16:01 -0700 Subject: [PATCH 1/6] [File Explorer Add-ons] remove old settings support (#10857) --- src/common/utils/os-detect.h | 7 ------- .../previewpane/powerpreview/powerpreview.cpp | 18 +++++------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/common/utils/os-detect.h b/src/common/utils/os-detect.h index 888c5a37ac..57c68e1b76 100644 --- a/src/common/utils/os-detect.h +++ b/src/common/utils/os-detect.h @@ -22,10 +22,3 @@ inline bool Is19H1OrHigher() { return IsAPIContractV8Available(); } - -// This function returns true if the build is 19h1 or higher, so that we deploy the new settings. -// It returns false otherwise. -inline bool UseNewSettings() -{ - return Is19H1OrHigher(); -} diff --git a/src/modules/previewpane/powerpreview/powerpreview.cpp b/src/modules/previewpane/powerpreview/powerpreview.cpp index 27d13d2463..447e59a7e2 100644 --- a/src/modules/previewpane/powerpreview/powerpreview.cpp +++ b/src/modules/previewpane/powerpreview/powerpreview.cpp @@ -44,11 +44,9 @@ PowerPreviewModule::PowerPreviewModule() : std::make_unique(), L".svg\\shellex\\{E357FCCD-A995-4576-B01F-234630154E96}")); - // If the user is on the new settings interface, File Explorer might be disabled if they updated from old to new settings, so initialize the registry state in the constructor as PowerPreviewModule::enable/disable will not be called on startup - if (UseNewSettings()) - { - update_registry_to_match_toggles(); - } + // File Explorer might be disabled if user updated from old to new settings. + // Initialize the registry state in the constructor as PowerPreviewModule::enable/disable will not be called on startup + update_registry_to_match_toggles(); } // Destroy the powertoy and free memory. @@ -111,8 +109,8 @@ void PowerPreviewModule::set_config(const wchar_t* config) bool isElevated = is_process_elevated(false); for (auto& fileExplorerModule : m_fileExplorerModules) { - // If the user is using the new settings interface, as it does not have a toggle to modify enabled consider File Explorer to always be enabled - updateSuccess = updateSuccess && fileExplorerModule->UpdateState(settings, this->m_enabled || UseNewSettings(), isElevated); + // The new settings interface does not have a toggle to modify enabled, consider File Explorer to always be enabled + updateSuccess = updateSuccess && fileExplorerModule->UpdateState(settings, true, isElevated); } if (!updateSuccess) @@ -131,12 +129,6 @@ void PowerPreviewModule::set_config(const wchar_t* config) // Enable preview handlers. void PowerPreviewModule::enable() { - // Should only be done for old settings as it is already done for new settings in the constructor. - if (!UseNewSettings()) - { - update_registry_to_match_toggles(); - } - if (!this->m_enabled) { Trace::EnabledPowerPreview(true); From 94c2115bf460901058356d82f75fd8d9bc6b3daf Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 21 Apr 2021 17:18:05 -0700 Subject: [PATCH 2/6] Create feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000000..71d5dfe03d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,15 @@ +name: "⭐ Feature / enhancement request" +description: Report issues in our documentation +labels: +- Issue-Docs +- Triage-Needed +body: +- type: textarea + attributes: + label: Provide a description of the new feature / enhancement + placeholder: | + What is the expected behavior of the proposed feature? + What is the scenario this would be used? + Please limit one per issue. + validations: + required: true From 75d8443e3e052ef33b67ba78bbf87759bf8467fc Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 21 Apr 2021 17:18:44 -0700 Subject: [PATCH 3/6] Update feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 71d5dfe03d..663779a578 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,7 +1,6 @@ name: "⭐ Feature / enhancement request" -description: Report issues in our documentation +description: Propose something new. labels: -- Issue-Docs - Triage-Needed body: - type: textarea From 61739453c244fb70b202f197268bb5f1bbf4edfc Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 21 Apr 2021 17:19:40 -0700 Subject: [PATCH 4/6] Update feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 663779a578..72cdfecc65 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -12,3 +12,7 @@ body: Please limit one per issue. validations: required: true +- type: markdown + attributes: + value: | + If you'd like to see this feature implemented, add a 👍 reaction to this post. From f561b25d9dd08f9cc8668b80d2d824813aeadcaa Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 21 Apr 2021 17:20:06 -0700 Subject: [PATCH 5/6] Delete feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 86ff5e6f65..0000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: "⭐ Feature request" -about: Propose something new. -title: '' -labels: Triage-Needed -assignees: '' - ---- - -## 📝 Provide a description of the new feature - -_What is the expected behavior of the proposed feature? What is the scenario this would be used?_ - ---- - -If you'd like to see this feature implemented, add a 👍 reaction to this post. From 3f3494a3c3e4ad42bd4f9d85f4b5ed77212139ff Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Wed, 21 Apr 2021 17:21:13 -0700 Subject: [PATCH 6/6] Update feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 72cdfecc65..b73afaf09f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -9,10 +9,9 @@ body: placeholder: | What is the expected behavior of the proposed feature? What is the scenario this would be used? - Please limit one per issue. validations: required: true - type: markdown attributes: value: | - If you'd like to see this feature implemented, add a 👍 reaction to this post. + Please limit one request per issue.