Subject: bug#71180: [ELPA Feature Request] Package thumbnail

From: Philip Kaludercic <[email-masked]>
Date: Tue, 28 May 2024 06:21:28 +0000

"Elijah G." <[email-masked]> writes:

> Philip Kaludercic <[email-masked]> writes:
>
>> Stefan Kangas <[email-masked]> writes:
>>
>>> tags 71180 - notabug
>>> severity 71180 wishlist
>>> thanks
>>>
>>> "Elijah G." <[email-masked]> writes:
>>>
>>>> Tags: notabug
>>>>
>>>> Hi, i'm wondering if would be a good idea add support for thumbnail for
>>>> elpa packages (for elpa website and package-menu *Help* buffers).
>>>> I think this is a missing feature that most other editors and non-editors
>>>> does (such as synaptic and vscodium).
>>
>> I am not sure if you mean this as a kind of "logo" or as a kind of
>> screenshot?  I assume you mean the latter.
>
> I meant a screenshot.
>
>>>> My idea is to only support 1 image (jpg or png, adding more than 1
>>>> thumbnail would be hard to read the package *Help* buffer) and resize it
>>>> (if possible) for not take all the buffer size.
>>>>
>>>> For packages developers i think would be fine define new header comment
>>>> line for let them to choose which image they want to use, something like:
>>>> ;;; Thumbnail: ./image.png
>>
>> If anything, I think it would be best to mandate SVG, which after all we
>> can easily generate using (x-export-frames nil 'svg), if supported.
>> That should solve the scaling issue.  AFAIK we currently don't support
>> animated SVGs in Emacs, right?  That might be a nice feature for some
>> packages.
>
> About animated screenshot/thumbnail i think that GIF images fits
> better with this.

The issue is that .gif is still a bitmap format, so we wouldn't have the
advantage of scaling that vector graphics give us.

As this is a feature that would only be added in a future version of
Emacs, we could start another feature request to support SVG animations
as well, perhaps even a way to record Emacs into such a animation.

See https://en.wikipedia.org/wiki/SVG_animation for a few examples.

>> Two points I am not fond of is that screenshots on sites like GitHub are
>> often not uniform and contain a lot of noise.  It would be nice if we
>> could give some guidelines, or better yet generate the screenshots
>> ourselves from a given sequence of keys.  That might not be nice from a
>> security or performance perspective and could still be circumvented.
>
> I agree about a guideline.

It might even be worth considering restricting screenshots to GNU ELPA
packages, so that the guidelines can be enforced more effectively.

>> If we are talking about screenshots, that these aren't hard
>> requirements to understand what a package does, just as describe-package
>> can do its job now without the help of images.  Visual examples should
>> be regarded as an enchantment, where they make sense.
>
> Of course, the screenshot would be something optional, allowing
> packages add a screenshot/thumbnail would make more easy watch what does
> a package or what can do a package (instead going to their repository or
> read its description).
>
> Here is a little mockup how i think it would look like in
> package-describe *Help* buffer

That seems like the screenshot is part of the README file?  I would have
imagined them before or after the file, perhaps even in a different buffer.

> x

-- 
	Philip Kaludercic on peregrine