Feat: Allow users to adjust thumbnail size in the gallery
Describe the feature
Problem
The current PictoPy gallery does not provide an option to adjust thumbnail sizes.
When browsing through a large collection of photos, having control over the number of thumbnails displayed at once could make navigation more convenient. Smaller thumbnails would allow more photos to be viewed simultaneously, while larger thumbnails would make individual images easier to identify.
Adding a few layout options would make the gallery more flexible for different screen sizes and browsing preferences.
Proposed solution
Introduce a thumbnail size selector within the gallery, allowing users to switch between three layout options:
- Compact: Smaller thumbnails with reduced spacing, allowing more photos to fit on the screen.
- Comfortable: The default gallery layout, providing a balance between thumbnail size and spacing.
- Spacious: Larger thumbnails with increased spacing for easier visual browsing.
A small selector near the gallery heading, as illustrated in the attached mock-up, could provide access to these options.
Expected behaviour
- Users should be able to change the thumbnail size directly from the gallery.
- The gallery grid should adjust its column count and spacing according to the selected size.
- Image aspect ratios should be preserved, without stretching or distorting thumbnails.
- The layout should adapt appropriately when the application window is resized.
- The selected density should ideally persist across application restarts.
- Existing gallery interactions, including media selection, favouriting and opening images, should continue working as expected.
Technical approach
The feature can be implemented by extending the existing gallery layout rather than introducing a separate gallery component.
The selected density can be maintained as a gallery layout preference and used to control the grid's thumbnail dimensions, spacing and responsive column arrangement. If an existing application preference is available, it can be reused to retain the user's selection across sessions.
The implementation should also account for both image and video thumbnails and preserve the existing gallery interactions and responsive behaviour.
Is there an existing issue for this?
- [x] I have searched the existing issues and pull requests for similar functionality.
Add ScreenShots
Screenshots
Current behaviour: Screenshot of the existing PictoPy gallery without a thumbnail size selector.
Proposed UI: Mock-up illustrating the placement of the selector and the available thumbnail density options.
The attached design is intended as a reference for the proposed functionality. The final placement and styling can follow the project's existing UI conventions.
Record
- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue
👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)
⚠️ Potential Duplicate Issue (Semantic Match)
This issue appears semantically similar to the following issues in AOSSIE-Org/PictoPy:
-
Feat: Add toggle button to collapse sidebar and give more space for photos (#942, open) https://github.com/AOSSIE-Org/PictoPy/issues/942 Similarity: 64.2%
-
Add Instant Collage Generator for Quick and Creative Photo Layouts (#649, closed) https://github.com/AOSSIE-Org/PictoPy/issues/649 Similarity: 63%
-
Feat:Adding Vewing Size and Types (#995, open) https://github.com/AOSSIE-Org/PictoPy/issues/995 Similarity: 59%
Please review before proceeding.
Hi @rohan-pandeyy, I'd like to work on this issue.
I have an implementation ready locally and will wait for assignment before opening a PR:
- a "Thumbnail size" dropdown (Compact / Comfortable / Spacious) next to the existing sort control in the Home, Videos and Favourites headers, so images and videos are both covered
- Comfortable is the current layout, so the default view does not change
- the choice is persisted with the existing usePersistedSort hook
- unit tests for the hook, the dropdown and the grid sizes; lint, format and the full frontend suite pass
It does not touch Albums, Memories or search results. Could you please assign this to me?
Hey @ArnabOPP, I actually raised this issue with the intention of working on it myself, and I've already discussed it in the community channel and wanted to bring it up in the weekly meeting as well. I've also implemented the changes locally and am currently waiting for maintainer assignment before opening a PR. Sorry, but I'd like to continue working on this one. Hope you understand!