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

[Rename] Display rename information on package detail page #7964

Merged
merged 8 commits into from
Apr 29, 2020
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
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
zhhyu authored and zhhyu committed Apr 25, 2020
commit b44af9bf3d56baeb255f15d4e3efb3ed3a97779f
2 changes: 1 addition & 1 deletion src/NuGetGallery/Services/IPackageRenameService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public interface IPackageRenameService
{
IReadOnlyList<PackageRename> GetPackageRenames(PackageRegistration package);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ private static PackagesController CreateController(
Mock<ILicenseExpressionSplitter> licenseExpressionSplitter = null,
Mock<IFeatureFlagService> featureFlagService = null,
Mock<IPackageDeprecationService> deprecationService = null,
Mock<IPackageRenameService> renameService = null,
Mock<IABTestService> abTestService = null,
Mock<IIconUrlProvider> iconUrlProvider = null)
{
Expand Down Expand Up @@ -208,6 +209,7 @@ private static PackagesController CreateController(
}

deprecationService = deprecationService ?? new Mock<IPackageDeprecationService>();
renameService = renameService ?? new Mock<IPackageRenameService>();
iconUrlProvider = iconUrlProvider ?? new Mock<IIconUrlProvider>();

abTestService = abTestService ?? new Mock<IABTestService>();
Expand Down Expand Up @@ -243,6 +245,7 @@ private static PackagesController CreateController(
licenseExpressionSplitter.Object,
featureFlagService.Object,
deprecationService.Object,
renameService.Object,
abTestService.Object,
iconUrlProvider.Object);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ private static DisplayPackageViewModel CreateDisplayPackageViewModel(
Package package,
User currentUser = null,
Dictionary<int, PackageDeprecation> packageKeyToDeprecation = null,
IReadOnlyList<PackageRename> packageRenames = null,
string readmeHtml = null)
{
var allVersions = (IReadOnlyCollection<Package>)package.PackageRegistration.Packages;
Expand All @@ -763,6 +764,7 @@ private static DisplayPackageViewModel CreateDisplayPackageViewModel(
allVersions,
currentUser: currentUser,
packageKeyToDeprecation: packageKeyToDeprecation,
packageRenames: packageRenames,
readmeResult: new RenderedReadMeResult { Content = readmeHtml });
}
}
Expand Down