geonetwork / geonetwork-ui

GeoNetwork UI is a suite of Applications made to provide a modern facade to your GeoNetwork 4 catalog. It also provides Web Components to embed various parts of your data catalog in third party websites.
https://geonetwork.github.io/geonetwork-ui/main/docs/
GNU General Public License v2.0
65 stars 32 forks source link

[datahub] sort datasets by title #470

Open alexarobu opened 1 year ago

alexarobu commented 1 year ago

At the moment you can only sort the search results (i.e. datasets) by Relevancy, Last updates or Popularity. Quite a common sort option is the title (i.e. sorting the results in alphabetical order). Would it be possible to have that added in?

image

jahow commented 1 year ago

The sort options could absolutely be made configurable. They are currently hardcoded here: https://github.com/geonetwork/geonetwork-ui/blob/main/libs/feature/search/src/lib/sort-by/sort-by.component.ts

On the other hand, please note that sorting records by name might be a bit counter-intuitive as there are no real pagination for the search results, but instead a "show more" option. So reaching the last records this way might be combersome.

alexarobu commented 1 year ago

I see what you mean, but presumably, a user wouldn't just want to reach the last record without any filtering or search term so it would mean that the list of records is already reduced I think.

I had a play with https://github.com/geonetwork/geonetwork-ui/blob/main/libs/feature/search/src/lib/sort-by/sort-by.component.ts sometime ago, but the best I could make it do was to sort alphabetically but in reverse (so from Z to A)- which as you can tell is close, but not quite the result I was after :joy:

jahow commented 1 year ago

Strange! but yes definitely an interesting feature. Please ask here or open a discussion on Github if you need pointers or opinions before implementing something.