Skip to content

Commit e494ba3

Browse files
authored
Merge pull request #9401 from NuGet/dev
2 parents 64e797c + 9e2d728 commit e494ba3

File tree

19 files changed

+83
-44
lines changed

19 files changed

+83
-44
lines changed

src/AccountDeleter/EmptyFeatureFlagService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,11 @@ public bool IsDisplayUploadWarningV2Enabled(User user)
301301
throw new NotImplementedException();
302302
}
303303

304+
public bool IsDisplayPackageReadmeWarningEnabled(User user)
305+
{
306+
throw new NotImplementedException();
307+
}
308+
304309
public bool IsFrameworkFilteringEnabled(User user) {
305310
throw new NotImplementedException();
306311
}

src/Bootstrap/dist/css/bootstrap-theme.css

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Bootstrap/less/theme/common-readme.less

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
.readme-container {
33
display: block;
44
padding: 10.5px;
5-
background-color: @pre-bg;
6-
border: 1px solid #ccc;
5+
border: 2px solid #ccc;
76
word-break: normal;
87
margin-bottom: @default-margin-bottom;
98
overflow: auto;
@@ -44,7 +43,7 @@
4443

4544
pre {
4645
code.hljs {
47-
background-color: #f6f8fa;
46+
background-color: @pre-bg;
4847
color: #24292e;
4948

5049
.hljs-doctag,
@@ -92,7 +91,7 @@
9291
.hljs-comment,
9392
.hljs-code,
9493
.hljs-formula {
95-
color: #6a737d;
94+
color: #646d76;
9695
}
9796

9897
.hljs-name,

src/Bootstrap/less/theme/page-display-package.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@
423423
margin-bottom: -1px;
424424
}
425425

426+
.nav-tabs > li.active > a.body-warning-tab > {
427+
background-color: #fff4ce;
428+
}
429+
426430
.nav-tabs > li > a {
427431
border-left: 0px;
428432
border-right: 0px;

src/Bootstrap/less/theme/page-list-packages.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
}
122122

123123
.tfmTab {
124+
display: none;
124125
max-height: 0;
125126
overflow: hidden;
126127
transition: max-height 0.1s ease-out;

src/GitHubVulnerabilities2Db/Fakes/FakeFeatureFlagService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ public bool IsDisplayUploadWarningV2Enabled(User user)
135135
throw new NotImplementedException();
136136
}
137137

138+
public bool IsDisplayPackageReadmeWarningEnabled(User user)
139+
{
140+
throw new NotImplementedException();
141+
}
142+
138143
public bool IsODataDatabaseReadOnlyEnabled()
139144
{
140145
throw new NotImplementedException();

src/NuGetGallery.Services/Configuration/FeatureFlagService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class FeatureFlagService : IFeatureFlagService
4848
private const string MarkdigMdRenderingFlightName = GalleryPrefix + "MarkdigMdRendering";
4949
private const string MarkdigMdSyntaxHighlightFlightName = GalleryPrefix + "MarkdigMdSyntaxHighlight";
5050
private const string DisplayUploadWarningV2FlightName = GalleryPrefix + "DisplayUploadWarningV2";
51+
private const string DisplayPackageReadmeWarningFlightName = GalleryPrefix + "DisplayPackageReadmeWarning";
5152
private const string DeletePackageApiFlightName = GalleryPrefix + "DeletePackageApi";
5253
private const string ImageAllowlistFlightName = GalleryPrefix + "ImageAllowlist";
5354
private const string DisplayBannerFlightName = GalleryPrefix + "Banner";
@@ -354,6 +355,11 @@ public bool IsDisplayUploadWarningV2Enabled(User user)
354355
return _client.IsEnabled(DisplayUploadWarningV2FlightName, user, defaultValue: false);
355356
}
356357

358+
public bool IsDisplayPackageReadmeWarningEnabled(User user)
359+
{
360+
return _client.IsEnabled(DisplayPackageReadmeWarningFlightName, user, defaultValue: false);
361+
}
362+
357363
public bool IsDeletePackageApiEnabled(User user)
358364
{
359365
return _client.IsEnabled(DeletePackageApiFlightName, user, defaultValue: false);

src/NuGetGallery.Services/Configuration/IFeatureFlagService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ public interface IFeatureFlagService
278278
/// </summary>
279279
bool IsDisplayUploadWarningV2Enabled(User user);
280280

281+
/// <summary>
282+
/// Whether the new warning of the missing readme is displayed to package authors
283+
/// </summary>
284+
bool IsDisplayPackageReadmeWarningEnabled(User user);
285+
281286
/// <summary>
282287
/// Whether or not the user can delete a package through the API.
283288
/// </summary>

src/NuGetGallery/App_Data/Files/Content/Trusted-Image-Domains.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"badges.gitter.im",
1616
"bettercodehub.com",
1717
"buildstats.info",
18+
"caniuse.bitsofco.de",
1819
"cdn.jsdelivr.net",
1920
"cdn.syncfusion.com",
2021
"ci.appveyor.com",

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@
120120
"SiteAdmins": false,
121121
"Accounts": [],
122122
"Domains": []
123+
},
124+
"NuGetGallery.DisplayPackageReadmeWarning": {
125+
"All": true,
126+
"SiteAdmins": false,
127+
"Accounts": [],
128+
"Domains": []
123129
}
124130
}
125131
}

0 commit comments

Comments
 (0)