4 ms·
Please don't use code blocks for quotations. It ruins display/readability on mobile.
by stochastic_monk 7y ago
Please don't use code blocks for quotations. It ruins display/readability on mobile.
- daef 7y agoit feels like this is the 1.23E23th time I've read this - wouldn't it be time for HN to fix the css to make code-tags more readable (especially on mobile)?!
- vorpalhex 7y agoCode tags should not mess with line length. Instead you should quote formatting (`>`) for quotes (which HN doesn't support so it's all a bit moot).
- ysavir 7y agoSounds nice in theory, but the intention of code block is to capture how code looks--including where the lines break. That aspect of code blocks isn't broken. The problem is people who use code blocks for what it wasn't intended to do-display quoted content. Perhaps HN can add support for quotes, but even now there's nothing difficult with indicating a quote by adding a ">" to the start of the paragraph. Most, if not all, of HN readers will know what that means.
- reaperducer 7y agoThe problem is people who use code blocks for what it wasn't intended to do-display quoted content. The problem is that it doesn't work, even on mobile, whether you're posting code or the Declaration of Independence. At its heart, this web site is about communicating information. The current state of the code block fails at that mission. Would you use an IDE without word wrap?
- ilikehurdles 7y ago> Would you use an IDE without word wrap? I wasn't aware it was controversial to use an IDE without word-wrap. I do not have it enabled on any of my editors.
- reaperducer 7y ago"Enabled" is one thing. But it should be available. In HN's code blocks, it's not even an option.
- baby 7y agoHow do you read code from codebases that don’t respect the arbitrary column limit?
- ilikehurdles 7y agoTo be honest, I don't often read such code, or I try to run it through a formatter prior to reading. I guess I should have said that I _generally_ don't have soft wraps enabled. Sometimes I just have to plug my nose and soft-wrap.
- loeg 7y agoI am flexible about how wide my editor is. Pretty much all code I read bounds itself to some sort of limit around 80-120 characters. If there are a few individual lines that exceed the current editor width, I can scroll. I don't have to work with any codebases that have ridiculously long lines.
- kelnos 7y agoI just suck it up and scroll like a normal person.
- baby 7y agoA normal person has word wrap toggled
- dkersten 7y ago> Would you use an IDE without word wrap? Yes? I find word wrap in code really weird.
- OJFord 7y agoLong lines are just annoying, wrap or no wrap. I don't want to hit 'j' and drop down two 'lines' because what I thought was the next line was actually the end of this line. I also don't want to hit '$' and go not to the end of the 'line' but somewhere below (and potentially left) because of the same. But I also don't want to hit '$' and go out into space to the right and lose context from the surrounding reasonably-lengthed lines. Just use the return key and nobody has to worry about whether to wrap or not to wrap.
- comex 7y agoWe know what it means, but it’s still hard to distinguish at a glance what is quoted and what is not. It works in (plaintext) email because emails are traditionally word-wrapped and “>” is inserted at the start of each line – not once at the start of an arbitrarily long paragraph. And even then, email clients often color quoted blocks to further visually distinguish them.
- hombre_fatal 7y agoNever had an issue with it on HN. 99% of quotes occur at the start of the post and the rest of the post is a reply. Posts that interleave their content with quoted bits are rarely as constructive as they think (almost always just point-by-point bickering) that I find impossible to follow no matter what formatting they could've used for the quotes. Also a single ">" prefix on a long wrapped line is a bit of internet convention with younger crowds probably thanks to 4chan. I doubt most people using it these days even remember seeing it in emails. If anything, HN should post-process lines that start with ">" to indent them.
- superkuh 7y agoPlease don't use mobile. Mobile form factor limitations are ruining the web.
- mffnbs 7y ago:eye_roll:
- cm2012 7y agoAre you serious?
- journalctl 7y agoPeople look at me funny when I take my laptop to the bathroom, though.
- 0xdeadbeefbabe 7y agoHe's quoting the font from catch 22 as well.
- corollari 7y agoI created a browser extension that fixes that: https://github.com/corollari/fixedHackerNews https://github.com/corollari/fixedHackerNews https://addons.mozilla.org/en-US/firefox/addon/fixedhackernews/ https://addons.mozilla.org/en-US/firefox/addon/fixedhackerne...