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

Allow packages to designate recommended packages #1954

Open
PathogenDavid opened this issue Aug 6, 2024 · 0 comments
Open

Allow packages to designate recommended packages #1954

PathogenDavid opened this issue Aug 6, 2024 · 0 comments
Labels
proposal Request for a new feature

Comments

@PathogenDavid
Copy link
Member

PathogenDavid commented Aug 6, 2024

Split off from #1603

We could introduce the concept of "Recommended Packages". Have packages commonly used float to the top of the package browser with a little star or something (or maybe a filter for recommended packages.)

We could even allow packages to provide their own recommendations. So if you install Contoso.Bonsai it might automatically add Contoso.Bonsai.Graphics to your recommendations.

Could maybe even offer to install recommendations when you install a top-level package kinda like apt.

(This might be deviating too far from NuGet purity though.)


This is definitely an interesting idea and might solve some of the problems we have currently with people forgetting to install the Design package corresponding to a package they have just installed and then struggling to find editors and visualizers.


Inspiration for the UI side of things

While creating this issue I gathered a few screenshots of various package manager-shaped things that have recommendations.

apt

apt (my original inspiration) prints a list of suggested packages whenever you install one:

image

apt actually has three tiers of package dependencies: depends, recommends, and suggests.

Depends packages are hard dependencies. Recommends are optional dependencies that are always installed by default. Suggests are packages which are not installed by default (but are listed when you install as with the screenshot above.)

You can see these on Ubuntu's online package browser:

image

Note that recommendations and suggestions are made recursively. For example, if you go look at emacs from my first screenshot you can see it's actually just a meta package which doesn't suggest any packages directly but if you dig into emacs-gtk you'll see that's where the emacs-common-non-dfsg suggestion came from in my screenshot.

While apt's experience is the most flexible (the idea of soft dependencies is definitely interesting for things like the Design packages Gonçalo mentioned), the UX side of things leaves a bit to be desired (on the CLI at least.)

Visual Studio Code extensions

Not my favorite UX (in fact I disable this pane normally), but it's worth noting. Behavior-wise a unique aspect of this one is that the recommendations are based on your current extensions and environment. (For example I'm pretty sure it's recommending WSL since I have WSL on my PC. markdownlint is probably being recommended because I have other Markdown-related extensions, or maybe it just knows I edit Markdown a lot.)

image

Visual Studio Installer

This is a user experience is probably my favorite and I could see it applying to Bonsai by just adding checkboxes below the package metadata pane.

This one also works like apt where there's a difference between recommended and suggested components. When you install a Visual Studio workload many of these optional components are already checked (similar to apt's recommendations) and some are just related but need to be installed by the user (similar to apt's suggestions.)

image

Visual Studio Package Manager UI

Visual Studio itself makes recommendations based on what's going on in your project. They're not human recommendations but the star icon and putting them at the top could work well. Downside of this is you're limited by how many recommendations you can make. (If a package had a lot of recommendations it could make the list useless.)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Request for a new feature
Projects
None yet
Development

No branches or pull requests

1 participant