
Show HN: I made an elegant SwiftUI timeline - thasian
https://github.com/ThasianX/ElegantTimeline-SwiftUI
======
ComputerGuru
FYI you can use ffmpeg to encode gif as h264/h265 mp4 videos of varying
quality or convert to webm which can be played from an img tag, all of which
will be orders of magnitude smaller.

Simplest form: ffmpeg -i foo.gif -c:v libx264 -crf 22 foo.mp4

You can vary crf to change the size to quality trade-off.

~~~
thasian
I've replaced most of the gifs with embedded videos. Page loading size is
around ~100 mb now

~~~
chrismorgan
That’s still _very_ unreasonably large and is going to cause real problems for
some users, though not as many (and is still going to be uselessly slow to
load for many—much of the world, including where large numbers of developers,
even SwiftUI developers, are, doesn’t have multi-megabit-per-second speeds).
Look, even 20MB is too large. Please, I beg you, just don’t put any GIFs on
that page: just make it clear that it’s a video, e.g. by overlaying a circled
play icon on the image and making it a link to the relevant video on YouTube.

------
OzzyB
Very nice!

I know you want to show off the buttery smoothness of your animations, but do
you really need to dump >200MBs of gifs on that single page?

Holy laptop fan smoke!

~~~
rglullis
Do NOT open this page on mobile. It just consumed all my data plan

~~~
m3kw9
It consumed my cable internet plan.

~~~
d0ugal
It consumed me

------
Fiveplus
Your loading page size is 449.8 MB [1]

Please put that in your title.

[1]:
[https://tools.pingdom.com/#5cd8c1fc83000000](https://tools.pingdom.com/#5cd8c1fc83000000)

~~~
thasian
I can't change it but if a mod can, I'd be more than willing to accept that
change

~~~
chrismorgan
No, don’t put it in the _title_ , just _fix the page_. A page being even 100MB
would be wildly unacceptable, let alone 450MB.

The _really_ quick fix is just to replace the images with links to the images.
Anything fancier (like replacing them with static images and links to actual
_videos_ rather than GIFs) can come later.

Please. I’m not trying to be mean in any way, but words are failing me at just
_how bad_ this is. You just _don’t do_ this sort of thing. Entirely genuinely,
you have probably directly cost at least a dozen people a few dollars with
these GIFs, and measurably (sometimes seriously) inconvenienced dozens more
for up to a month due to limits reached or approached.

~~~
thasian
Yep fixing that right now.

------
meagher
This is based on Moleskine's Timepage app
([https://us.moleskine.com/timepage/p0486](https://us.moleskine.com/timepage/p0486))
if you want to use this on your phone.

(It's mentioned in the README, but thought it was worth calling out.)

~~~
thasian
Yes. check timepage out. it's amazing

------
ablanco
this looks amazing! (beware on mobile for giant gif size)

SwifUI is a breath of fresh air compared to xcode builder, that giant
unmergeable xml and the constraint madness where really clumsy to work with.

~~~
bsaul
Are you using it for actual apps in production ?

I'm always very careful whenever apple release new technologies for devs. They
promote it heavily but actually nobody uses it inside, and it's up to the
community to go through all the bugs.

~~~
jmull
I'm just curious: what are you referring to?

~~~
bsaul
Core data and swift itself. I've heard from ex apple workers that some team
even use their own uikit-like components (table views, scroll views, etc).

------
necovek
I applaud the attention to detail: many of these things are obvious but
finding the time and actually implementing it!

~~~
thasian
thanks!

------
pininja
This repo is a nice learning resource, it points out learning objectives for
different areas of code with links.

------
cloudking
Dear Apple, hire this hacker

~~~
robertoandred
Nah, I wouldn't want them to trust a "developer" who dumps half a gigabyte of
GIFs on a webpage.

------
etxm
Looks great!

