falling-fruit / falling-fruit-web

Mobile-friendly website for Falling Fruit
https://beta.fallingfruit.org
GNU General Public License v3.0
32 stars 14 forks source link

Sort types in dropdown by taxonomic rank #353

Closed ezwelty closed 1 week ago

ezwelty commented 1 year ago

Types in the location form dropdown are currently sorted by type.id, which results in a very arbitrary order. They should be ordered in the same way as they are in the type filter: by descending scientific name, then by ascending taxonomic rank (from broader to more specific).

wbazant commented 2 months ago

I implemented the issue as proposed , and also displayed types with scientific names ahead of ones without scientific names.

Searching for 'Apple': Screenshot from 2024-07-29 15-13-45 could be further improved because there are lots of options, but going through the taxonomy in the alphabetic order now at least makes sense.

We could try intelligent matching - e.g. prefix match before substring match - or checkboxes that filter down the options provided.

The proposal to render a tree of matches is also good, see #230

wbazant commented 2 months ago

I'm doing some more work on the types - moving them to their own redux slice - and then in the client code I'll want to use the same reference data between the dropdown in location form and the filter.

wbazant commented 1 week ago

This is working as proposed, but not super satisfying to scroll through the flat list, especially when there are many cultivars. #230 worth trying!