While list views are nice, sometimes you just want a grid 😄. Here, I played around with displaying images in a grid layout.
I'd even say that grids feel like a natural extension to the layouts in #231 🤓
I started this project a little while back, and am currently using the html panel as opposed to choice.html
. To support custom actions on selection (e.g. copy image filepath to clipboard on choice selection) within a grid context, I think that there is at least one missing piece.
Enable setting
className
/ styles of choice button parent container
In my example, I'm doing a self-described css injection to add new styles (e.g. .grid-cols-3 {grid-template-columns: repeat(3, minmax(0, 1fr))}
), but the styles probably could be done in-line.
lib/image-grid.js
view-desktop.js
view-attachments.js
view-downloads.js
Here are a few screenshots of the native Finder window on macOS 10.14 that I intended to recreate in low-fidelity.
Example search for `png` files on my Desktop | Sorting options |