From 11647827ecdb8d11f46aa626e519661f953a0f17 Mon Sep 17 00:00:00 2001 From: Advay Tandon Date: Mon, 13 Mar 2023 16:35:34 -0700 Subject: [PATCH 1/4] tags break line: attempt 1 --- .../Controllers/PackagesController.cs | 5 ++++- .../Scripts/gallery/page-list-packages.js | 4 ++++ .../Views/Shared/ListPackages.cshtml | 3 ++- .../Views/Shared/_ListPackage.cshtml | 16 +++++++++------- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/NuGetGallery/Controllers/PackagesController.cs b/src/NuGetGallery/Controllers/PackagesController.cs index 3713e05bf0..091e218e02 100644 --- a/src/NuGetGallery/Controllers/PackagesController.cs +++ b/src/NuGetGallery/Controllers/PackagesController.cs @@ -1264,7 +1264,7 @@ public virtual async Task ListPackages(PackageListSearchViewModel var isFrameworkFilteringEnabled = _featureFlagService.IsFrameworkFilteringEnabled(GetCurrentUser()); // If advanced search is disabled, use the default experience - if (!isAdvancedSearchFlightEnabled || !searchService.SupportsAdvancedSearch) + if ((!isAdvancedSearchFlightEnabled || !searchService.SupportsAdvancedSearch) && false) { searchAndListModel.SortBy = GalleryConstants.SearchSortNames.Relevance; searchAndListModel.Frameworks = string.Empty; @@ -1368,6 +1368,9 @@ public virtual async Task ListPackages(PackageListSearchViewModel viewModel.IsAdvancedSearchFlightEnabled = searchService.SupportsAdvancedSearch && isAdvancedSearchFlightEnabled; viewModel.IsFrameworkFilteringEnabled = isFrameworkFilteringEnabled; + viewModel.IsAdvancedSearchFlightEnabled = true; + viewModel.IsFrameworkFilteringEnabled = true; + ViewBag.SearchTerm = q; return View(viewModel); diff --git a/src/NuGetGallery/Scripts/gallery/page-list-packages.js b/src/NuGetGallery/Scripts/gallery/page-list-packages.js index 921ab411e5..640c76ca60 100644 --- a/src/NuGetGallery/Scripts/gallery/page-list-packages.js +++ b/src/NuGetGallery/Scripts/gallery/page-list-packages.js @@ -53,10 +53,14 @@ $(function() { expandButton.classList.toggle('ms-Icon--ChevronUp'); if (this.classList.contains('active')) { + this.setAttribute("aria-expanded", "true"); + dataTab.style.display = 'block'; dataTab.style.maxHeight = dataTab.scrollHeight + "px"; } else { + this.setAttribute("aria-expanded", "false"); + dataTab.style.display = 'none'; dataTab.style.maxHeight = 0; } diff --git a/src/NuGetGallery/Views/Shared/ListPackages.cshtml b/src/NuGetGallery/Views/Shared/ListPackages.cshtml index 0955cb1a64..294e771d32 100644 --- a/src/NuGetGallery/Views/Shared/ListPackages.cshtml +++ b/src/NuGetGallery/Views/Shared/ListPackages.cshtml @@ -27,7 +27,8 @@
-
diff --git a/src/NuGetGallery/Views/Shared/_ListPackage.cshtml b/src/NuGetGallery/Views/Shared/_ListPackage.cshtml index fa616e8fc7..9e0a563503 100644 --- a/src/NuGetGallery/Views/Shared/_ListPackage.cshtml +++ b/src/NuGetGallery/Views/Shared/_ListPackage.cshtml @@ -40,8 +40,8 @@ href="@Url.Package(Model.Id, Model.UseVersion ? Model.Version : null).TrimEnd('/')" @if (itemIndex.HasValue) { - @:data-track="@eventName" data-track-value="@itemIndex" - @:data-package-id="@Model.Id" data-package-version="@Model.Version" data-use-version="@Model.UseVersion" + @:data-track="@eventName" data-track-value="@itemIndex" + @:data-package-id="@Model.Id" data-package-version="@Model.Version" data-use-version="@Model.UseVersion" } >@Html.BreakWord(Model.Id) @@ -91,9 +91,10 @@ Latest version: @Model.Version @(Model.Prerelease ? "(prerelease)" : "") - @if (Model.Tags.AnySafe()) - { -
+ + @if (Model.Tags.AnySafe()) + { +
  • @@ -120,8 +121,9 @@ }
  • - } -
+ + } +
@Model.ShortDescription From c55624a26f9230f6b52245141353272af5dfb328 Mon Sep 17 00:00:00 2001 From: Advay Tandon Date: Tue, 14 Mar 2023 12:45:13 -0700 Subject: [PATCH 2/4] fixed tags on next line --- src/Bootstrap/dist/css/bootstrap-theme.css | 4 ++++ src/Bootstrap/less/theme/base.less | 5 +++++ src/NuGetGallery/Views/Shared/_ListPackage.cshtml | 11 ++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Bootstrap/dist/css/bootstrap-theme.css b/src/Bootstrap/dist/css/bootstrap-theme.css index ec31f56cea..1aefc9923c 100644 --- a/src/Bootstrap/dist/css/bootstrap-theme.css +++ b/src/Bootstrap/dist/css/bootstrap-theme.css @@ -274,6 +274,9 @@ img.reserved-indicator-icon { outline: solid 0.25px; outline-offset: 0; } +.package-list li .package-tags { + display: block; +} @media (min-width: 768px) { .package-list li { display: inline-block; @@ -283,6 +286,7 @@ img.reserved-indicator-icon { padding-right: 10px; } .package-list li.package-tags { + display: block; overflow-y: visible; } } diff --git a/src/Bootstrap/less/theme/base.less b/src/Bootstrap/less/theme/base.less index 6daa2fb05e..68a2a3e921 100644 --- a/src/Bootstrap/less/theme/base.less +++ b/src/Bootstrap/less/theme/base.less @@ -357,6 +357,10 @@ img.reserved-indicator-icon { outline-offset: 0; } } + + .package-tags { + display: block; + } } @media (min-width: @screen-sm-min) { @@ -369,6 +373,7 @@ img.reserved-indicator-icon { } li.package-tags { + display: block; overflow-y: visible; } } diff --git a/src/NuGetGallery/Views/Shared/_ListPackage.cshtml b/src/NuGetGallery/Views/Shared/_ListPackage.cshtml index 9e0a563503..e5ee0838a8 100644 --- a/src/NuGetGallery/Views/Shared/_ListPackage.cshtml +++ b/src/NuGetGallery/Views/Shared/_ListPackage.cshtml @@ -91,10 +91,8 @@ Latest version: @Model.Version @(Model.Prerelease ? "(prerelease)" : "") - - @if (Model.Tags.AnySafe()) - { -
    + @if (Model.Tags.AnySafe()) + {
  • @@ -121,9 +119,8 @@ }
  • -
- } - + } +
@Model.ShortDescription From 384d9ef49764ae2c3da09f4a9bcfc4893d66f481 Mon Sep 17 00:00:00 2001 From: Advay Tandon Date: Tue, 14 Mar 2023 13:55:02 -0700 Subject: [PATCH 3/4] removed dev configs --- src/NuGetGallery/Controllers/PackagesController.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/NuGetGallery/Controllers/PackagesController.cs b/src/NuGetGallery/Controllers/PackagesController.cs index 091e218e02..3713e05bf0 100644 --- a/src/NuGetGallery/Controllers/PackagesController.cs +++ b/src/NuGetGallery/Controllers/PackagesController.cs @@ -1264,7 +1264,7 @@ public virtual async Task ListPackages(PackageListSearchViewModel var isFrameworkFilteringEnabled = _featureFlagService.IsFrameworkFilteringEnabled(GetCurrentUser()); // If advanced search is disabled, use the default experience - if ((!isAdvancedSearchFlightEnabled || !searchService.SupportsAdvancedSearch) && false) + if (!isAdvancedSearchFlightEnabled || !searchService.SupportsAdvancedSearch) { searchAndListModel.SortBy = GalleryConstants.SearchSortNames.Relevance; searchAndListModel.Frameworks = string.Empty; @@ -1368,9 +1368,6 @@ public virtual async Task ListPackages(PackageListSearchViewModel viewModel.IsAdvancedSearchFlightEnabled = searchService.SupportsAdvancedSearch && isAdvancedSearchFlightEnabled; viewModel.IsFrameworkFilteringEnabled = isFrameworkFilteringEnabled; - viewModel.IsAdvancedSearchFlightEnabled = true; - viewModel.IsFrameworkFilteringEnabled = true; - ViewBag.SearchTerm = q; return View(viewModel); From 7c03539568304aa735f3fb365256d29428bc4e87 Mon Sep 17 00:00:00 2001 From: Advay Tandon Date: Wed, 15 Mar 2023 12:35:38 -0700 Subject: [PATCH 4/4] smaller screens didn't need fixing in the first place --- src/Bootstrap/dist/css/bootstrap-theme.css | 3 --- src/Bootstrap/less/theme/base.less | 4 ---- 2 files changed, 7 deletions(-) diff --git a/src/Bootstrap/dist/css/bootstrap-theme.css b/src/Bootstrap/dist/css/bootstrap-theme.css index 1aefc9923c..1ab92c7f02 100644 --- a/src/Bootstrap/dist/css/bootstrap-theme.css +++ b/src/Bootstrap/dist/css/bootstrap-theme.css @@ -274,9 +274,6 @@ img.reserved-indicator-icon { outline: solid 0.25px; outline-offset: 0; } -.package-list li .package-tags { - display: block; -} @media (min-width: 768px) { .package-list li { display: inline-block; diff --git a/src/Bootstrap/less/theme/base.less b/src/Bootstrap/less/theme/base.less index 68a2a3e921..3d40691baa 100644 --- a/src/Bootstrap/less/theme/base.less +++ b/src/Bootstrap/less/theme/base.less @@ -357,10 +357,6 @@ img.reserved-indicator-icon { outline-offset: 0; } } - - .package-tags { - display: block; - } } @media (min-width: @screen-sm-min) {