Closed advay26 closed 5 months ago
I am still looking into this PR and trying to understand the change compared to the documented one: https://learn.microsoft.com/en-us/nuget/consume-packages/finding-and-choosing-packages#advanced-filtering-and-sorting.
Let's say that if I select "ALL" and then select the framework generation checkbox ".NET", will it filter the result that target all net7.0, net6.0 and net5.0?
If it only cares and calculates based on what specific TFMs have been selected. When the framework generation checkbox is selected, should we mark the checkbox as selected to all TFMs under it?
When we apply the new selection, the panel on the left blinks. Is it possible that the panel keeps stable when clicking that "Apply" button?
Personally, I feel that the height of the switch button "ALL/ANY" is too high. Maybe a little higher than the left words is better or align with badges on the right side.
Let's say that if I select "ALL" and then select the framework generation checkbox ".NET", will it filter the result that target all net7.0, net6.0 and net5.0?
If it only cares and calculates based on what specific TFMs have been selected. When the framework generation checkbox is selected, should we mark the checkbox as selected to all TFMs under it?
The ALL/ANY option only matters when multiple different checkboxes are selected (framework generation or TFM checkboxes). It does not affect how a single framework generation filter behaves. Regardless of whether the customer selects ALL or ANY for the Framework Filter Mode, selecting the .NET
checkbox will always imply that we show packages matching ANY of the TFMs within .NET
(i.e. net5.0
or net6.0
or net7.0
, etc.).
If someone selects ALL
+ .NET
+ net472
(also the current behavior before FrameworkFilterMode is added), we will show packages matching
('net5.0' or 'net6.0' or 'net7.0') AND 'net472'
If someone selects ANY
+ .NET
+ net472
, we will show packages matching
('net5.0' or 'net6.0' or 'net7.0') OR 'net472'
You're right that this could be confusing for customers seeing the new filters, so I'll look to call this out in the search docs before this feature goes live, and we'll address it in the blog for the feature too.
Addresses https://github.com/NuGet/Engineering/issues/5171
This change adds 2 new framework filter options to the search page:
true
/false
value (default istrue
). When this is set tofalse
, we filter packages only by their asset frameworks, and only show asset framework badges. When this is set totrue
, we filter packages by asset frameworks + computed frameworks, and we show both types of badges as well.All
andAny
(default isAll
). This affects cases when multiple framework or TFM filters are selected. When this is set toAll
, we will show packages matching all the framework and TFM filters. If it is set toAny
, we will show packages matching any one of the selected filters.The changes are behind a feature flag.
I ran Accessibility FastPass, and it didn't throw up any issues. I also checked color contrast for the new UI elements.
NOTE: I made an additional bug fix for the TFM badges in this PR. The TFM badges link to the frameworks tab on the package details page, but we weren't providing a package version, so the links sometimes took us to the wrong version's page. I've now fixed that.
Screenshots/Demos
Before vs. after
![image](https://github.com/NuGet/NuGetGallery/assets/82980589/06799f14-fbce-43d9-80ca-10ba068d0ce2) vs. (see top of the Frameworks filter section on the left) ![image](https://github.com/NuGet/NuGetGallery/assets/82980589/9350ef7d-ed72-45c7-b519-adfb90d8b237)Include computed frameworks demo
https://github.com/NuGet/NuGetGallery/assets/82980589/285752c9-eb6a-4609-ba9e-e225bbd18039Framework filter mode demo
https://github.com/NuGet/NuGetGallery/assets/82980589/08d0f892-ae5b-42f7-8917-92a9024bc0bb Info tooltip: ![image](https://github.com/NuGet/NuGetGallery/assets/82980589/d6841353-af3a-4c72-9c42-81d0dede62b6)Narrow/mobile screens
![image](https://github.com/NuGet/NuGetGallery/assets/82980589/aface9ca-e8c7-4348-a42d-5a7eb093de8a)