-
Notifications
You must be signed in to change notification settings - Fork 696
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
Clear Versions combobox when selecting a different Package #3894
Conversation
43b4e14
to
f32d006
Compare
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/DetailControlModel.cs
Outdated
Show resolved
Hide resolved
a85c1cf
to
8a59d93
Compare
987914c
to
67708f0
Compare
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.
Would it make sense to show a "Loading..." message, rather than an empty box, while the version list is being loaded?
@@ -50,6 +52,28 @@ public V3DetailControlModelTestBase(GlobalServiceProvider sp, V3PackageSearchMet | |||
Sources = new List<PackageSourceContextInfo> { new PackageSourceContextInfo("nuget.psm.test") }, | |||
}; | |||
} | |||
|
|||
/// <summary> | |||
/// Due to embedding the types we need to compare based on IsEquivalentTo |
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.
Embedding as in "embed interop types"? What types?
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.
I didn't write this comment. I'm also unclear what is meant by "embedding". Also potentially this is dead code? I don't see any calls that use the comparer.
It absolutely would be ideal to indicate that the box is populating. Whether that needs to be part of this PR, or would just be nice, could be debated. The issue is a UX review would be warranted, so I'm leaning separate PR. |
8fff76d
to
c2a20b3
Compare
9d37ed9
to
5f220b9
Compare
#pragma warning restore ISB001 // Dispose of proxies | ||
|
||
ServiceLocator.InitializePackageServiceProvider(this); |
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.
This will cause flakey errors if any other test also calls ServiceLocator.InitializePackageServiceProvider
, and the tests run in parallel.
Can we pass the IAsyncServiceProvider
instance to classes via their class constructor, instead of using the static ServiceLocator
class?
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.
This sounds like a DCR? I see we have code that references the static ServiceLocator
already, so even if I change the test pattern we're using, it won't mitigate the problem you raised - right?
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.
Removed all ServiceLocator
references and the tests still pass, so either this is no longer necessary or was never necessary.
5f220b9
to
bcf0f8b
Compare
Next step, loading indicator to actually show some loading is in-progress: NuGet/Home#11410 |
Bug
Fixes: NuGet/Home#10557
Regression? Last working version:
Description
When Selecting a package in the packages list, the Details Pane will immediately clear its versions list, so the combobox cannot reflect stale data.
To demo the difference, I injected a 5 second delay into the code:
Before (Versions list stale after selection change):
After (Versions list cleared immediately):
PR Checklist
PR has a meaningful title
PR has a linked issue.
Described changes
Tests
Versions
, and that list is Empty.Documentation