redditbooru / reddit-booru

An aggregator that takes images from various subreddits and wraps a nice interface around them with advanced search features.
54 stars 10 forks source link

Large vertical images in galleries #39

Open ys-chung opened 7 years ago

ys-chung commented 7 years ago

Currently in a gallery, if the height of an image is larger than the height of the viewport, it is not scaled, meaning that the user have to scroll to view the entire image, and the image can never be viewed in its entirety on the screen.

redditbooru-before

I propose scaling those images in CSS, or other methods, such that the user can see the entire image at once, without scrolling.

redditbooru-after

ys-chung commented 7 years ago

For comic strips, I propose using server-side scripts or client-side JavaScript to detect the aspect ratio of the image. Such that if the aspect ratio of the image is detected to be smaller than a certain value, then the CSS property or the selected method of scaling would not be applied in that case.

dxprog commented 7 years ago

Commit 8a10fff adds this functionality in a somewhat rudimentary fashion. I'd appreciate it if you could test it out and give me feedback: http://beta.redditbooru.com/gallery/9856/

ys-chung commented 7 years ago

Other than I noticed that the first image is too close to the line of text containing the curator's name, I think the problem I noticed before is solved.

However, IMHO the "expanded images" button might not be accessible to new users because it's not particularly noticeable at the bottom right corner.

Maybe before the images there could be a line of text saying how many images there are in the gallery, and the button could be placed there instead? But I'm not sure that you want to deal with this in this issue though.

dxprog commented 7 years ago

Yeah, the presentation needs cleaning up for sure. I wanted to get feedback on the interaction before I went much further. It was shockingly more complex to get this working than I'd have thought, making me realize that the whole stack is a mess.

To the point of album numbers, that's something that I've been meaning to add back for a while (redditbooru v1 had that). I'll go ahead and open up a new ticket for that since it is a separate issue.

I'll get the presentation cleaned up tonight and ping you again for feedback if you're willing. Thanks!

ys-chung commented 7 years ago

Sure