Skip to content

Commit 0d22d92

Browse files
author
Daniel Jacinto
authored
[TFM Display] Add feature flag to display TFM. (#8867)
* Add display tfm feature flag. * nit.
1 parent 2cf96a4 commit 0d22d92

6 files changed

Lines changed: 25 additions & 1 deletion

File tree

src/AccountDeleter/EmptyFeatureFlagService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ public bool IsDisplayPackagePageV2PreviewEnabled(User user)
8181
throw new NotImplementedException();
8282
}
8383

84+
public bool IsDisplayTargetFrameworkEnabled()
85+
{
86+
throw new NotImplementedException();
87+
}
88+
8489
public bool IsDisplayVulnerabilitiesEnabled()
8590
{
8691
throw new NotImplementedException();

src/GitHubVulnerabilities2Db/Fakes/FakeFeatureFlagService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,5 +269,10 @@ public bool IsDisplayPackagePageV2PreviewEnabled(User user)
269269
{
270270
throw new NotImplementedException();
271271
}
272+
273+
public bool IsDisplayTargetFrameworkEnabled()
274+
{
275+
throw new NotImplementedException();
276+
}
272277
}
273278
}

src/NuGetGallery.Services/Configuration/FeatureFlagService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class FeatureFlagService : IFeatureFlagService
5252
private const string DisplayPackagePageV2PreviewFeatureName = GalleryPrefix + "DisplayPackagePageV2Preview";
5353
private const string DisplayPackagePageV2FeatureName = GalleryPrefix + "DisplayPackagePageV2";
5454
private const string ShowReportAbuseSafetyChanges = GalleryPrefix + "ShowReportAbuseSafetyChanges";
55+
private const string DisplayTargetFrameworkFeatureName = GalleryPrefix + "DisplayTargetFramework";
5556

5657
private const string ODataV1GetAllNonHijackedFeatureName = GalleryPrefix + "ODataV1GetAllNonHijacked";
5758
private const string ODataV1GetAllCountNonHijackedFeatureName = GalleryPrefix + "ODataV1GetAllCountNonHijacked";
@@ -356,5 +357,10 @@ public bool IsDisplayBannerEnabled()
356357
{
357358
return _client.IsEnabled(DisplayBannerFlightName, defaultValue: false);
358359
}
360+
361+
public bool IsDisplayTargetFrameworkEnabled()
362+
{
363+
return _client.IsEnabled(DisplayTargetFrameworkFeatureName, defaultValue: false);
364+
}
359365
}
360366
}

src/NuGetGallery.Services/Configuration/IFeatureFlagService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,5 +286,10 @@ public interface IFeatureFlagService
286286
/// Whether or not display the banner on nuget.org
287287
/// </summary>
288288
bool IsDisplayBannerEnabled();
289+
290+
/// <summary>
291+
/// Whether or not display target framework badges and table on nuget.org
292+
/// </summary>
293+
bool IsDisplayTargetFrameworkEnabled();
289294
}
290295
}

src/NuGetGallery/App_Data/Files/Content/flags.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"NuGetGallery.EmbeddedIcons": "Enabled",
3131
"NuGetGallery.MarkdigMdRendering": "Enabled",
3232
"NuGetGallery.ImageAllowlist": "Enabled",
33-
"NuGetGallery.ShowReportAbuseSafetyChanges": "Enabled"
33+
"NuGetGallery.ShowReportAbuseSafetyChanges": "Enabled",
34+
"NuGetGallery.DisplayTFM": "Enabled"
3435
},
3536
"Flights": {
3637
"NuGetGallery.TyposquattingFlight": {

src/VerifyMicrosoftPackage/Fakes/FakeFeatureFlagService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,7 @@ public bool IsDisplayPackagePageV2PreviewEnabled(User user)
119119
{
120120
throw new NotImplementedException();
121121
}
122+
123+
public bool IsDisplayTargetFrameworkEnabled() => throw new NotImplementedException();
122124
}
123125
}

0 commit comments

Comments
 (0)