Skip to content

Commit 55ead99

Browse files
authored
Cleanup experimental flag: trending. (#8916)
1 parent 8497684 commit 55ead99

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

app/lib/frontend/handlers/experimental.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ class ExperimentalFlags {
9595

9696
bool get useSearchPost => isEnabled('search-post');
9797

98-
bool get showTrending => true;
99-
10098
String encodedAsCookie() => _enabled.join(':');
10199

102100
@override

app/lib/frontend/templates/_consts.dart

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'package:_pub_shared/search/tags.dart';
6-
import 'package:pub_dev/frontend/request_context.dart';
76

87
import '../dom/dom.dart' as d;
98

@@ -119,16 +118,13 @@ final _sortDicts = const <SortDict>[
119118
id: 'downloads',
120119
label: 'downloads',
121120
tooltip: 'Packages are sorted by their download counts.'),
121+
SortDict(
122+
id: 'trending',
123+
label: 'trending',
124+
tooltip: 'Packages are sorted by trending.'),
122125
];
123126

124127
List<SortDict> getSortDicts(bool isSearch) {
125128
final removeId = isSearch ? 'listing_relevance' : 'search_relevance';
126-
return <SortDict>[
127-
..._sortDicts.where((d) => d.id != removeId),
128-
if (requestContext.experimentalFlags.showTrending)
129-
SortDict(
130-
id: 'trending',
131-
label: 'trending',
132-
tooltip: 'Packages are sorted by trending.'),
133-
];
129+
return _sortDicts.where((d) => d.id != removeId).toList();
134130
}

0 commit comments

Comments
 (0)