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.55k stars 641 forks source link

Add license tab #8681

Open loic-sharma opened 3 years ago

loic-sharma commented 3 years ago

Background

Today, the information for packages' embedded license is not well integrated with nuget.org's UI. The display package page has a sidebar link to the license. For example, the MIT license links here: https://licenses.nuget.org/MIT

Solution

We are redesigning the display package page to have tabs:

Screenshot of tabs...

After this redesign is shipped, we should add a new tab for the package's license information for packages with embedded licenses:

image

ianrathbone commented 2 years ago

Hey @loic-sharma - I've been looking at how this could be implemented, and at similar functionality in the code for the README tab.

I was considering, would the best way of doing this to be to pull the HTML straight from the https://licenses.nuget.org/ URL provided in the model? Or is there a better way of doing this?

loic-sharma commented 2 years ago

I'm no longer on the team, I think @agr is likely the best contact for this question. I don't think I'd pull HTML from licenses.nuget.org as it's not clear we'd be able to style it properly.

Instead, I'd consider using ICoreLicenseFileService.DownloadLicenseFileAsync, similar to how the existing PackagesController.License route works.

ianrathbone commented 2 years ago

OK thanks - I will look into it!

erdembayar commented 1 month ago

It could be markdown file too.