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

Add a deprecation warning in the Bonsai package manager #1965

Open
cjsha opened this issue Aug 8, 2024 · 4 comments · May be fixed by #1969
Open

Add a deprecation warning in the Bonsai package manager #1965

cjsha opened this issue Aug 8, 2024 · 4 comments · May be fixed by #1969
Labels
feature New planned feature
Milestone

Comments

@cjsha
Copy link

cjsha commented Aug 8, 2024

You can see a package that is marked as deprecated in nuget, but the only way I know that it is deprecated through the Bonsai UI is if I read its description which doesn't really pop out at me. And that deprecation warning is manually added - not all deprecated packages will have descriptions that indicate as such.

bonsai-deprecated-package

@glopesdev glopesdev added the feature New planned feature label Aug 8, 2024
@glopesdev glopesdev added this to the 2.9 milestone Aug 8, 2024
@PathogenDavid
Copy link
Member

For reference, here's how the Visual Studio NuGet package manager shows deprecation:

image

@glopesdev
Copy link
Member

@cjsha It looks like it is possible to get the custom deprecation message via GetDeprecationMetadataAsync. Below is a proposed layout to resolve this.

I tried to strike a balanced tone with the current package details dialog. What I mostly don't like is there is no good place to insert the warning icon in the left package view. Ideally we would migrate the UI to more closely mimic the modern package view, with the listed version numbers, and use only icons instead of buttons, but it's a significant amount of work to make an unrelated feature look slightly better.

There are also two more properties in PackageDeprecationMetadata: a list of Reasons and an AlternatePackage which are probably used to fill the "More info" section in the dialog. I think we would not include these on a first release of the deprecation UI, or alternately we can try to carve out space to render a standard deprecation message listing the alternate package at the bottom of the description.

image

@cjsha
Copy link
Author

cjsha commented Aug 16, 2024

I tried to strike a balanced tone with the current package details dialog. What I mostly don't like is there is no good place to insert the warning icon in the left package view. Ideally we would migrate the UI to more closely mimic the modern package view, with the listed version numbers, and use only icons instead of buttons, but it's a significant amount of work to make an unrelated feature look slightly better.

It would be nice for someone to know it's deprecated before clicking on it because I expect most people to click and install without really looking much at what's on the right side, but I'm also sympathetic to aesthetic sensibilities. It seems like this point is outdated though if I'm to understand what you describe in this PR.

If there's going to be an AlternatePackage section, I would recommend carving out space for it underneath the deprecation notice if possible. To me, those two items belong together.

Could the AlternatePackage section include a button for automatically searching/selecting the alternate package for installation? That seems like a lot more work, but I figure I'd throw it out for your consideration. Although it's more ideal to use the dedicated AlternatePackage tag for conveying what alternative package the user can use, I suppose it's sufficient to do that in the deprecation message that occurs under the "Deprecation" header like you did in that screenshot for now. For that reason, I suppose it's ok to leave the AlternatePackage section out for now if that's still part of your plan.

@glopesdev
Copy link
Member

Could the AlternatePackage section include a button for automatically searching/selecting the alternate package for installation?

Yup, this would be easy if we are consistent with the modern VS package manager, where clicking on the alternate package makes a search by that package ID.

Now that I have bitten the bullet and revamped most of the details page it probably won't be too hard to add the alternate package section.

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

Successfully merging a pull request may close this issue.

3 participants