Hacker News new | ask | show | jobs
by kevin1024 4719 days ago
Interesting that they decided not to do a responsive design. Instead, it serves up different HTML if you send a phone user-agent. I've been trying to decide if this is a good idea for my own project.
3 comments

For us, it made sense.

Our desktop site is pretty large. Check the graph in the blog post- the mobile pages are about 1/10th the size of the desktop CSS and JavaScript. By avoiding a responsive design, we can make things load disproportionately faster for our use case. On top of that, it's isolated so we're less likely to break views by adding features later. Pretty fun.

Zach, what was the reasoning behind using such large text for the code view? Will there be a zoom in/out option? Or a text size preference?
To make it easy to read code. :) It feels pretty comfortable- squinting isn't fun.

We tend to avoid user preferences. If it ends up being a problem, we'll lower the text size at some point.

It seems a bit extreme on my Nexus 4... http://i.imgur.com/hagaiLR.png
I'm old and I like big fonts. But on my Galaxy Note II, this is too big for me.

I like word wrap too, but I'd like to be able to switch it off. In my desktop code editors, I generally use proportional fonts and enable word wrap, but sometimes I also like to be able to see the structure of the code without the word wrap.

I think font size and word wrap should be things that are easy to toggle right there while you're looking at the code. Not in an option setting somewhere. Or enable pinch-zoom for the font size and just have an option to toggle word wrap.

Speaking of the code view, any plans on adding code commenting capability on mobile? This has been a bit difficult to use on a phone because the click target is so small on the desktop version.

I can't resist doing code reviews even when I'm away from keyboard :)

Congrats to you and the team on launching this.

I'd love to know the technical approach on this. That is, is the different HTML/CSS/JS view called by the Rails controller, based on the request's user agent? Though responsive designs are often a good call, I completely agree with your decision to do custom views here. I'd love to know where in the process the filtering happens, though, such that you retain the URLs (no "m.github.com") and yet have the customized view. Any backstory on the technical aspects that you can share?

I'm not that experience with responsive design, but recently I wondered that myself and, for what I saw, I concluded that is too much effort to make it responsive in that level.

Responsive feels great with huge/big/medium displays. With tiny ones I would go with a specific layout (like github did).

Yeah, it definitely depends on the use case. Some websites just "make sense" on responsive layouts. Others… not so much :)
Well I guess it's because that gives them the ability to slim down the page size even more, you can only get so far with CSS media queries.