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

Adds deprecation links in PM UI #4144

Merged
merged 38 commits into from
Jul 30, 2021
Merged

Conversation

dominoFire
Copy link
Contributor

@dominoFire dominoFire commented Jul 9, 2021

Bug

Fixes: NuGet/Home#10996

Regression? Last working version: No

Spec: https://github.com/NuGet/Home/blob/8fb8d219a76b99c2a3ce79f8364c946283d4a19b/proposed/2021/VSdeprecationfeature.md

Description

Adds three messages in PM UI:

  • More Info: Takes you to the package details URL
  • Alternate package link: it's an internal link that triggers a search in PM UI for the alternate package ID
  • Deprecation message with no alternate package: When there is no alternative package, PM UI shows a deprecation

Demos

LInk in Package list

AnimationFinalLeft

Link in Details pane

AnimationFinalRight

From Installed tab

AnimationInstalled

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added: 2 new tests. Accessibility Insights test pass
    • [ ] Test exception
    • [ ] N/A
  • Documentation

    • [ ] Documentation PR or issue filled
    • N/A: not needed. only in Release notes

Accessibility Tests

Test in Package List

AInsights Package list test

Test in Details Pane

AInsights Details pane test

Known issues

This PR is affected by NuGet/Home#11055 ; that can be fixed separately.

@dominoFire dominoFire requested a review from a team as a code owner July 9, 2021 20:07
Copy link
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this looks pretty reasonable, but I don't have great understanding about why it works just yet.

Did we consider the fact that alternate package metadata has a version range included as well?

@dominoFire dominoFire force-pushed the dev-dominofire-deprecation-links branch 2 times, most recently from 9b838de to c51d9bf Compare July 20, 2021 21:18
@dominoFire dominoFire requested a review from nkolev92 July 21, 2021 21:24
@dominoFire dominoFire force-pushed the dev-dominofire-deprecation-links branch from 29f7f5f to ce6969d Compare July 22, 2021 02:20
@dominoFire dominoFire requested a review from a team July 22, 2021 02:20
@kartheekp-ms
Copy link
Contributor

I think Alternate package link is not required in the list of packages tab because a warning icon is displayed anyway. Clicking on the package, user will see a deprecated message along with alternative package id.

@jebriede
Copy link
Contributor

I think Alternate package link is not required in the list of packages tab because a warning icon is displayed anyway. Clicking on the package, user will see a deprecated message along with alternative package id.

@kartheekp-ms The link provides the user with a shortcut to the alternative package without having to click on the package to see the details so it saves them clicks. Since this code is complying with the design spec that resulted after user studies and was under review and approved by stakeholders and the UX board, I would recommend keeping it in the code.

@chrisraygill
Copy link

chrisraygill commented Jul 23, 2021

This is awesome! I do have a few questions though -

When you click on the alternative package link, is there a way to only show that package in the package list rather than initiating a regular search for the ID? It seems weird that we surface a full list of search results when the alternative package is a specific package.

I know for nuget.org packages, we can use "PackageId: " to get a single result. That's what I use in my proposal for VS package deep links: NuGet/Home#11047

The drawback is that it only works for nuget.org packages. That being said, I'm not sure it's likely that a user would have another feed that supports deprecation, but maybe @joelverhagen and @loic-sharma might know better.

Regardless of how we do it, I think this would be a much better experience if we only surfaced the specific alternative package. AFAIK It's not necessarily even guaranteed that searching for an exact ID will surface the ID matched package as the first result.

For reference:

Also, if you click on the alternative package link from the Installed or Updates tab, does it go to the Browse tab?

@dominoFire dominoFire changed the title Adds deprecation links in Detail Pane in PM UI Adds deprecation links in PM UI Jul 24, 2021
@dominoFire dominoFire force-pushed the dev-dominofire-deprecation-links branch from ce6969d to 6ff3580 Compare July 24, 2021 06:13
@dominoFire
Copy link
Contributor Author

All of this looks pretty reasonable, but I don't have great understanding about why it works just yet.

Did we consider the fact that alternate package metadata has a version range included as well?

@nkolev92 I tried including the version on search boxes, but, nuget.org shows no results. That's why i'm only using package ID.

image

@dominoFire
Copy link
Contributor Author

This is awesome! I do have a few questions though -

When you click on the alternative package link, is there a way to only show that package in the package list rather than initiating a regular search for the ID? It seems weird that we surface a full list of search results when the alternative package is a specific package.

I know for nuget.org packages, we can use "PackageId: " to get a single result. That's what I use in my proposal for VS package deep links: NuGet/Home#11047

The drawback is that it only works for nuget.org packages. That being said, I'm not sure it's likely that a user would have another feed that supports deprecation, but maybe @joelverhagen and @loic-sharma might know better.

Regardless of how we do it, I think this would be a much better experience if we only surfaced the specific alternative package. AFAIK It's not necessarily even guaranteed that searching for an exact ID will surface the ID matched package as the first result.

For reference:

Also, if you click on the alternative package link from the Installed or Updates tab, does it go to the Browse tab?

@chgill-MSFT Yes, it switches to Browse tab to look for packages.

Also, added packageid: to the search query. See images above

@dominoFire dominoFire force-pushed the dev-dominofire-deprecation-links branch from be9d15c to 50edf06 Compare July 26, 2021 22:47
@dominoFire dominoFire requested review from jebriede and a team July 27, 2021 00:33
@dominoFire dominoFire force-pushed the dev-dominofire-deprecation-links branch from 6275503 to 1f52be5 Compare July 27, 2021 19:39
@dominoFire dominoFire force-pushed the dev-dominofire-deprecation-links branch from 5f72d4e to a8ccacd Compare July 29, 2021 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants