Show Package Owner profile links on Browse Tab#5766
Merged
donnie-msft merged 1 commit intodevfrom Apr 29, 2024
Merged
Conversation
3139c76 to
a4fd5f2
Compare
8 tasks
aab2eba to
c9f0c79
Compare
c9f0c79 to
342535f
Compare
jeffkl
approved these changes
Apr 29, 2024
nkolev92
reviewed
Apr 29, 2024
| _link = knownOwner.Link; | ||
| } | ||
|
|
||
| public string Name => _name; |
Member
There was a problem hiding this comment.
public string Name {get;} is syntactic sugar over having a private and public field.
Contributor
Author
There was a problem hiding this comment.
True, I created a field at some point during development, but it's not really necessary, I'll revise that.
| public DateTimeOffset? Published { get; internal set; } | ||
| public IReadOnlyList<string>? OwnersList { get; internal set; } | ||
| public string? Owners { get; internal set; } | ||
| public IReadOnlyList<KnownOwner>? KnownOwners |
Member
There was a problem hiding this comment.
This class is going from a model DTO (post discussion), to something that has action logic in addition to being a model.
i don't have a clear recommendation, but something that stood out.
Contributor
Author
There was a problem hiding this comment.
Talked offline. This is kind of a DTO versus Model, so I'll move the calculation logic down into SearchObject.
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Fixes: NuGet/Home#12501
Spec: https://github.com/NuGet/Home/blob/dev/accepted/2023/owner-author-pmui.md
Regression? Last working version:
Description
Key points
On the Browse Tab, when a single package source is selected and it provides a resource,
OwnerDetailsUriTemplateResourceV3, hyperlinks will be shown for each package owner in the PM UI Packages List. This is referred to as Supporting Known Owners.The owner profile URLs are built from the template from that source and the link's ToolTip shows the full URL.
No telemetry is added in this PR.

Screenshot of single package source Supporting Known Owners:
Authors will never be shown in the packages list when the source Supports Known Owners.
In all other scenarios, Author will continue to be shown when Known Owners is not supported.

Screenshot of single package source which does not Support Known Owners:
Commentary
IOwnerDetailsUriService, provides an indicator for support for known owners, and a means to obtain an Owner Profile URL.MultiSourcePackageMetadataProviderimplements and provides this service:PackageSearchMetadataContextInfois the coming together of two things: Search results and package metadata. Owners belong to Search, therefore this context is where I'm materializingKnownOwnermodels.author" when there's no Supported Known Owners.owner" when there are Supported Known Owners.KnownOwnerViewModels, as they should match. I kept this pattern here as I'd like to eventually refactor this class and use a more MVVM approach for the AuthorAndDownloadCount's view model.ExecuteOpenExternalLinkevent similar to the Details Pane event. Telemetry can be added for owner profile links by simply providing a new property which this event will emit.KnownOwnerViewModelrepresents known owners within Visual Studio UIs.LastItemToVisibilityConverterallows for adding commas after each hyperlink, except the last one.Accessibility
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Documentation