SabakiHQ / Sabaki

An elegant Go board and SGF editor for a more civilized age.
https://sabaki.yichuanshen.de/
MIT License
2.41k stars 377 forks source link

Interactive Thumbnails for File Managers #963

Open psygo opened 3 weeks ago

psygo commented 3 weeks ago

Much like many file managers enable PDF previews of before opening them, maybe we could have a thumbnail preview with Sabaki as well:

Screenshot 2024-10-18 at 12 13 42

I'm thinking about trying to do this myself, but I don't know where to start, since I don't know anything about Electron.

And another idea, which I believe others have suggested, would be to have a multi-game explorer within Sabaki as well, since exploring many games with dynamic images is way easier than through only file names. Sabaki does have a "Manage games" feature, but, as far as I understand, it's more like adding files into a single file, what I think would be more flexible would be to just explore many files.

AI Sensei's thumbnails are awesome for example, but it's annoying to have to upload things one by one, and they only have a very limited amount of filters, not to mention that the page crashes after a certain number of thumbnails for some reason.

Screenshot 2024-10-18 at 12 20 40
apetresc commented 3 weeks ago

There's two very different feature requests combined here.

For the first one, what you're looking for is called a Quick Look plugin, the Apple Developer Doc is here: https://developer.apple.com/documentation/quicklook. Electron doesn't really need to be involved here; it would just be a standalone implementation of the Quick Look plugin SDK that might use a WebView to render a Shudan board or something. Definitely doable. In fact, @imabuddha built something like that a long, long time ago, when macOS and the Quick Look API were brand new: https://github.com/imabuddha/SGF-Tools. Like that README says, it's unlikely to work any longer on recent versions of macOS. But if you wanted to take a crack at it, the QuickLookGenerator in that project would probably be a great starting point.

As for your second request, I agree it would be very cool. It's on my list of very nice-to-have long-term feature requests, but it's a big lift.