-
Notifications
You must be signed in to change notification settings - Fork 645
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
Alternate install command for global tools packages on the packages page #5684
Conversation
it should be dotnet tool install ---global PackageID |
InstallPackageCommand = string.Format("dotnet add package {0} --version {1}", Model.Id, Model.Version) | ||
InstallPackageCommand = !packageIsTool ? | ||
string.Format("dotnet add package {0} --version {1}", Model.Id, Model.Version) : | ||
string.Format("dotnet tool install {0} --version {1}", Model.Id, Model.Version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet tool install --global {0} --version {1}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added.
I don't think we should display "unsupported". I think we should just hide the tab. But yeah, we need to talk to @anangaur. |
This is pretty nice! I don't think it affects #5656 much. I'd just have to rebase on top of this and check If it's a tool, I can output a |
Showing unsupported is not right. We should hide the other tabs. And show only the .NET CLI tab: We should get the warning text (may be convert from warning to info text with gray background) from @KathleenDollard . Learn more in the text should take to global tools intro documentation. Again get a permalink from @KathleenDollard |
@khellang @wli3 @anangaur Waiting on @KathleenDollard for the link. |
Oh. That didn't last long. Does that mean there's no way to install project-local tools (from the project file) anymore? I though the global tools were an addition, not a replacement? |
@khellang Short term, tools are not project local. |
The packages of dotnetCliToolReferences and global tools are not compatible. global tools will replace dotnetCliToolReferences, but so far there is change on dotnetCliToolReferences. It should keep working |
@nkolev92 do attach the screenshot post implementation |
@anangaur |
@anangaur |
0f438ae
to
72e0e1b
Compare
Only the link to .NET tool is missing. Otherwise LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending link.
Kathleen is on a conference this week. Could this link be added later? |
I can add it when I'm finishing #5656 👼 |
@@ -71,6 +72,7 @@ public PackageViewModel(Package package) | |||
public bool Prerelease { get; set; } | |||
public int DownloadCount { get; set; } | |||
public bool Listed { get; set; } | |||
public bool IsDotnetToolPackageType { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why set
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason.
I was following the conventions, because all of the above fields had setters as well, despite only being initialized in the constructor.
I can remove it though
@nkolev92 wait for Kathleen? She will be back next week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Let me know when you've finalized the link URL and text and we can work on validating the change in our DEV environment.
InstallPackageCommand = string.Format("dotnet add package {0} --version {1}", Model.Id, Model.Version) | ||
}, | ||
|
||
new ThirdPartyPackageManagerViewModel("https://fsprojects.github.io/Paket/contact.html") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why even keep ThirdPartyPackageManagerViewModel
around at this point? The only property it adds is ContactUrl
, but that property isn't used anymore (the contact url is just part of the message).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The third party manager message is consistent, having it in the model will remove the need for duplication of that string.
It's a fraction cleaner to have it this way :)
Sorry I held this up. If we're going with the last choice in the screen shots, is there still a link needed? Is the info message the same for all tools or specific to the tool? Just wanting to be clear on what text/links you need from me so we can get this tied up. |
@KathleenDollard A link is needed for users not aware of what tools are so that they can land on the doc page for global tools. |
The message will be something like: This is a package that lets you install a tool in the .NET environment. Learn more @KathleenDollard, can you also review the text of the message if this seems fine? |
What confuses me is that the package is a tool, it doesn't let you install a tool. So, would this make sense (trying to make sure we are on the same page)
Where Learn more is that we put it on your path and the security implications? Is that what you have in mind? Adding @mairaw for ideas on best place to link to. |
We don't have any public docs ready for global tools yet. When is this needed? |
Is it clear enough what's meant by it ? |
May be: This package can only be installed as a .NET tool in the development environment. Learn more |
Usually, our links to learn more look like: For more information, see topic name. This helps with SEO instead of having generic link texts like here or learn more. |
Do we have an agreement on the link? @anangaur @mairaw @KathleenDollard If not could we have a meeting to decide it? also @nkolev92 , there is no technical issue blocking this PR right? |
@wli3 |
@KathleenDollard do we have anything in the form of spec or design notes for global tools somewhere? I could create a fwlink that would point to a temporary location for this until the official docs are not published. |
Having a fwlink is probably a great idea regardless. |
@mairaw Since this link will be to the docs, can you create a fwlink that makes sense. I will be working on content for this. Maira and I met on this. This link will be to using tools, what they are any what the user should consider. That article will probably have a link to creating them. |
I suggest: This package contains a .NET Core Global Tool you can call from the shell/command line. I think this should clearly state that this isn't a Visual Studio tool, and supply the link in a consistent manner. @miraw, can you set up the fwlink or aka link? |
I think that message is great. |
fwlink: https://aka.ms/global-tools |
7663b85
to
1172511
Compare
@joelverhagen @skofman1 Happy to test this out on dev whenever. |
@nkolev92 , looks good! feel free to merge! |
Addresses #5182 .
The options I've considered are:
This is what I've implemented here.
We need a review from PMs before merging this.
@anangaur @karann-msft
I'll sync up offline as well.
@skofman1 Please let me know if I should target a different branch in order to get this through live soon.
//cc for visibility.
@KathleenDollard
@wli3
@rrelyea