Add to-do list comments

This comes after several hours of attempting to implement what the first
line suggests. A join in this situation is quite difficult and the
importance of this feature does not outweigh the potentially high
resource use of any other possible solutions for making it happen.

For now, at least.
This commit is contained in:
Noi 2024-07-07 23:41:06 -07:00
parent 30ac9886d5
commit ee9e0b0444

View file

@ -21,7 +21,8 @@ public class TzAutocompleteHandler : AutocompleteHandler {
query = query.Where(u =>
EF.Functions.ILike(u.TimeZone!, $"%{input}%/%") || EF.Functions.ILike(u.TimeZone!, $"%/%{input}%"));
}
// TODO Should also find a way to include zones with counts of 0 for full completion (with a join, maybe)
// TODO Could find a way to include all remaining zones at the bottom of results for full completion
// TODO Filter out undesirable zone names, aliases, etc from autocompletion
var result = query.GroupBy(u => u.TimeZone)
.Select(g => new { ZoneName = g.Key, Count = g.Count() })
.OrderByDescending(x => x.Count)