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

Alternate install command for global tools packages on the packages page #5684

Merged
merged 7 commits into from
Apr 11, 2018

Conversation

nkolev92
Copy link
Member

@nkolev92 nkolev92 commented Mar 26, 2018

Addresses #5182 .

Packages with this package type should display a “dotnet install packageId packageVersion” tab only, rather than the standard tabs.

The options I've considered are:

  • Display the correct message for dotnet.exe. Display unsupported for others.
    This is what I've implemented here.

unsupported
dotnetinstall

  • Display the correct message for dotnet.exe. Don't display tabs for others.
    tools packages

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

@wli3
Copy link

wli3 commented Mar 26, 2018

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)
Copy link

@wli3 wli3 Mar 26, 2018

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}

Copy link
Member Author

Choose a reason for hiding this comment

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

added.

@joelverhagen
Copy link
Member

I don't think we should display "unsupported". I think we should just hide the tab. But yeah, we need to talk to @anangaur.

@joelverhagen
Copy link
Member

Also, how is this effected by #5656?

/cc @khellang

@khellang
Copy link
Contributor

khellang commented Mar 26, 2018

This is pretty nice! I don't think it affects #5656 much. I'd just have to rebase on top of this and check packageIsTool.

If it's a tool, I can output a DotNetCliToolReference element instead of a PackageReference. I think that means we should ditch the "PackageReference" name for the tab once and for all and go for "Project File" instead.

@anangaur
Copy link
Member

Showing unsupported is not right. We should hide the other tabs. And show only the .NET CLI tab:

image

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

@nkolev92
Copy link
Member Author

@khellang
This is not about dotnetCliToolReferences.
Those are being deprecated.
This about the new dotnet tool type- global tools, which cannot be installed in projects, and it only works via the CLI.

@wli3
Thanks, will correct it.

@anangaur
Thanks, I will add that as well.

Waiting on @KathleenDollard for the link.

@khellang
Copy link
Contributor

khellang commented Mar 26, 2018

This is not about dotnetCliToolReferences.
Those are being deprecated.

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?

@nkolev92
Copy link
Member Author

Does that mean there's no way to install project-local tools anymore? I though the global tools were an addition, not a replacement?

@khellang
We can't give you definitive answers to those questions. The CLI team has better context on that.

Short term, tools are not project local.
They're working on enabling more scenarios with these tools (not just user-wide tools)

@wli3
Copy link

wli3 commented Mar 26, 2018

Does that mean there's no way to install project-local tools anymore? I though the global tools were an addition, not a replacement?

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

@anangaur
Copy link
Member

@nkolev92 do attach the screenshot post implementation

@nkolev92
Copy link
Member Author

@anangaur
Will do :)
I was going to sync up offline with you on how exactly it should look before I added a screenshot here :D

@nkolev92
Copy link
Member Author

nkolev92 commented Mar 27, 2018

@anangaur
Updated with another screenshot.
The link is not added yet.
I'll wait for the appropriate link from .NET team

@anangaur
Copy link
Member

Only the link to .NET tool is missing. Otherwise LGTM.

Copy link
Member

@anangaur anangaur left a comment

Choose a reason for hiding this comment

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

Pending link.

@wli3
Copy link

wli3 commented Mar 27, 2018

Kathleen is on a conference this week. Could this link be added later?

@khellang
Copy link
Contributor

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; }
Copy link
Member

Choose a reason for hiding this comment

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

Why set?

Copy link
Member Author

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

@wli3
Copy link

wli3 commented Mar 29, 2018

@nkolev92 wait for Kathleen? She will be back next week

Copy link
Member

@joelverhagen joelverhagen left a 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")
Copy link
Contributor

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).

Copy link
Member Author

@nkolev92 nkolev92 Apr 2, 2018

Choose a reason for hiding this comment

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

@khellang

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 :)

@KathleenDollard
Copy link

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.

@anangaur
Copy link
Member

anangaur commented Apr 3, 2018

@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.

@anangaur
Copy link
Member

anangaur commented Apr 3, 2018

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?

@KathleenDollard
Copy link

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)

Installing this package will allow you to call it from a shell/command line. Learn more

Where Learn more is that we put it on your path and the security implications? Is that what you have in mind?

@peterhuene

Adding @mairaw for ideas on best place to link to.

@mairaw
Copy link

mairaw commented Apr 3, 2018

We don't have any public docs ready for global tools yet. When is this needed?

@nkolev92
Copy link
Member Author

nkolev92 commented Apr 3, 2018

Installing this package will allow you to call it from a shell/command line. Learn more

Is it clear enough what's meant by it ?
Because package names and tool names don't have to be congruent.

@anangaur
Copy link
Member

anangaur commented Apr 3, 2018

May be:

This package can only be installed as a .NET tool in the development environment. Learn more

@mairaw
Copy link

mairaw commented Apr 3, 2018

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.

@wli3
Copy link

wli3 commented Apr 5, 2018

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?

@nkolev92
Copy link
Member Author

nkolev92 commented Apr 5, 2018

@wli3
Nope. Just waiting on a consensus message and link.

@mairaw
Copy link

mairaw commented Apr 5, 2018

@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.
I'm super busy this week working on a different release so I can't drop everything to go work on this instead.

@nkolev92
Copy link
Member Author

nkolev92 commented Apr 5, 2018

Having a fwlink is probably a great idea regardless.
We shouldn't need a change on the server if a docs reorg happens.

@KathleenDollard
Copy link

@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.

@KathleenDollard
Copy link

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?

@nkolev92
Copy link
Member Author

nkolev92 commented Apr 9, 2018

I think that message is great.
I'll update the PR as soon as I have the fwlink.

@KathleenDollard
Copy link

fwlink: https://aka.ms/global-tools

@nkolev92
Copy link
Member Author

@joelverhagen @skofman1
Updated the messaging and link.

Happy to test this out on dev whenever.

@skofman1
Copy link
Contributor

@nkolev92 , looks good! feel free to merge!

@nkolev92 nkolev92 merged commit 3c5a43c into dev Apr 11, 2018
@nkolev92 nkolev92 deleted the dev-nkolev92-5182 branch April 11, 2018 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants