Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added links to best practices page on package upload page #8542

Merged
merged 3 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions src/NuGetGallery/Views/Packages/UploadPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
@ViewHelpers.AjaxAntiForgeryToken(Html)
@ViewHelpers.PackagesBreadcrumb(Url, CurrentUser, true, @<text>Upload</text>)
<div class="text-left">
<p class="message">Your package file will be uploaded and hosted on the @(Config.Current.Brand) server (@(Config.Current.SiteRoot)).</p>
<p class="message">Your package file will be uploaded and on the @(Config.Current.Brand) server (@(Config.Current.SiteRoot)).</p>
sophiamfavro marked this conversation as resolved.
Show resolved Hide resolved
<p class="message">
To learn more about authoring great packages, view our
<a href="https://docs.microsoft.com/nuget/create-packages/package-authoring-best-practices" alt="Best Practices" aria-label="Read here about publishing packages">Best Practices</a> page.
</p>
</div>
<div id="upload-package-container">
<h2>
Expand Down Expand Up @@ -52,18 +56,18 @@
</div>
</div>
</div>

@if (Model != null && Model.IsUploadInProgress)
@* @if (Model != null && Model.IsUploadInProgress)*@
@if (true)
sophiamfavro marked this conversation as resolved.
Show resolved Hide resolved
{
<div id="warning-container">
@ViewHelpers.AlertInfo(@<text>You had an upload in progress. You can continue it here or cancel to restart.</text>)
</div>
<div id="warning-container">
@ViewHelpers.AlertInfo(@<text>You had an upload in progress. You can continue it here or cancel to restart.</text>)
</div>
Copy link
Contributor

@loic-sharma loic-sharma Apr 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Visual Studio messed with the whitespace here (it tries to auto format Razor code valiantly but the feature is low key busted). We can fix that tomorrow :)

}

<div id="symbols-replace-warning-container" class="hidden">
@ViewHelpers.AlertWarning(@<text>There is an existing symbols package (.snupkg) for the below package ID and version.
Submitting this request will replace the previously uploaded symbols package as well as the corresponding symbol files from the symbol server.</text>)
</div>
<div id="symbols-replace-warning-container" class="hidden">
@ViewHelpers.AlertWarning(@<text>There is an existing symbols package (.snupkg) for the below package ID and version.
Submitting this request will replace the previously uploaded symbols package as well as the corresponding symbol files from the symbol server.</text>)
</div>

@Html.Partial("_VerifyForm")
</div>
Expand Down
34 changes: 17 additions & 17 deletions src/NuGetGallery/Views/Packages/_VerifyMetadata.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@
<!-- ko if: $data.Warnings && $data.Warnings.length > 0 -->
@ViewHelpers.AlertWarning(
@<span>
We found the following issue(s):
<ul data-bind="foreach: $data.Warnings">
<!-- ko if: typeof($data) === "string" -->
<li><span data-bind="text: $data"></span></li>
<!-- /ko -->
<!-- ko if: typeof($data) === "object" -->
<!-- ko if: $data.PlainTextMessage -->
<li><span data-bind="text: $data.PlainTextMessage"></span></li>
<!-- /ko -->
<!-- ko ifnot: $data.PlainTextMessage -->
<li><span data-bind="html: $data.RawHtmlMessage"></span></li>
<!-- /ko -->
<!-- /ko -->
</ul>
We recommend that you fix these issues and upload a new package.
<a href="https://docs.microsoft.com/en-us/nuget/policies/nuget-faq#managing-packages-on-nugetorg" alt="Read more" aria-label="Read more about managing packages on nuget.org">Read more</a><br />
</span>)
We found the following issue(s):
<ul data-bind="foreach: $data.Warnings">
<!-- ko if: typeof($data) === "string" -->
<li><span data-bind="text: $data"></span></li>
<!-- /ko -->
<!-- ko if: typeof($data) === "object" -->
<!-- ko if: $data.PlainTextMessage -->
<li><span data-bind="text: $data.PlainTextMessage"></span></li>
<!-- /ko -->
<!-- ko ifnot: $data.PlainTextMessage -->
<li><span data-bind="html: $data.RawHtmlMessage"></span></li>
<!-- /ko -->
<!-- /ko -->
</ul>
We recommend that you fix these issues and upload a new package. To learn more about authoring great packages, view our
<a href="https://docs.microsoft.com/nuget/create-packages/package-authoring-best-practices" alt="Best Practices" aria-label="Read here about managing packages on nuget.org">Best Practices</a> page.<br />
</span>)
<!-- /ko -->

<div class="verify-package-field">
Expand Down
4 changes: 2 additions & 2 deletions src/NuGetGallery/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
-->
<system.web>
<httpCookies requireSSL="true" httpOnlyCookies="true"/>
<compilation debug="false" targetFramework="4.7.2">
<compilation debug="true" targetFramework="4.7.2">
sophiamfavro marked this conversation as resolved.
Show resolved Hide resolved
<assemblies>
<add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"/>
</assemblies>
Expand Down Expand Up @@ -667,4 +667,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
</configuration>