6 ms·
Show HN: I made an elegant SwiftUI timeline
- OzzyB 6y agoVery 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 6y agoDo NOT open this page on mobile. It just consumed all my data plan
- kochthesecond 6y agoThanks for warning, i need my data plan
- chrismorgan 6y agoOuch ouch ouch ouch ouch. Flagged the submission for this reason, it’s going to cause severe problems for lots of people, and being GIFs and so enormous they don’t even load well (when I start loading even the first GIF by itself, it spends a lot of its time loading at below one frame per second). The GIFs should be removed urgently and replaced with static images and links to videos.
- mmebane 6y ago350 MB of GIFs by my count!
- thasian 6y agoYea prob more tbh
- burlesona 6y agoInteresting, via iOS safari the page was quick to load and scrolled smoothly, no noticeable performance issue (excepting the payload size is excessive). Maybe safari is more optimized for gifs?
- adammenges 6y agoYeah same this worked fine
- necovek 6y agoWorked fine for me on AOSP8 with Iceweasel on Honor 9 too, albeit on ac wireless with 400Mbps connection (at least I didn't notice any slowdowns, and this is hardly top of the line hw or sw).
- thasian 6y agook u know what. changing all the gifs to embedded videos. no one will complain about me discriminating towards mobile :^)
- etxm 6y agoLooks great!
- cloudking 6y agoDear Apple, hire this hacker
- Operyl 6y agoMeh. I am finding myself enjoying simpler calendars. It's a cute gimmick for like, playing with. But I prefer simpler for things I have to use all the time.
- robertoandred 6y agoNah, I wouldn't want them to trust a "developer" who dumps half a gigabyte of GIFs on a webpage.
- pininja 6y agoThis repo is a nice learning resource, it points out learning objectives for different areas of code with links.
- ablanco 6y agothis 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 6y agoAre 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 6y agoI'm just curious: what are you referring to?
- bsaul 6y agoCore 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).
- kitsunesoba 6y ago> They promote it heavily but actually nobody uses it inside, and it's up to the community to go through all the bugs. Large chunks of macOS 11 and iOS 14 are built with SwiftUI, and it's the only way you can build the newer style of widgets on both platforms. They're actually pretty aggressively dogfooding it. They were slow to pick up Swift internally because they needed ABI stability, but no such barriers exist for internal adoption of SwiftUI.
- ablanco 6y agoI'm using it to port an auv3 plugin to a standalone app. The overall experience is amazing when compared to the constraint based method proposed in previous xcode versions. There are parts missing, but it's fairly easy to wrap uikit components and use them in swiftui Overall I think it's a great step forward
- ComputerGuru 6y agoFYI 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.
- patatino 6y agoYou know you can give feedback without phrasing a question implying that he already should know that, right?
- ComputerGuru 6y agoNot intended as snark, just colloquial. Thanks for the feedback and I've updated the phrasing.
- thasian 6y agoI've replaced most of the gifs with embedded videos. Page loading size is around ~100 mb now
- thasian 6y agoOk holy shit. Mp4 compression then converting to gif is the holy grail. 1/3 the original size wtf.
- chrismorgan 6y agoThat’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.
- meagher 6y agoThis 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 6y agoYes. check timepage out. it's amazing
- Fiveplus 6y agoYour 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
- deleted 6y ago[deleted]
- hellofunk 6y agoI've flagged the title; it is incredibly poor etiquette to sneak half a gig in downloads on a user, especially when demonstrating something for mobile!
- thasian 6y agoI can't change it but if a mod can, I'd be more than willing to accept that change
- chrismorgan 6y agoNo, 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 6y agoYep fixing that right now.
- necovek 6y agoI applaud the attention to detail: many of these things are obvious but finding the time and actually implementing it!
- thasian 6y agothanks!