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

Arrow keys in NuGet PM UI Sources editing doesn't change order of persistence #8315

Closed
vsfeedback opened this issue Jul 9, 2019 · 13 comments · Fixed by NuGet/NuGet.Client#4376
Assignees
Labels
Area:Settings NuGet.Config and related issues Functionality:VisualStudioUI Package Manager UI et al Priority:2 Issues for the current backlog. Product:VS.Client Type:Bug

Comments

@vsfeedback
Copy link

NuGet 套件管理員預設就有兩個可用套件來源:

1. nuget.org 2. Microsoft Visual Studio Offline Packages

當我想新增 Azure Artifacts 的 NuGet feed 到這裡來,預設會新增到最後一個位置。

但是當我想移動套件來源的順序時,就算我調整到最上面 (第一順位) 並按下確定,下次再開啟套件來源的選項設定,會看到自定的套件來源還是出現在最後一個位置,不能依照我所設定的調整到第一順位。

這算是 Bug 嗎?

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/614163/在-nuget-套件管理員新增套件來源無法調整順序.html
VSTS ticketId: 934339

These are the original issue comments:

Jane Wu [MSFT] on 6/19/2019, 07:59 PM (19 days ago):

Translated from Bing:

The NuGet Suite Administrator Preset has two available kit sources:

1. nuget.org 2. Microsoft Visual Studio Offline Packages

When I want to add Azure Artifacts' NuGet feed here, the default will be added to the last location.But when I want to move the order of the kit source, even if I adjust to the top (first order) and press OK, the next time I open the option settings of the kit source, I will see that the custom kit source still appears in the last one. Position, can not be adjusted to the first order according to my settings.

Is this a bug?

Visual Studio Feedback System on 6/19/2019, 08:23 PM (19 days ago):

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

These are the original issue solutions:
(no solutions)

@nkolev92 nkolev92 changed the title 在 NuGet 套件管理員新增套件來源無法調整順序-New kit source in NuGet Suite Administrator cannot adjust order Remove the arrow keys in the NuGet PM Sources UI Jul 9, 2019
@nkolev92
Copy link
Member

nkolev92 commented Jul 9, 2019

The arrow keys in the PM sources UI add no value, since they do not modify the configs.
Furthermore the ordering of the sources does not affect any nuget operations whatsoever.

@nkolev92
Copy link
Member

nkolev92 commented Jul 9, 2019

//cc @karann-msft useful feedback about the redesign of the settings UI.

@nkolev92 nkolev92 added Area:Settings NuGet.Config and related issues Product:VS.Client Functionality:VisualStudioUI Package Manager UI et al Type:Bug labels Jul 9, 2019
@nkolev92 nkolev92 added this to the Backlog milestone Jul 9, 2019
@nkolev92 nkolev92 added the Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. label Jul 9, 2019
@donnie-msft
Copy link
Contributor

Users expressed confusion and actually wanted to control the order here:
#3676

@rrelyea rrelyea changed the title Remove the arrow keys in the NuGet PM Sources UI Arrow keys in NuGet PM UI Sources editing doesn't change order of persistence Nov 28, 2019
@nkolev92
Copy link
Member

Yet another confused customer from: #8315

@nkolev92
Copy link
Member

I think we should remove the arrows in the near term and track the redesign in #7973.

See reasoning here: #9653 (comment)

Copying the most important things.

Why not make them change the order?
Lots of input for that here #3676

2 reasons

Arrows as priority order

I want to call attention to the specific response the NuGet team gave in the issue you linked #3676 (comment).
The customer interpreta priority that does not exist. The only source preference that's existed is packages.config, the selected source was treated as a primary source and that's the one that'd be use to obtain the package when necessary.
That priority never manifest in the package source options dialog.

Arrows as persistence order

In this particular issue a customer wants the arrows to control the persistence order of the sources. So we have examples of 2 different customers misinterpreting the arrows.
The complexity with this particular aspect is something I described in the above issue:

This is even more of a problem when you can account for the fact that NuGet configs are merged, so sources could be coming from different configs.

What happens when you move a source lower, in a range of sources defined in a different file. Do you move the declaration from one nuget.config file to another? Is that obvious to the customer?

Wrapping it up

My conclusion from it all, the arrows add no obvious value to the topic and are ambigious.
The current UI as is, does not provide sufficient enough detail to implement such a functionality.

7973 - I would call this "a bulleted list of relatively broad UI config concepts". Do we have anything solidified, any mockups?

#7973 captures the requirements for a settings UI redesign. I've not seen any finalized mock-ups myself. That issue is not actively worked on.

Incremental progress

Given the cascading behavior of NuGet.config, the current UI is obviously lacking and in need of a refresh. #7973 is used to track the requirements.
Given the number of people that have been confused by the arrows, I think we should remove them. It's cheap to do and eliminates unnecessary confusion.

@nkolev92 nkolev92 added Triage:NeedsTriageDiscussion Priority:2 Issues for the current backlog. and removed Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Priority:2 Issues for the current backlog. labels Jun 20, 2020
@nkolev92
Copy link
Member

@nkolev92 nkolev92 added Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. and removed Triage:NeedsTriageDiscussion labels Jun 29, 2020
@nkolev92
Copy link
Member

Triage:
We will remove the arrows in the meantime because they cause confusion for our customers.

@Eli-Black-Work
Copy link

And yet another confused customer (me :P): https://developercommunity.visualstudio.com/comments/1101169/view.html

@Eli-Black-Work
Copy link

The order of the NuGet sources does affect functionality in at least one place: When installing NuGet packages via the Visual Studio UI.

Right click on a project and go to Manage NuGet Packages. At the top right of the window, there's a "Package source" dropdown. The order of the packages in this dropdown are in the same order as when configuring NuGet sources.

Importantly, when installing a new package, VS defaults the value in the "Package source" dropdown to be the first NuGet source that's listed when configuring NuGet sources.

Let's say that I have two NuGet sources:

  1. source_that_only_works_on_company_network
  2. nuget.org

By default, whenever installing a new package via the Visual Studio UI, Visual Studio first looks only in source_that_only_works_on_company_network. I want it to look in nuget.org by default, but there's no easy way to accomplish this, since the NuGet sources reordering UI doesn't work :P

@nkolev92
Copy link
Member

nkolev92 commented Jul 6, 2020

@Bosch-Eli-Black

Right click on a project and go to Manage NuGet Packages. At the top right of the window, there's a "Package source" dropdown. The order of the packages in this dropdown are in the same order as when configuring NuGet sources.

Importantly, when installing a new package, VS defaults the value in the "Package source" dropdown to be the first NuGet source that's listed when configuring NuGet sources.

NuGet defaults to all the first time. After that it just goes to whatever the user selected. Meaning, you can select pretty much any source.

By default, whenever installing a new package via the Visual Studio UI, Visual Studio first looks only in source_that_only_works_on_company_network. I want it to look in nuget.org by default, but there's no easy way to accomplish this, since the NuGet sources reordering UI doesn't work :P

This is not true in PackageReference. PackageReference treats all feeds in an equivalent way.

In packages.config install/update, the selected feed is treated as a primary, while the others are treated as secondary sources. What that means is that the selected packages is download from the selected feed, but the transitive packages can be download from all the feeds.

So the behavior here is unaffected by the arrows. It's all about the user selection.

@Eli-Black-Work
Copy link

Ah, got it; thanks, @nkolev92 :)

@donnie-msft
Copy link
Contributor

As part of this work, let's also update the Add/Remove icons. They look a couple decades old (I think these are Windows Forms assets)
image

@zivkan
Copy link
Member

zivkan commented Dec 30, 2021

Tracking issue on Developer Community that we need to mark as fixed once we fix this issue and ship in VS: https://developercommunity.visualstudio.com/t/Cannot-Reorder-Package-Sources-in-the-Vi/1625154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Settings NuGet.Config and related issues Functionality:VisualStudioUI Package Manager UI et al Priority:2 Issues for the current backlog. Product:VS.Client Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants