Hacker News Web App for Mobile
hn.premii.com
hn.premii.com
After it reached to the FP, my vps server stop responding. So I moved it to S3. S3 doesn't gzip content. Now it takes twice the time to load the app.
Thanks EtienneK for submitting to HN.
Also forgot to mention that you can download an android app from play store. https://play.google.com/store/apps/details?id=com.premii.hn
I am not sure the best way to implement comment collapse with thread collapse.
Shoot me a note at mathias@bitballoon.com if you're interested in trying it out.
you can have the app online and a lot faster than on S3 in around 30 seconds :)
Also, this is great. Really a solid interface.
EDIT: I would honestly like to see this scale on desktop, just because it's a pretty great interface for Hacker News.
EDIT 2: Nevermind, realized that it worked by acting as a sidebar on wider monitors. That makes sense.
Looks like no framework was used to build this (except for Zepto, I guess). Total size for JS is 55kb, for comparison Angular 1.0.7 minified is 78kb. CSS adds another 30kb, including the ico font that's base64 encoded in style.css. 115kb for the whole page on a fresh load, on subsequent loads it's only something like 4-5kb. Very nice!
JS is uglified. Libraries takes 55% of file size, and rest is my code.
1. I've done away with a lot of the features the OP has - such
as comments (unless it's Ask HN), time of post and link. This
has made it more lightweight and faster to load on slow mobile
networks in my area.
2. Also, it's only updated twice a day since I actually built
this for myself to stop spending so much time on HN.
3. And since I found myself only reading the front page on my
commute to work, it aggregates all the front page articles into
one nice page instead of opening one article up at a time.
Not to take away from the OP, but would love any feedback on the whole "less is more" approach.Looks like a few [1][2] have already made the efforts to write filtering based on karma score.
Edit: The OP's app is very close to what I want, but instead of limiting to top 10, use a point threshold directly.
1: https://github.com/fractastical/Hacker-News-Filter 2: http://hnapp.com
[1] Wasn't sure of how many people read comments before the article, or read them at all - I stopped when I found that it gave me a biased read, especially on the Show HN type posts.
I haven't figured out how to comment, but I'more of a lurker, so that's fine (it'll keep me from making a fool of myself too much). And there's that initial loading time with a blank, white background that is almost certainly the iPhone's fault.
Swapping over to it now that this is written!
I see this delay on forecast.io as well. It could very well simply be a latency issue.
Also, please consider adding this to the Chrome Web Store so I can install it on my Chromebook. :)
https://developers.google.com/chrome/apps/docs/developers_gu...
Let me know if you can install on your chromebook.
See also http://ihackernews.com/ or http://cheeaun.github.io/hackerweb/ or (broken ssl cert) https://msean5423.news.ycombinator.com.moovapp.com/, and now http://hn.premii.com/. I was looking into writing one myself.
Personally I won't be very excited before I see an app that's open source. I don't understand why somebody wouldn't share the code for such a simple thing.
As for iOS, it doesn't matter whether you get the source code because you have no way to make sure that what you see is what you get (from the App store).
This is a great example where a mobile web app can really shine. Throw this thing into phonegap and you wouldn't be able to distinguish it from a native app. So awesome.
I couldn't figure out best way to collapse threads and collapse comments.
When I collapse a comment, I think all subcomments should disappear as well. However, I understand that there are valid use cases for both behaviors. Maybe you could work both functionalities into the UI?
I don't think you should be pushing onto the history stack every time I toggle between Article and Comments view. It's weird that if I toggle 5 times, I have to click the back button in the top left 5 times to get back to the main news feed. That back button should probably just always go straight back to the main news feed view.
I encountered bugs trying to highlight text on comments. When I press and hold on a word, the word highlights as expected, but when I then release my touch, it registers a click, which then collapses the entire comment I was trying to highlight. I'm not sure exactly how Safari passes DOM events, but there's probably a way for you to identify "long clicks" and ignore them.
Several of the loading spinners you show over buttons are awkwardly positioned. It looks like you place the spinner precisely on the pixel I clicked. It would be nicer to center it over the button I clicked.
The article view screwed up on a lot of articles, but I'm sure you're aware of that. :)
However... having added it as a desktop icon it's phenomenal (no browser chrome). Very impressed. Would be great if it told you at the start that this was the outcome from adding it :)
I am not using any framework, but I am using zepto and fastclick library.
But it tries so hard to hide Safari that it makes a few very common use cases impossible.
1. You can't back up if you visit a web page
2. You can't share/email an article as you can in safari.
I will be using this daily, but NOT pinned as a web app in ios7
This will still be my "go to" as a result: http://cheeaun.github.io/hackerweb/
I do have a problem with it on the iphone, it only shows like 2 or 3 items, then below this its blank - however you can click the blank spot and the link works.... anyone else?
I was using hacker news as an example to espouse the benefits of a decent mobile design the other day... another user tried to tell me that Hacker news was perfect for mobile browsing (https://news.ycombinator.com/item?id=6171701). I present your work as compelling evidence to the contrary.
In all seriousness though - this is the sort of thing I have been meaning to get around to myself - thank you.
I really love this trend of having a scrolling ListView as a sidebar in web apps, similar to what many tablet apps are doing. The ones that come to mind: Gmail Offline, Quartz, Feedbin and Evernote (to an extent)
There was also a news aggregator site that was on HN a few weeks ago that did something similar. Sadly, I can't remember the URL for the life of me. Anyone remember it?
It would also be nice if you would store the current app state in localStorage, because the app is reset when you switch to another app and you have to navigate/ scroll back to the article/comment where you left. (Damn you apple for your broken html5 app approach! shakes fist)
How? Instead of the orange, make it light, and add label + icon, (like in Mail.app) to show nothing is selected. Just my 2c.
http://snappy-app.com/s/show.php?pass=8fb13fb41739e677265bbc...
I am using icomoon.io for icon font.
If you don't plan on monetizing this, I think a lot of people would love for you to open source it. This is quality work.
Minor gripe: tapping the top of the screen on iOS does not scroll to the top on the front page.
..... No: http://o7.no/11PNaX2
Just shows the menu links and "Loading"
My only gripe with all HN interfaces is that none of them can login and hence are read-only. You cant really comment on anything.
Would it be possible to have the refresh icon spin instead of that weird animation, or is that a result of it being a web app?
One small nitpick: On Ask HN page you can open the threads only if you click on the comment link. Clicking on thread names doesn't work.
I recommend you look at how angular handles this.
also this isn't about direct access to hardware buttons. hitting the system back button on android devices while a web view is in focus is the same as : window.location.back()
I really want to know what was done to get this kind of smoothness and performance in a web app.
iOS. Only option is to add it to your home. I have build iOS app, but haven't submitted to the app store.
1. Swapping between comments and the article (like 5 times) and then wanting to get back to the main page. (I have to hit back the same amount of times as I swapped.)
2. When clicking a link, there is no way to get back to the main page. (is there a way to get the status bar back when browsing via homescreen?)
Nicely done :).
j/k. I will upload source code to github tomorrow. https://github.com/premii/hn
many thks
https://onetimesecret.com/secret/kaomwielzr6q358j7g19z5j0ker...
password is your first employer.
Maybe once it loads I will change my mind.