File tree Expand file tree Collapse file tree 6 files changed +16
-28
lines changed Expand file tree Collapse file tree 6 files changed +16
-28
lines changed Original file line number Diff line number Diff line change @@ -84,18 +84,11 @@ class SortDict {
84
84
85
85
final _sortDicts = const < SortDict > [
86
86
SortDict (
87
- id: 'listing_relevance ' ,
88
- label: 'listing relevance ' ,
87
+ id: 'default_ranking ' ,
88
+ label: 'default ranking ' ,
89
89
tooltip:
90
90
'Packages are sorted by the combination of their overall score and '
91
- 'their specificity to the selected platform.' ,
92
- ),
93
- SortDict (
94
- id: 'search_relevance' ,
95
- label: 'search relevance' ,
96
- tooltip:
97
- 'Packages are sorted by the combination of the text match, '
98
- 'their overall score and their specificity to the selected platform.' ,
91
+ 'their relevance to matching the search query text.' ,
99
92
),
100
93
SortDict (
101
94
id: 'top' ,
@@ -134,7 +127,4 @@ final _sortDicts = const <SortDict>[
134
127
),
135
128
];
136
129
137
- List <SortDict > getSortDicts (bool isSearch) {
138
- final removeId = isSearch ? 'listing_relevance' : 'search_relevance' ;
139
- return _sortDicts.where ((d) => d.id != removeId).toList ();
140
- }
130
+ List <SortDict > getSortDicts () => _sortDicts;
Original file line number Diff line number Diff line change @@ -90,10 +90,8 @@ d.Node listingInfo({
90
90
}
91
91
92
92
d.Node _renderSortControl (SearchForm form) {
93
- final isSearch = form.hasQuery;
94
- final options = getSortDicts (isSearch);
95
- final sortValue =
96
- form.order? .name ?? (isSearch ? 'search_relevance' : 'listing_relevance' );
93
+ final options = getSortDicts ();
94
+ final sortValue = form.order? .name ?? 'default_ranking' ;
97
95
final selected = options.firstWhere (
98
96
(o) => o.id == sortValue,
99
97
orElse: () => options.first,
Original file line number Diff line number Diff line change @@ -415,12 +415,12 @@ <h3 class="search-form-section-header foldable-button">
415
415
packages
416
416
</ div >
417
417
< div class ="sort-control hoverable ">
418
- < div class ="info-identifier " title ="Packages are sorted by the combination of the text match, their overall score and their specificity to the selected platform . ">
418
+ < div class ="info-identifier " title ="Packages are sorted by the combination of their overall score and their relevance to matching the search query text . ">
419
419
Sort by
420
- < button class ="sort-control-selected "> search relevance </ button >
420
+ < button class ="sort-control-selected "> default ranking </ button >
421
421
</ div >
422
422
< div class ="sort-control-popup ">
423
- < button class ="sort-control-option selected " data-value ="search_relevance " > search relevance </ button >
423
+ < button class ="sort-control-option selected " data-value ="default_ranking " > default ranking </ button >
424
424
< button class ="sort-control-option " data-value ="top "> overall score</ button >
425
425
< button class ="sort-control-option " data-value ="updated "> recently updated</ button >
426
426
< button class ="sort-control-option " data-value ="created "> newest package</ button >
Original file line number Diff line number Diff line change @@ -169,12 +169,12 @@ <h1 class="title pub-monochrome-icon-hoverable">example.com</h1>
169
169
< code > example.com</ code >
170
170
</ div >
171
171
< div class ="sort-control hoverable ">
172
- < div class ="info-identifier " title ="Packages are sorted by the combination of their overall score and their specificity to the selected platform . ">
172
+ < div class ="info-identifier " title ="Packages are sorted by the combination of their overall score and their relevance to matching the search query text . ">
173
173
Sort by
174
- < button class ="sort-control-selected "> listing relevance </ button >
174
+ < button class ="sort-control-selected "> default ranking </ button >
175
175
</ div >
176
176
< div class ="sort-control-popup ">
177
- < button class ="sort-control-option selected " data-value ="listing_relevance " > listing relevance </ button >
177
+ < button class ="sort-control-option selected " data-value ="default_ranking " > default ranking </ button >
178
178
< button class ="sort-control-option " data-value ="top "> overall score</ button >
179
179
< button class ="sort-control-option " data-value ="updated "> recently updated</ button >
180
180
< button class ="sort-control-option " data-value ="created "> newest package</ button >
Original file line number Diff line number Diff line change @@ -169,12 +169,12 @@ <h1 class="title pub-monochrome-icon-hoverable">example.com</h1>
169
169
< code > example.com</ code >
170
170
</ div >
171
171
< div class ="sort-control hoverable ">
172
- < div class ="info-identifier " title ="Packages are sorted by the combination of their overall score and their specificity to the selected platform . ">
172
+ < div class ="info-identifier " title ="Packages are sorted by the combination of their overall score and their relevance to matching the search query text . ">
173
173
Sort by
174
- < button class ="sort-control-selected "> listing relevance </ button >
174
+ < button class ="sort-control-selected "> default ranking </ button >
175
175
</ div >
176
176
< div class ="sort-control-popup ">
177
- < button class ="sort-control-option selected " data-value ="listing_relevance " > listing relevance </ button >
177
+ < button class ="sort-control-option selected " data-value ="default_ranking " > default ranking </ button >
178
178
< button class ="sort-control-option " data-value ="top "> overall score</ button >
179
179
< button class ="sort-control-option " data-value ="updated "> recently updated</ button >
180
180
< button class ="sort-control-option " data-value ="created "> newest package</ button >
Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ <h3 class="search-form-section-header foldable-button">
421
421
< button class ="sort-control-selected "> overall score</ button >
422
422
</ div >
423
423
< div class ="sort-control-popup ">
424
- < button class ="sort-control-option " data-value ="search_relevance " > search relevance </ button >
424
+ < button class ="sort-control-option " data-value ="default_ranking " > default ranking </ button >
425
425
< button class ="sort-control-option selected " data-value ="top "> overall score</ button >
426
426
< button class ="sort-control-option " data-value ="updated "> recently updated</ button >
427
427
< button class ="sort-control-option " data-value ="created "> newest package</ button >
You can’t perform that action at this time.
0 commit comments