The project uses as a starting point the amazing Vuejs Implementation from https://github.com/vuejs/vue-hackernews-2.0 . It has super fast server side rendering, that's why the feedback is imediate as you load the page.
The thumbnails are generated using phantomjs server. I'm using https://github.com/blockai/phantom-pool to make sure the phantomjs instance is reused. This improves the speed of the screenshots quite well.
Also I'm using a scheduling node package (https://github.com/Automattic/kue) to make sure that images are pre cached as the link are submited to hackernews.
It shouldn't be too difficult - surely right now you have some sort of task that scrapes the Hacker News API to present the stories? Generate the thumbnail then, store it on S3.
You could try generating a unique token for each page-view, and use this as an access-token for all other resources pulled by the page.
The reality is that it's not too many people who will misuse your API... so don't pick a mechanism that will place undue load on your server until you really have to.
Thank you for this idea. This seems like a quite friendly one. So you are using the Firebase API, and each time a website is added you add i to the Bloom filter?
This seems it will work for my website, but then the screenshot api can be use only if you previously pushed that url in the bloom filter
Thank you for the suggestion. I'm not so familiar with this. Will this work on frontend too? If I expose the secrets on the fronted, then it's pointless.
Do you have some suggestions on how to do this?
Appreciate the help! It's an important aspect and a very resource intensive process that I need to protect.
To the extent that you are pulling new stories directly from Firebase on the client side, encrypting (or signing) urls with a symmetric key will not work. This is because you would need to embed the secret in the front-end code which means the secret is no longer secret ;-)
You could also tail the Firebase feed from a server process, generate the relevant images and only serve images for pre-existing urls.
Your decryption/encryption secret (key) is stored on the server side only and if a client requests a thumbnail, you can validate the URL value by successfully decrypting it with this secret and probably do a simple HTTP URL validation check of the decrypted value.
And you have to encrypt all thumbnail URLs with this secret before passing them to the client.
My suggestion would be to wait a second or two for the pages to load before taking a screenshot of them. It seems that for some websites, there is dynamic loading or an animation first, and this shows up on your board as uninformative pictures.
Take this as a personal opinion, but I felt like I was having to work to find the titles...maybe they'd do better on top? Is that something that could be easily A/B tested?
I'm finding it hard to read the title of the tiles because of the opacity of the background. I don't need such a large thumbnail, nor one that is so legible.
How did you like working with Vue? Did you have javascript framework experience prior to using it?
Design can be changed. Can you tell me what would be a right proportion for you? Wider screenshot ( so higher resolution so you get more context of the page ) but less height?
Actually on a retina ipad, the text is quite readable
You already designed it to your preference. I'm sharing mine with you. Reduce the tile size by 50%, turn opacity to 100% on the title bar and increase opacity of the tile thumbnail by 25%?
What I like about it is actually being able to read content in the tiles. For me, reducing their size would just turn it into a gimmick - cute thumbnails but why bother?
Wow - it actually made "new" look interesting to me. When I look at "new" on classic HN, the "0 point 0 comments" and expectation of low quality means I rarely click anything. This drew me into interesting articles I would not otherwise read. Great - very valuable!
The title is nearly always visible on the rendered page. The overlayed title adds a lot of extra noise that is spoiling the browsing experience for me. Can you make it optional or on-hover please? I also don't want points/comment prejudicing my judgement of whether a story is worth reading. I feel the unique value this brings for "new" is to get you closer to the content "pre-click" and help you evaluate a page/story on its own merits. I still prefer classic HN for "top" where I'm interested in the discussion more than the stories.
The relayout mid-scroll was really annoying. I have a refresh button, let me control it please!
Thank you for the feedback. Noted down the feedback. I agree with you regarding the extra information. I will probably make it on hover.
The title might be necessary, because it's not always visible in the screenshot.
Regarding the refresh topic i want to have it for the people that want to keep the tab open, and always get the new news, but would be a good idea to have it optional.
> The title might be necessary, because it's not always visible in the screenshot.
That was my first assumption but I am now tempted to say you should fully invest in your concept. Drive a complete behaviour change from choosing stories based on the title to choosing stories based on the actual content, its design and being able to skim the first few paragraphs which lets you judge writing quality and intent more than a title.
If the title isn't visible on the page, so what? It clearly wasn't important to the designer. The focus on titles is perhaps a weakness of HN, not a strength. This means you should be delighted to get rid of the title and anything else that becomes an obstruction to skimming real content presented as the designer intended.
The more I am studying React + Redux, the more it becomes apparent to me that it's over engineered for an individual and even a small team. It feels like the Java Swing days where verbosity and architectural opinion dominates all in the name of cross-platformity.
Another minus is that you no longer use the existing conventions that stood the test of time, HTML and CSS. It's now JSX and you have to write boilerplate JS code just to show a simple hello world example. On top of that it poses barriers for designers who only had to worry about how the HTML/CSS looks, now additional work has to go into splitting everything into myriad logical pieces which really have no impact on the overall productivity or quality. And that's only for the React view side, the real beast is Redux. That simple grid table you could get away with using jqGrid is now a 10 week job involving multiple engineers.
I'm curious to know if anyone found any enlightment working with Vue.js and whether something like Redux makes sense to hold states of the app or if they got away with it.
Getting into React is kind of mixed bag. The core concepts are easy to understand and compared to other frameworks lean. JSX is easy, components are trivial but once you try to get productive, wow, it's not that simple anymore. It's more than a bit of HTML embedded in JS.
So, you need really to spend time to understand the core of React very, very well. And this takes time, effort and at least a couple of real and serious apps you should write to understand why React and its concept are the next step in FE dev and why others use React's concept as blueprint (e.g. Inferno). Tutorials are not enough, real projects are the best way to grok React.
I don't think it's like Java Swing, not at all (I think the comparison is misleading since React is from the ground very different, e.g. totally different design patterns/paradigms, .g. no observer pattern, and a super minimal API). It's a tool which is super flexible. It's definitely not your daddy's jQuery-based front-end framework which let you start quickly. But once you get more experienced with React you face much better code maintainability with a small code base already. Further, you should be good at JS and ES6. I guess this might be another obstacle for many. Compared to Vue which I like a lot and which shares also some similarities, Vue is more complex due to a large API surface, code-in-HTML templating syntax, nested instance semantics, observable gotchas, ES5 workarounds and a larger documentation that is absolutely vital to read and understand.
Give React a try. You need of course a real use case. Many website's use cases don't require React and could be done with some simple server-side rendering. So, React is def not the best tool of every job.
I was ignoring React too long by just using it for some toy projects or going through tutorials. This was not enough. Once I tried React for a real project, I learned its brilliance and I don't want to go back to anything else for SPAs or websites with more interactivity.
React/Redux solves a specific problem: managing state and DOM rendering in a complex single page app. If you don't have that specific problem, you probably shouldn't use that combination of technologies. If you do, you can use React/Redux or any of the other technologies out there (Angular, Vue etc.).
I have the same impression. I also tried Angular1 and found it also overly complicated. Currently I am using Teleriks Kendo UI Core (Core is Open Source) and find it a lot more intuitive. Especially the Template and Routing stuff. Also a huge Fan of their "Web Debugger" Fiddler.
You want enlightenment? Ignore the frameworks/JS hype.
"It's now JSX and you have to write boilerplate JS code just to show a simple hello world example."
This is absolute insanity. It's time for a re-discovery of “vanilla” HTML, CSS, with a sprinkling of "vanilla" JS from the ground up without any frameworks.
The is cool yet also makes me feel like the hours I spend staring at HN are just as dumb as hours spent staring at designer bags on Pinterest. Having HN appear as a wall of text just hides it really well.
Cute - but totally the opposite of what I want. Can you make a site that makes Pinterest (and Facebook!) look like HN, reducing each post to a clear, informative headline, so I can quickly scan 25+ posts without having to scroll, and click through to the ones I'm actually interested in?
Love original version! Only thing stopping me from making it my regular client is the lack of "best" menu item. I love checking out day's best or week's best if I've been to busy to keep up. Great work though.
Agreed. I think HN is the kind of forum where a picture isn't quite worth a thousand words. With these types of articles, I'd be more interested in bulleted summaries than thumbnails. I appreciate HN for being information-dense/text-heavy.
This is really nice, well done! One suggestion I might add is that you remove the hover effect from the image. It feels a bit inconsistent maybe?
Also not 100% sure about the infinite scrolling. I spend a lot of time on half-working internet and have to refresh the page a lot. Also it means that when scrolling there's a lot of items jumping around on the page, which means you lose your place quite easily.
The jumping around will be addressed. See one of the suggestions in the comments.
Regarding infinite scrolling, I have a personal preference for this type of navigation. I consume those on my tablet, and feels natural just to scroll.
Thank you for the feedback.
Adding on the issue of refresh; I usually access HN on my iPhone - currently every back action triggers a _refresh_. A great example of back action handing is Reddit's mobile page.
Other than that the whole thing looks really neat.
I guess that the server went to sleep for a while. It runs on a free heroku tier. I'm planning on moving it on Digital Ocean, but waiting for things to cool down a little :)
I agree. Love the layout and the fact I can get more of an idea what the thread is about, but the constant auto refreshing, as well as the refreshing while scrolling threw me a little bit.
I tend to skim a bunch of articles, and make a mental note of the position of interesting ones to go back to later, but when I scroll up, everything is in a different location, breaking the mental map that I had built.
Other than that, I think it is a great alternative. Good work.
Agree with this, the first version had no autorefresh. But this is quite annoying if you have this open in a tab. You get old news, and that kind of is against the purpose of the app.
I guess there are two types of users - constant checkers might like auto-refresh but if you check less frequently then you want to scroll deep and for us, auto-refresh is a usability nightmare.
I'd suggest something like a toast that says "4 new stories" and you click it to refresh. It means you don't get confused by stale data but the page stays under the users control. It also allows you to flag/highlight/animate the new stories so a user can understand the diff from when they last looked at the page.
This type of feature is sometimes implemented as a huge green banner stickied to the bottom of the view but that I find that too obtrusive and stress inducing - I end up clicking on them to get them out of the way even when I don't want to see the new stories so it actually makes the experience worse. I prefer a more subtle indicator in the top-right similar to how notifications appear in some apps but it shouldn't feel like an error/warning or something that requires immediate attention.
It is massively annoying and a huge UX misstep. It just happened to me: I hovered over a story I was interested and could feel the muscles in my hand tensing as I was about to click when suddenly the stories refreshed and I lost the one I was interested in. It made me somewhat irrationally angry, like something was stolen from me.
Do not automatically change content that requires people to read
This really is amazing. Probably one of the best clients that's out there at the moment. I recently built a one myself with Angular (https://github.com/hdjirdeh/angular2-hn) so I'm always amazed with all the different clients out there with their own unique twist.
I've always been interested in using Vue, how do you like the framework? Also, which Hacker News API are you using to power this? I'm on mobile so I can't see any of the requests at the moment. But since this is SSR, I probably wouldn't be able to see the API calls anyway.
As feedback, I'm noticing that some thumbnails for specific types of urls (e.g. PDF's and Ask HN) aren't being generated correctly, and just get a solid color. Maybe a static icon representing the type of a particular url (e.g. https://tse3.mm.bing.net/th?id=OIP.Ma1c43eb41218e48366a5dc8a...) would be better to look at?
Yes, thank you. The pdfs are hard to screenshot. They can consume a lot of memory on load. It's planned to have an icon or something. Right now they are ignored.
Thank you for the suggestion
Nice job! Love seeing ppl trying to build a better way to read Hacker News content. I built this to scratch my own itch http://mackernews.com I wanted a Mac HN client (you can up vote and post too :) ). I really wish HN gave us better apis to work with :(
One issue with HN that I constantly run into is that I might miss an interesting article because each submission (30 on each page) look so similar. Your approach (where at most 4 articles appear within my browser at once) allows me to take more time to consider whether I should read each article.
Providing a link to the comments on hackernews itself would be kind of nice for being able to upvote stories and the like. There are a lot of these in the new sections that I'd like to be able to upvote/downvote without having to navigate to them in HN and such.
It is on top of my todo list. One bad thing with all those readers on top of the api, is that it makes it easy to read, but does not give the opportunity to rate and by this attacks the foundation of the quality of the articles on the list. I wish that there was a way to do SSO and then have the complete voting experience on your app. But then again, what would be the purpose of the original hacker news website then?
Nice work. I had a similar idea, but to show just the first comment of each post, probably in the same index page or when hovering the link. I find it useful to read the first comment when the title is not very descriptive.
Probably using Riot.js , or just a bookmarklet with javascript
Hi, great idea! I was wondering if you have plans to save the scroll position when transitioning back from an article's comments. It can definitely become my default HN client.
Hehe.The bug is only for the first time. I cannot figure out why. When you are doing this second time, keeps the scroll.
Actually was not a trivial issue. It's quite a hard on to do on a infinite scroll page.
A minor suggestion: I think you might as well thumbnail Ask HN/Tell HN/any other pure text posts too. This would look better than the big blank squares for those, and work well as a preview.
Actually I was thinking on building similar projects for other websites. I think it helps a lot previewing what the landing page is about.
I will look into reddit api, when I'll have the time
it is responsive. IF it does not fit your screen try pressing [ ctr + - ]/[ mac + - ] one or two times. I don't want to rescale images, because on such long list have an impact on scrolling. That's why I've decided not to allow them to rescale.
The thumbnails are generated using phantomjs server. I'm using https://github.com/blockai/phantom-pool to make sure the phantomjs instance is reused.
Also I'm using a scheduling node package (https://github.com/Automattic/kue) to make sure that images are precached as the link are submited to hackernews.
The project uses as a starting point the amazing Vuejs Implementation from https://github.com/vuejs/vue-hackernews-2.0 . It has super fast server side rendering, that's why the feedback is imediate as you load the page.
The thumbnails are generated using phantomjs server. I'm using https://github.com/blockai/phantom-pool to make sure the phantomjs instance is reused. This improves the speed of the screenshots quite well. Also I'm using a scheduling node package (https://github.com/Automattic/kue) to make sure that images are pre cached as the link are submited to hackernews.
I'll post the code on https://github.com/valentinvieriu/vue-hackernews-2.0, but need to take care of some hardcoded redis credentials first. I'll give a reply when it's up
Thank you for the interest! I'll do my best to reply to all questions if there is interest on this project.