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

Conversation

zhhyu
Copy link
Contributor

@zhhyu zhhyu commented Apr 24, 2020

image
image

  1. Eager loading the "ToPackageRegistration" info.
  2. Reuse CSS template from deprecations;
  3. Feature Flag.

Addresses #7907

@zhhyu zhhyu changed the title [Rename] Display rename information [WIP] Display rename information Apr 24, 2020
@zhhyu zhhyu changed the title [WIP] Display rename information [WIP-Rename] Display rename information Apr 24, 2020
zhhyu added 2 commits April 24, 2020 19:25
@zhhyu zhhyu changed the title [WIP-Rename] Display rename information [Rename] Display rename information on package detail page Apr 26, 2020
// Configure the rename information container
var container = $('#show-rename-content-container');
window.nuget.configureExpander("rename-content-container", "ChevronDown", null, "ChevronUp");
container.keydown(function (event) {
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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)
{
Copy link
Member

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?

Copy link
Member

@joelverhagen joelverhagen left a 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);
Copy link
Member

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.

@zhhyu
Copy link
Contributor Author

zhhyu commented Apr 29, 2020

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.
I prefer to check in this change, but until we have the results from load test or A/B test, we should not turn it on for customers.

Copy link
Member

@joelverhagen joelverhagen left a comment

Choose a reason for hiding this comment

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

Nice work.

@zhhyu zhhyu merged commit 08a662d into dev Apr 29, 2020
@agr agr mentioned this pull request May 4, 2020
14 tasks
@zhhyu zhhyu deleted the zhhyu-PackageRename-Display branch September 3, 2020 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants