Introducing news:yc for iPad
Since its creation just over a year ago, news:yc has been an iPhone app. The first request, though, was always for an iPad version. And now, with news:yc 1.2, the iPad app is finally here. news:yc is now a universal app, supporting the iPhone, iPod touch, and now the iPad.
The iPad version of news:yc is an attempt to re-interpret the design of the iPhone-sized UI onto the bigger screen. The list of submissions remains identical, as do the tabs on the bottom. However, on the right, the comment browsing has been re-imagined to match the iPad's conventions. Actions have been moved to the top right, spacing has been adjusted, and popovers have been added. Here's what it looks like:
What else is new?
Of course, that's not the only feature in the new update, version 1.2. It also has a completely revamped browsing interface, faster and better Hacker News scraping, and a bunch more:
New comment browsing UI.
In the first release of news:yc, many wanted a way to view comments hierarchally. That was added in the first major update, but it was hidden behind a settings toggle, and you still had to tap on comments to perform actions. With this release, that's all fixed. Hierarchal comments are now enabled by default, and tapping on a comment drops down a Tweetbot-inspired action panel. (You can still view a comment's own page by double tapping it. Similarly, previous versions of news:yc had the strange default setting of truncating comments in a list. That's also fixed: the whole comment is now always visible, as it should be. The font has also been standardized at 13 point, just between the previous smaller and larger text options.
In the past, for rendering the somewhat complex formatting that can appear in Hacker News comments, I used the open-source DTCoreText project. However, while it worked well enough for a single comment at a time, it was too heavyweight to show in a scrolling list. For this version, I wrote a new CoreText-based HTML renderer, supporting just the formatting seen in Hacker News comments. For the user experience, this means that comments now show fully formatted right in the list. Because of this, links now take just one tap to open in the in-app browser, and code is now rendered properly.
More robust Hacker News scraping.
Previous versions of news:yc often had issues scraping Hacker News. After a few months, the initial release began crashing on any attempt to login, and it was not very resilient to change. Since then, the parser has been much improved, and I've improved it yet again in news:yc 1.2. Hopefully, if all goes well, you won't notice any changes, even if the Hacker News markup is modified slightly. However, bugs have been fixed that resulted in the disappearance of "Load More" buttons at the bottom of lists of comments. As of version 1.2, you should be able to load enough posts and comments to view the entirety of any list. (iOS developers: the mess of Xpath, Cocoa, and bad code used to scrape Hacker News can be seen here. I'll admit it's not the best.)
More new features.
Jump to parent comments, as implemented by Russell Davis. Thanks!
New, less obnoxious, orange styling. It's still optional, but it should be much more tolerable if you don't change from the default.
Save comment threads to Instapaper.
And, of course, the obligatory assorted bug fixes.
I hope everyone enjoys this new release. As always, you can view the source code on GitHub and build it yourself, or get the App Store version to support myself and future development. Be sure to let me know if you have any issues or things you want changed: I'm on Twitter as @newsyc_ (with an underscore at the end), or you can email me at firstname.lastname@example.org. Thanks!
For developers: HNKit
Inside news:yc, the parsing and rendering of Hacker News is done by HNKit. HNKit is an Objective-C library — mostly self contained, requiring only a few categories and the XML code from news:yc — that provides a simple interface to Hacker News, managing the loading, scraping, and parsing of the site. In addition, if you define the HNKIT_RENDERING_ENABLED macro, HNKit will even use CoreText to render the comments for you. In essence, HNKit is pretty much all that's needed to start building a Hacker News app.
The interesting part about HNKit, though, is that there is nothing that ties it to iOS or UIKit. A Mac app, for example, could easily use HNKit and need only to develop the UI layer, none of the backend. Feel free to send me a message or email if you are trying it out and would like any tips.