swiftDialog icon indicating copy to clipboard operation
swiftDialog copied to clipboard

GIF Support

Open WardsParadox opened this issue 2 years ago • 8 comments

Is your feature request related to a problem? Please describe. Problem, no, but Dialog does not support GIFs as images or inline.

Describe the solution you'd like I would like to create a walkthrough for . Referencing a repeating gif to help demonstrate the actions would improve the workflow significantly.

Describe alternatives you've considered N/A

Additional context GIFs load only the first frame of the image currently.

WardsParadox avatar Jun 14 '23 15:06 WardsParadox

you can kinda get around this by using --webcontent file:///path/to/image.gif with will display the gif with any --message content above it and user input below but that's probably not what you're after.

image

(http:// sources for gifs also works)

bartreardon avatar Jun 15 '23 08:06 bartreardon

just for fun dialog --title "Test" --icon sf=photo.artframe --message "This is a GIF test" --webcontent https://i0.wp.com/www.printmag.com/wp-content/uploads/2021/02/4cbe8d_f1ed2800a49649848102c68fc5a66e53mv2.gif --height 462 --width 676 --textfield Test

bartreardon avatar Jun 15 '23 08:06 bartreardon

Hmm. actually. Hang on one second to test that.

WardsParadox avatar Jun 15 '23 16:06 WardsParadox

So interestingly...adding it as webcontent + width makes it fail to display the entire dialog window on Sonoma beta 1 😆

That could work, but ideally I think adding gif support to image would be better. Then we get all the benefits and controls of image + gif support. Long term goal.

WardsParadox avatar Jun 15 '23 16:06 WardsParadox

yeah, that was what I assumed you wanted. It's been on the todo for a bit. Sorting that out would allow for gif icons as well but looks like I'll have to add it in using a package, no native support that I can tell.

I also tried inline images using markdown (works for http sources, not file:// and it does the same thing as --image only displaying the first frame...at least in v1 of the markdoewnUI package. haven't tested v2 (which will be in swiftdialog 2.3 and requires macos 12+)

Interesting bug in Sonoma - will have to try that one out.

bartreardon avatar Jun 16 '23 00:06 bartreardon

I had the smart idea to use a webview to display gifs instead of needing to import a whole framework. Works fine but doesn't re-size to fit the dimensions of the gif.

Just commenting to let you know this is still something I'm looking at.

bartreardon avatar Aug 24 '23 00:08 bartreardon

Appreciate it as always :)

WardsParadox avatar Aug 24 '23 16:08 WardsParadox

I'd love it if i could have the bell ring.....

/usr/local/bin/dialog --title "Warning" \ --message "Warning: Someone's Avid has just ingested media into $FOLDER_PATH/MXF/$SUBFOLDER, please check your media creation settings.<br><br> Reminder that this message will repeat every 15 mins until the Avid folders on TARS are removed." \ --icon "https://media.tenor.com/5t7dwIkeSioAAAAM/shame-bell.gif" \ --button1text "OK" \ --ontop \ --bannerheight 40 \ --bannerimage colour=red

Image

starlord1980 avatar Apr 02 '25 14:04 starlord1980