Gifski icon indicating copy to clipboard operation
Gifski copied to clipboard

Rewrite parts of Gifski in SwiftUI

Open sindresorhus opened this issue 3 years ago • 4 comments

Some things that could independently be rewritten in SwiftUI:

  • [ ] The initial drop view.
  • [ ] Edit window (or smaller parts of it):
    • [x] File size estimate
    • [ ] Video player / trimmer
    • [ ] GIF settings
  • [ ] The conversion progress (should be much simpler to implement in SwiftUI)
  • [ ] Conversion completed screen
  • [ ] CheckerboardView (using SwiftUI.Canvas) (I have this one already done in another app. So I'll add it here when we can target macOS 12)

The priority is the editor view as it would be much simpler with SwiftUI.


This is not an easy issue and requires advanced Swift and SwiftUI knowledge.

sindresorhus avatar Jun 12 '21 17:06 sindresorhus

@sindresorhus - I've started playing with a rewrite of ConversionCompletedViewController in SwiftUI.

image

*rough layout preview

How perfect do you expect the layout to mirror the NSViewController / nib version of the UI? Some of the button styles used in the nib differ from the available SwiftUI styles.

ben-p-commits avatar Dec 01 '22 15:12 ben-p-commits

Nice! I would prefer if we could get as close as possible to the existing one, including animations.

As for the button styles at the top, I guess we could use https://github.com/siteline/SwiftUI-Introspect to set the correct style.

And don't miss subtle interactions like the Copy button state change on click, etc.

sindresorhus avatar Dec 01 '22 16:12 sindresorhus

By the way, I intend to target macOS 12 soon, so you can just set that as the target and use anything new there. It may make some things easier.

https://www.wwdcnotes.com/notes/wwdc21/10018/

sindresorhus avatar Dec 01 '22 16:12 sindresorhus

Oh excellent, that saves me some pain :)

ben-p-commits avatar Dec 02 '22 11:12 ben-p-commits