NuGet / NuGetGallery

NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
https://www.nuget.org/
Apache License 2.0
1.54k stars 643 forks source link

[Feature]: Facet or categorical searches based on package "type" or "sdk type" #9289

Open Zettersten opened 1 year ago

Zettersten commented 1 year ago

Related Problem

My peers and I would love to discover new Blazor related packages. For me, that involves going to Nuget.org and typing "Blazor" before the rest of my query.

This type of search query will return results where the term "Blazor" exists in some form or fashion within the readme, description, or title (and more I'm sure). However, I've seen cases where packages do not include the word "Blazor" in the aforementioned places. for them, they are excluded from results.

The Elevator Pitch

Tired of prepending the word "Blazor" to the search box on Nuget.org? Me too!

Let's introduce a search feature that allows users to check a box to "fine tune" the result set. A user can check (for example) Blazor, MVC, Razor Component, MVC API, Minimal API, etc... And only results that fit the criteria are returned.

  1. It's a better UX
  2. Has discoverability side-effects
  3. Elevates authors in their respective "category"

Additional Context and Details

I'm a tinkerer and I enjoy trying new things and identifying potential technology trends. I want to find packages relevant to the codes bases I'm working in.

  1. Github has a page dedicated to exploring. They have highlights, trending repos, language specific filtering, etc...
  2. NPM is more convention based. If I want to search all things related to gulp. I'd search "gulp-". Or something specific to the world of express. I'd search "express-". Or another approach would be "@vercel/*" where this query implies that I want all packages related to vercel.

FFT

joelverhagen commented 1 year ago

Thanks for the suggestion @Zettersten.

Do you think the "tags" metadata may work here? There is already existing search syntax and UI on NuGet.org and in the Visual Studio Package Manager UI

For a package ID convention, I'm afraid it might be very hard to wrangle the community into one naming scheme, especially considering packages have already shipped and are successful with IDs that may or may not meet the naming scheme we come up with. Package IDs often have some "organization" meaning to them, sometimes based on ID Prefix reservation.

Would a tags:"blazor" search work? https://www.nuget.org/packages?q=Tags%3A%22Blazor%22

I'm wondering if the root of the problem is the UX on NuGet.org (very well could be!) or more about aligning the Blazor library author community on a single convention that both authors agree on, and consumers know about.

BTW, there is an existing concept of "package type". Generally, these package types are mutually exclusive with the default .NET dependency package type (such as Templates or .NET Tools). However, with a lot of work, we could make some package types that work along with the Dependency package type. But I think that would be an uphill battle since there are several places in the client and server that treat this differently.

It feels like this sort of overlaps with @Redth's proposal here: https://github.com/NuGet/Home/pull/12174. If you feel that it's different, and you want to add some more depth to the proposal (not required at this point), consider opening a spec using our proposal process: https://github.com/NuGet/Home/tree/dev/meta#how-do-i-create-a-proposal