@@ -6,7 +6,6 @@ import 'dart:math';
66
77import 'package:_pub_shared/search/search_form.dart' ;
88import 'package:collection/collection.dart' ;
9- import 'package:pub_dev/frontend/request_context.dart' ;
109
1110import '../../package/search_adapter.dart' ;
1211import '../../search/search_service.dart' ;
@@ -52,9 +51,6 @@ String renderPkgIndexPage(
5251 messageFromBackend: searchResultPage.errorMessage,
5352 ),
5453 nameMatches: _nameMatches (searchForm, searchResultPage.nameMatches),
55- topicMatches: requestContext.experimentalFlags.isSearchTopicsEnabled
56- ? _topicMatches (searchForm, searchResultPage.topicMatches)
57- : null ,
5854 packageList: packageList (searchResultPage),
5955 pagination: searchResultPage.hasHit ? paginationNode (links) : null ,
6056 openSections: openSections,
@@ -151,24 +147,3 @@ d.Node? _nameMatches(SearchForm form, List<String>? matches) {
151147 }),
152148 ]);
153149}
154-
155- d.Node ? _topicMatches (SearchForm form, List <String >? matches) {
156- if (matches == null || matches.isEmpty) {
157- return null ;
158- }
159- final singular = matches.length == 1 ;
160- final isExactNameMatch = singular && form.parsedQuery.text == matches.single;
161- final nameMatchLabel = isExactNameMatch
162- ? 'Exact topic match: '
163- : 'Matching ${singular ? 'topic' : 'topics' }: ' ;
164-
165- return d.p (children: [
166- d.text (nameMatchLabel),
167- ...matches.expandIndexed ((i, name) {
168- return [
169- if (i > 0 ) d.text (', ' ),
170- d.a (href: urls.searchUrl (q: 'topic:$name ' ), text: '#$name ' ),
171- ];
172- }),
173- ]);
174- }
0 commit comments