-
Notifications
You must be signed in to change notification settings - Fork 644
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
Conversation
tests/NuGetGallery.Facts/Controllers/PackagesControllerFacts.cs
Outdated
Show resolved
Hide resolved
// Configure the rename information container | ||
var container = $('#show-rename-content-container'); | ||
window.nuget.configureExpander("rename-content-container", "ChevronDown", null, "ChevronUp"); | ||
container.keydown(function (event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be DRY with the deprecation below. Shared function, loop, whatever.
@{ | ||
if (Model.PackageRenames.Count == 1) | ||
{ | ||
@:This package has been renamed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period at the end of sentence.
} | ||
else | ||
{ | ||
@:This package has been renamed or split into new packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period at the end of sentence.
} | ||
|
||
public IReadOnlyList<PackageRename> GetPackageRenames(PackageRegistration packageRegistration) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this new query significantly impact the display package page performance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be prudent to have a roll-out or, alternatively. a load test plan to assess whether this will significantly impact Display Package load time.
Consider using the A/B test system to toggle the behavior on for a portion of users.
@@ -837,11 +840,14 @@ public virtual async Task<ActionResult> DisplayPackage(string id, string version | |||
.GroupBy(d => d.PackageKey) | |||
.ToDictionary(g => g.Key, g => g.First()); | |||
|
|||
var packageRenames = _renameService.GetPackageRenames(package.PackageRegistration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be behind the flag as well, so we can turn if off if perf is an issue.
It's behind the feature flag now. If the feature flag is turned off, there will be no impact on loading the package page, and nothing related to rename will be triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
Addresses #7907