gbif / portal-feedback

User feedback for the GBIF API, website and published data. You can ask questions here. 🗨❓
30 stars 16 forks source link

Sort images on occurrence page chronologically #4254

Open peterdesmet opened 1 year ago

peterdesmet commented 1 year ago

https://www.gbif.org/occurrence/3898672313 is an occurrence with 20 (camera trap) images that are taken sequentially (two sets of 10). On the page they appear in an order I cannot discern (is there any order applied?) It is not the order in which they appeared in the source data, which was chronologically.

I think it would be better if all images were sorted chronologically (ascending created) on occurrence pages. I am not sure how this will affect the order of images of e.g. iNaturalist observations (example: https://www.gbif.org/occurrence/3858854585) which all seem to get the timestamp of the observation.

Current order:

2022-01-11T04:39:09.000+00:00 9/10
2022-01-11T04:38:43.000+00:00 4/10
2022-01-11T04:39:05.000+00:00 3/10
2022-01-11T04:39:08.000+00:00 8/10
2022-01-11T04:39:05.000+00:00 2/10
2022-01-11T04:39:08.000+00:00 7/10
2022-01-11T04:38:46.000+00:00 8/10
2022-01-11T04:38:40.000+00:00 1/10
2022-01-11T04:39:07.000+00:00 5/10
2022-01-11T04:38:43.000+00:00 5/10
2022-01-11T04:39:07.000+00:00 6/10
2022-01-11T04:39:10.000+00:00 10/10
2022-01-11T04:38:42.000+00:00 3/10
2022-01-11T04:39:06.000+00:00 4/10
2022-01-11T04:38:44.000+00:00 6/10
2022-01-11T04:38:41.000+00:00 2/10
2022-01-11T04:38:45.000+00:00 7/10
2022-01-11T04:39:04.000+00:00 1/10
2022-01-11T04:38:47.000+00:00 9/10
2022-01-11T04:38:47.000+00:00 10/10
MortenHofft commented 1 year ago

The ordering on the website is that of the API response. I would prefer to respect the order in which they are provided.

But we could also sort on date if provided. I just imagine that sooner or later that will be wrong, and e.g. show a specimen label before the object. For galleries we just take the first image, it would also be nice if I didn't have to sort those as well, but could just count on the ordering in the API, which would be controlled by the dataset.

peterdesmet commented 1 year ago

I would prefer to respect the order in which they are provided.

But the API currently doesn't respect the order in which the images are provided at the source, or does it?

MortenHofft commented 1 year ago

I haven't checked, but from what you say it sounds like it doesn't no. So I've labelled this an interpretation issue. If the conclusion is that it isn't possible to keep the ordering for some reason, then we can revisit the UI solution instead. At least that was my thinking.

NB the fragment isn't sorted by time either https://api.gbif.org/v1/occurrence/3898672313/fragment

UPDATE: I've checked the archive and the multimedia extension provides them sorted.

peterdesmet commented 1 year ago

@muttcg this is the issue we discussed.