Skip to content

Commit 621e184

Browse files
committed
Tidy up some of our Velocity features (#19605)
A few features were marked "always disabled" and then enabled in dev, canary and preview. I simplified those to "always enabled" and disabled in release instead. This required changes to Generate-FeatureStaging to make it consider `WindowsInbox` a Release branding (which, honestly, it always should have been.) - Feature_DynamicSSHProfiles - Feature_ShellCompletions - Feature_SaveSnippet - Feature_QuickFix Feature_DisableWebSourceIcons was deprecated in #19143, but the XML file never got the memo. (cherry picked from commit afb4752) Service-Card-Id: PVTI_lADOAF3p4s4BBcTlzgmV4c4 Service-Version: 1.24
1 parent 0e2ef99 commit 621e184

File tree

3 files changed

+18
-45
lines changed

3 files changed

+18
-45
lines changed

src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
#include "PowershellCoreProfileGenerator.h"
1717
#include "VisualStudioGenerator.h"
1818
#include "WslDistroGenerator.h"
19-
#if TIL_FEATURE_DYNAMICSSHPROFILES_ENABLED
2019
#include "SshHostGenerator.h"
21-
#endif
2220

2321
#include "ApplicationState.h"
2422
#include "DefaultTerminal.h"
@@ -226,9 +224,10 @@ void SettingsLoader::GenerateProfiles()
226224
generateProfiles(WslDistroGenerator{});
227225
generateProfiles(AzureCloudShellGenerator{});
228226
generateProfiles(VisualStudioGenerator{});
229-
#if TIL_FEATURE_DYNAMICSSHPROFILES_ENABLED
230-
sshProfilesGenerated = generateProfiles(SshHostGenerator{});
231-
#endif
227+
if constexpr (Feature_DynamicSSHProfiles::IsEnabled())
228+
{
229+
sshProfilesGenerated = generateProfiles(SshHostGenerator{});
230+
}
232231
}
233232

234233
// Generate ExtensionPackage objects from the profile generators.
@@ -267,9 +266,10 @@ void SettingsLoader::GenerateExtensionPackagesFromProfileGenerators()
267266
generateExtensionPackages(WslDistroGenerator{});
268267
generateExtensionPackages(AzureCloudShellGenerator{});
269268
generateExtensionPackages(VisualStudioGenerator{});
270-
#if TIL_FEATURE_DYNAMICSSHPROFILES_ENABLED
271-
generateExtensionPackages(SshHostGenerator{});
272-
#endif
269+
if constexpr (Feature_DynamicSSHProfiles::IsEnabled())
270+
{
271+
generateExtensionPackages(SshHostGenerator{});
272+
}
273273
}
274274

275275
// A new settings.json gets a special treatment:

src/features.xml

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,16 @@
106106
<name>Feature_DynamicSSHProfiles</name>
107107
<description>Enables the dynamic profile generator for OpenSSH config files</description>
108108
<id>9031</id>
109-
<stage>AlwaysDisabled</stage>
110-
<alwaysEnabledBrandingTokens>
111-
<brandingToken>Dev</brandingToken>
112-
<brandingToken>Canary</brandingToken>
113-
<brandingToken>Preview</brandingToken>
114-
</alwaysEnabledBrandingTokens>
109+
<stage>AlwaysEnabled</stage>
110+
<alwaysDisabledReleaseTokens/>
115111
</feature>
116112

117113
<feature>
118114
<name>Feature_ShellCompletions</name>
119115
<description>An experimental escape sequence for client applications to request the Terminal display a list of suggestions.</description>
120116
<id>3121</id>
121-
<stage>AlwaysDisabled</stage>
122-
<alwaysEnabledBrandingTokens>
123-
<brandingToken>Dev</brandingToken>
124-
<brandingToken>Canary</brandingToken>
125-
<brandingToken>Preview</brandingToken>
126-
</alwaysEnabledBrandingTokens>
117+
<stage>AlwaysEnabled</stage>
118+
<alwaysDisabledReleaseTokens/>
127119
</feature>
128120

129121
<feature>
@@ -176,24 +168,16 @@
176168
<name>Feature_SaveSnippet</name>
177169
<description>Save Snippet</description>
178170
<id>9971</id>
179-
<stage>AlwaysDisabled</stage>
180-
<alwaysEnabledBrandingTokens>
181-
<brandingToken>Dev</brandingToken>
182-
<brandingToken>Canary</brandingToken>
183-
<brandingToken>Preview</brandingToken>
184-
</alwaysEnabledBrandingTokens>
171+
<stage>AlwaysEnabled</stage>
172+
<alwaysDisabledReleaseTokens/>
185173
</feature>
186174

187175
<feature>
188176
<name>Feature_QuickFix</name>
189177
<description>Enables the Quick Fix menu</description>
190178
<id>16599</id>
191-
<stage>AlwaysDisabled</stage>
192-
<alwaysEnabledBrandingTokens>
193-
<brandingToken>Dev</brandingToken>
194-
<brandingToken>Canary</brandingToken>
195-
<brandingToken>Preview</brandingToken>
196-
</alwaysEnabledBrandingTokens>
179+
<stage>AlwaysEnabled</stage>
180+
<alwaysDisabledReleaseTokens/>
197181
</feature>
198182

199183
<feature>
@@ -203,15 +187,4 @@
203187
<alwaysDisabledReleaseTokens/>
204188
</feature>
205189

206-
<feature>
207-
<name>Feature_DisableWebSourceIcons</name>
208-
<description>Disables icon paths that make web requests</description>
209-
<id>19075</id>
210-
<stage>AlwaysDisabled</stage>
211-
<alwaysEnabledBrandingTokens>
212-
<brandingToken>Dev</brandingToken>
213-
<brandingToken>Canary</brandingToken>
214-
</alwaysEnabledBrandingTokens>
215-
</feature>
216-
217190
</featureStaging>

tools/Generate-FeatureStagingHeader.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ Function Resolve-FinalFeatureStage {
8989
[string]$Branding
9090
)
9191

92-
# RELEASE=DISABLED wins all checks
92+
# RELEASE=DISABLED wins all checks (WindowsInbox counts as a type of Release)
9393
# Then, branch match by most-specific branch
9494
# Then, branding type (if no overriding branch match)
9595

96-
If ($Branding -Eq "Release" -And $Feature.DisabledReleaseToken) {
96+
If ($Branding -In @("Release", "WindowsInbox") -And $Feature.DisabledReleaseToken) {
9797
[Stage]::AlwaysDisabled
9898
Return
9999
}

0 commit comments

Comments
 (0)