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

Spec: Include Metadata with IntelliCode Suggested Packages #13530

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 12 additions & 4 deletions accepted/2023/owner-author-pmui.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,18 @@ When Known Owners are available on a package source, the PM UI Packages list wil
Example of HyperLinks and a package list item's ToolTip:
![The PM UI Packages list showing a page of Owners from NuGet.org beside each package ID as a hyperlink. An example of a tooltip showing the package name, owners, and package description.](../../meta/resources/OwnerAuthor/ownerNuGetOrgLinksNoIcon.png)

|Package Source supports Known Owners|Shown in Packages List|Example
|--|--|--|
|No| Author | "by James Newton-King"
|Yes| Owner only| "by [jamesnk](https://www.nuget.org/profiles/jamesnk), [newtonsoft](https://www.nuget.org/profiles/newtonsoft), [dotnetfoundation](https://www.nuget.org/profiles/dotnetfoundation)"
Packages coming from [NuGet IntelliCode Package Suggestions](https://devblogs.microsoft.com/nuget/intellicode-package-suggestions-for-nuget-in-visual-studio/#:~:text=IntelliCode%20Package%20Suggestions%20use%20a,Netflix%20recommendations%20for%20NuGet%20packages.) are not sourced from a package source, and therefore will not contain Known Owner metadata nor will they be shown as hyperlinks.
Instead, the author will continue to be shown for these 5 recommended packages.

Example of IntelliCode Suggestions showing their author:
![Example of IntelliCode Suggestions showing their author](../../meta/resources/OwnerAuthor/intellicodeShowsAuthor.png)


|Package Source supports Known Owners|Package is `*` Recommended|Shown in Packages List|Example
|--|--|--|--|
|No| N/A | Author | "by James Newton-King"
|Yes| No | Owner | "by [jamesnk](https://www.nuget.org/profiles/jamesnk), [newtonsoft](https://www.nuget.org/profiles/newtonsoft), [dotnetfoundation](https://www.nuget.org/profiles/dotnetfoundation)"
|Yes| Yes | Author | "by James Newton-King"

Hyperlink URL values for each Known Owner will depend on which resource the package source supports.
The URL's value will be shown as a tooltip on each hyperlink.
Expand Down
63 changes: 63 additions & 0 deletions accepted/2024/recommender-pmui-metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Include Metadata with IntelliCode Suggested Packages
<!-- Replace `Title` with an appropriate title for your design -->

- Donnie Goodson ([donnie-msft](https://github.com/donnie-msft))
- GitHub Issue: https://github.com/NuGet/Home/issues/10714

## Summary

<!-- One-paragraph description of the proposal. -->

Packages coming from [NuGet IntelliCode Package Suggestions](https://devblogs.microsoft.com/nuget/intellicode-package-suggestions-for-nuget-in-visual-studio/#:~:text=IntelliCode%20Package%20Suggestions%20use%20a,Netflix%20recommendations%20for%20NuGet%20packages.) (aka, "recommender") are not sourced directly from a package source, and therefore will not contain metadata such as Known Owners or Download Count.
In order to include this metadata, the NuGet Package Manager (PM UI) can search for each recommended package while loading search results by re-querying each recommended package, or a change can be made to the implementation of the recommender.

## Motivation

<!-- Why are we doing this? What pain points does this solve? What is the expected outcome? -->

Missing recommended package metadata means customers cannot see Known Owner or Download Count for the first 5 packages shown in the PM UI Browse Tab from nuget.org. When those packages are shown in the regular search results, they will have this metadata which can cause confusion for customers.

## Explanation

### Functional explanation

<!-- Explain the proposal as if it were already implemented and you're teaching it to another person. -->
<!-- Introduce new concepts, functional designs with real life examples, and low-fidelity mockups or pseudocode to show how this proposal would look. -->

#### Option 1: Package Recommender Service

The Package Recommender is currently shipped as a VS Extension (VSIX) in Visual Studio.
In order to provide up-to-data metadata for a package, a service would allow clients, such as PM UI, to query for recommended packages. The service can append the package metadata along with each package it recommends.

#### Option 2: Explicitly Search for each recommended package.

When the PM UI receives recommended search results, it can call Search for each of those packages.
An attempt to re-query each of the 5 recommended packages brought up concerns of performance in the PM UI. See pull request: https://github.com/NuGet/NuGet.Client/pull/4049.

### Technical explanation

<!-- Explain the proposal in sufficient detail with implementation details, interaction models, and clarification of corner cases. -->

## Drawbacks

<!-- Why should we not do this? -->

## Rationale and alternatives

<!-- Why is this the best design compared to other designs? -->
<!-- What other designs have been considered and why weren't they chosen? -->
<!-- What is the impact of not doing this? -->

## Prior Art

1. An attempt to re-query each of the 5 recommended packages brought up concerns of performance in the PM UI. See pull request: https://github.com/NuGet/NuGet.Client/pull/4049.

## Unresolved Questions

<!-- What parts of the proposal do you expect to resolve before this gets accepted? -->
<!-- What parts of the proposal need to be resolved before the proposal is stabilized? -->
<!-- What related issues would you consider out of scope for this proposal but can be addressed in the future? -->

## Future Possibilities

<!-- What future possibilities can you think of that this proposal would help with? -->
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.