the-me-0 / gallery

A gallery web app, with similar technologies as my last project Groove (NextJS)
1 stars 0 forks source link

Footer is ugly #5

Closed the-me-0 closed 4 weeks ago

the-me-0 commented 4 months ago

When the image batch contains a few portrait resources, and we turn on the column layout preference ON, we can end up with a footer all messed-up. Some columns are a lot longer than others.

Imagine 10 photos that have to be displayed in 3 columns, gallery will display them this way : | 1 | 2 | 3 | | 4 | 5 | 6 | | 7 | 8 | 9 | | 10 | | | The first column will end up longer than the others, creating a huge void between the footer and the other columns (not even talking about the photos height that can make it even worse in column layout).

2 choices come to mind here :

the-me-0 commented 4 weeks ago

Fixed the issue in some way. Added a "distributeImagesInColumns" function in the ResourcesColumn component, responsible for making the columns more equivalent in size, and therefore improving the footer. The final result could be improved by sorting the images by size before feeding them to the function, but doing so would shuffle them. We'll have to accept this result until a better solution is found.