Piwigo / Piwigo-Android

Piwigo Native Android App
GNU General Public License v3.0
140 stars 43 forks source link

Sorting of images and categories #90

Open ramack opened 5 years ago

ramack commented 5 years ago

Currently images are viewed in order as the piwigo server delivers them, while categories are sorted by global_rank.

We should have a possibility to select the sort ordering with at least ascending/descending for "rank", "alphabetical", "photo captured" and "photo published" with some nice UI in the album toolbar. Maybe best is just an always visible sorting icon and a popup dialog asking the two questions.

Shall this be a global setting or remembered per album? @plegall is there a way to find out the setting on the piwigo server for that album via rest? And is the server returning the lists already sorted according the server settings? @EddyLB how is it handled in the iOS app?

@all: how important is this? I propose to assign it to Release 1.2.0 for now, as I personally see it as not so important but I'm open for other opinions.

EddyLB commented 5 years ago

In the iOS app, (thumbnails of) images are sorted according to the default sort option chosen in the Preferences section (screenshots below). Categories are presented in the order the server delivers them. If the user changes the order in which he/she wants to present albums, a pull down refresh in the iOS app adopts that order.

To my knowledge, there is currently no way to get the settings adopted on the web interface. @plegall can you please tell us more? in particular on global_rank?

defaultsortoption4albums1

defaultsortoption4albums2

radass1996 commented 4 years ago

Hi @ramack , i want to contribute on this project and try to fix this issue. I am new to GitHub so can you just assign me to this Issue or how it works ? Thanks

ramack commented 4 years ago

This is great news. Welcome here! Do you already have some idea how you want to solve the sorting? What I have in mind is quite advanced and will require a major redesign to fetch the gallery content through a local repository that caches the data and refreshes itself from the server when needed. That is also the reason why we shifted it to release 1.2 for now. If you come up with something simpler that works already now it.would be quite cool and I'd be happy if we can include it earlier.

For now we are also missing a setting activity to configure the default setting #44 and a way to store configuration depend on the album (this does not even have a ticket yet). Both look like preconditions to do a proper sorting implementation.

Personally I am not a fan of big bang changes, so maybe you want to try one of those two topic first to have a smaller task to start with and I think it is good practice to discuss a technical solution before investing too much time into a direction that doesn't fit into what we plan to for the next time. - we also don't expect a fully polished pull request from you that is directly mergable, but are happy to see early tries and are happy to comment on it before finalization. Please mark the PR in that case as WIP.

Looking forward to read your proposals of how you plan to implement this and maybe what kind of timeline you believe this could be done.

Edit: forgot to say: in case of any questions don't hesitate to ask we are willing to help out, but please don't expect immediate answers and ping us in case it takes too long.

radass1996 commented 4 years ago

Ok, so it will be better to do #44 activity first. Can i pick this issue first ?