News for hackers. Stuff that matters.
Re:Ask HN: Hacker News comment tree indentation on text-base... by yewenjie on Friday February 05, 2021 @05:37PM (#26042104)
HN uses a very non standard way to visually represent comment trees — transparent gifs of different widths instead of real treelike data structures. The behavior of text based browsers is understandable.
Re:Ask HN: Hacker News comment tree indentation on text-base... by abhisuri97 on Friday February 05, 2021 @05:46PM (#26042192)
Me: There's no way that's true

looks in inspect element

Me: I stand corrected

Re:Ask HN: Hacker News comment tree indentation on text-base... by eyelidlessness on Friday February 05, 2021 @07:25PM (#26042927)
Oh my goodness. It’s worse than you probably think. I built a HN dark mode web extension (you can grab it on my GH under the same handle if you want) because it’s been asked for so many times... And the weird hacks I had to do (even basing it off of dang’s invitation to solve it with HN’s base stylesheet) were so unusual that I didn’t feel comfortable promoting it here or anywhere.

There’s not just weird 90s style table layout/spacer gifs, there’s also just random font tags and inline color attributes for important (eg branding) elements. Every downvote greying is inline color attributes.

I’d originally planned on a companion stylesheet for Algolia search and it was so different I just bailed.

Edit: honestly given the forum, I wish they’d open source some portion of HN to allow improvement. I really want a better mobile view, which is easily achievable with CSS without using the API and hosting another domain. If there’s so little interest in UX improvement effort this is something we could pick up the slack on.

Re:Ask HN: Hacker News comment tree indentation on text-base... by eyelidlessness on Friday February 05, 2021 @07:38PM (#26042990)
I’m adding to specifically say to dang: you put probably horrific effort into maintaining this community and no ill will at all was meant to be directed toward you. I’m only sharing what I saw as a frame of reference for what’s currently in the HTML we consume every day and the challenge of tailoring it to other use cases.
Re:Ask HN: Hacker News comment tree indentation on text-base... by tyingq on Friday February 05, 2021 @07:18PM (#26042880)
Never meet your heroes.
Re:Ask HN: Hacker News comment tree indentation on text-base... by heterodoxxed on Friday February 05, 2021 @10:52PM (#26043973)
I'd love to hear the justification (no pun intended) for this.
Re:Ask HN: Hacker News comment tree indentation on text-base... by dunham on Friday February 05, 2021 @07:18PM (#26042881)
Yeah, TIL. I've looked at the DOM before, but I saw multiple layers of tables and just assumed it was tables all the way down.
Re:Ask HN: Hacker News comment tree indentation on text-base... by GekkePrutser on Friday February 05, 2021 @07:43PM (#26043032)
I thought the same, no way :) But, it makes a point. If nobody notices any side-effects of a bad design, is it still a bad design?

The text-browser point made by the OP is the first that ran into this however most text browsers don't render the current 'best practice' (using CSS classes with margins) correctly either.

Re:Ask HN: Hacker News comment tree indentation on text-base... by greggturkington on Friday February 05, 2021 @08:23PM (#26043249)
> If nobody notices any side-effects of a bad design

Lots of people notice, like OP and anyone using assistive technologies. So by your logic, it is bad design.

Lists should be marked up as lists, tabular data marked up as tables. We ended this debate in...1996?

Re:Ask HN: Hacker News comment tree indentation on text-base... by SirLotsaLocks on Saturday February 06, 2021 @02:24AM (#26044820)
Yeah I wonder how this affects assistive technologies.
Re:Ask HN: Hacker News comment tree indentation on text-base... by livre on Friday February 05, 2021 @08:20PM (#26043231)
> current 'best practice' (using CSS classes with margins)

If comments are nested unordered lists, why isn't the best practice a bunch of ul and li tags styled with CSS?

Re:Ask HN: Hacker News comment tree indentation on text-base... by GekkePrutser on Saturday February 06, 2021 @12:38PM (#26048199)
Good point!
Re:Ask HN: Hacker News comment tree indentation on text-base... by nerpderp82 on Friday February 05, 2021 @08:30PM (#26043301)
Stand horrified! What is wrong with tables?
Re:Ask HN: Hacker News comment tree indentation on text-base... by mintplant on Friday February 05, 2021 @09:24PM (#26043567)
Oh, every comment is a table row. But they're all in the same flat table, not nested.
Re:Ask HN: Hacker News comment tree indentation on text-base... by onion2k on Friday February 05, 2021 @05:43PM (#26042161)
That might be non-standard now but spacer gifs did a lot of the heavy lifting in website layout between about 1995 and 2010.
Re:Ask HN: Hacker News comment tree indentation on text-base... by chc on Friday February 05, 2021 @05:57PM (#26042289)
While that's true, they haven't been commonly used for cases like indenting child comments since the '90s. You'd usually either indent with a table-based grid of some sort or (increasingly common as you got past the '90s) with margin/padding properties. The way Hacker News does it where every comment is a table with a spacer gif in the first column was never a standard practice AFAIK.
Re:Ask HN: Hacker News comment tree indentation on text-base... by stefan_ on Friday February 05, 2021 @06:04PM (#26042347)
Tables were the design element de jure, so much so you could export your UI design straight to generated table HTML.
Re:Ask HN: Hacker News comment tree indentation on text-base... by cmiller1 on Friday February 05, 2021 @06:45PM (#26042624)
I still remember how to lay out pages with tables. Just another in the long list of programming techs filling my brain that will never get used again like Hypertalk and Actionscript
Re:Ask HN: Hacker News comment tree indentation on text-base... by neom on Friday February 05, 2021 @06:02PM (#26042330)
Yes, in dreamweaver I definitely moved stuff around using either gifs or transparent tables.
Re:Ask HN: Hacker News comment tree indentation on text-base... by GekkePrutser on Friday February 05, 2021 @07:38PM (#26042995)
At least that was a lot better than using   which most FrontPage users did. I cleaned up so much in that time :D
Re:Ask HN: Hacker News comment tree indentation on text-base... by jephson on Friday February 05, 2021 @10:14PM (#26043795)
Re:Ask HN: Hacker News comment tree indentation on text-base... by krapp on Friday February 05, 2021 @05:54PM (#26042268)
The weird thing is, HTML already has (and had, even back then) a much simpler and more straightforward way to represent nested lists, but pg didn't want to use it because he thought W3C recommendations went against the spirit of explorational programming[0]. So the existing layout is the way it is just to be contrarian... which is remarkably on-brand for HN.

[0]http://arclanguage.org/item?id=20788

Re:Ask HN: Hacker News comment tree indentation on text-base... by Blikkentrekker on Friday February 05, 2021 @06:43PM (#26042607)
If the domain not be well understood when one is crafting the markup for a layout as simple as Hacker News's, one simply lacks even the most basic experience.

There is no need to use exploratory programming for such matters; it is a very common and well understood problem for which there are good and bad solutions.

A simple `margin-left: 20px;` in CSS is a good solution; transparent spacing images are ridiculous.

Re:Ask HN: Hacker News comment tree indentation on text-base... by onion2k on Saturday February 06, 2021 @02:47AM (#26044920)
one simply lacks even the most basic experience

Considering pg's background I don't think it's that.

Re:Ask HN: Hacker News comment tree indentation on text-base... by Blikkentrekker on Saturday February 06, 2021 @04:49AM (#26045465)
Which is why I believe that the domain was quite well understood, and that exploratory programming to generate the markup for this simple website is a mistake.
Re:Ask HN: Hacker News comment tree indentation on text-base... by onion2k on Saturday February 06, 2021 @05:56AM (#26045729)
exploratory programming to generate the markup for this simple website is a mistake

You're wrong because you think the goal was to make a website.

Judging by the arclanguage.org post linked earlier, the goal was to test the Arc language as an example of exploratory programming to make a web application, with the measure of success being "as little Arc code as possible". The HTML output was intentionally 'bad' from a web development perspective, but 'good' from an Arc perspective. Consequently if you judge it purely in terms of web development it does look pretty awful, but that isn't the context it was written in so that's not a fair way to look at it.

Re:Ask HN: Hacker News comment tree indentation on text-base... by krapp on Saturday February 06, 2021 @08:26AM (#26046341)
Tables and spacer gifs don't necessarily use less Arc code than a simpler layout would. The table layout might even use a bit more if it requires more iteration, macro expansion and branching to render. There are special case macros in the html library for generating parts of the forum table that wouldn't be necessary otherwise.

Also, the goal clearly was to make a website, because pg made a website, and here we all are. Once you put your MVP online it's valid to criticize decisions made for it in that context.

Re:Ask HN: Hacker News comment tree indentation on text-base... by Blikkentrekker on Friday February 05, 2021 @06:20PM (#26042469)
Verily, I've not felt such disgust since I saw the characters from the Canadian Aboriginal Syllabics block-hack.
Re:Ask HN: Hacker News comment tree indentation on text-base... by dharmab on Friday February 05, 2021 @10:11PM (#26043775)
Re:Ask HN: Hacker News comment tree indentation on text-base... by aloisdg on Friday February 05, 2021 @06:29PM (#26042524)
the generics in go tricks?
Re:Ask HN: Hacker News comment tree indentation on text-base... by vaughnegut on Friday February 05, 2021 @06:41PM (#26042594)
What could possibly go wrong with `interface{}` and reflection?
Re:Ask HN: Hacker News comment tree indentation on text-base... by Blikkentrekker on Friday February 05, 2021 @06:44PM (#26042612)
We have generics; we have the technology: https://i.redd.it/9uoa5ngjnba51.png
Re:Ask HN: Hacker News comment tree indentation on text-base... by austincheney on Friday February 05, 2021 @06:41PM (#26042593)
It is more old than non standard. At one point this was near universal common practice. It is 90s era visual formatting for HTML before anybody used CSS. Dang has been quite clear that he is unpracticed with CSS.

It wasn't CSS that killed this manner of formatting visual content, circa 2005-2010. It was lawyers as it isn't friendly to accessibility.

Re:Ask HN: Hacker News comment tree indentation on text-base... by Blikkentrekker on Friday February 05, 2021 @11:13PM (#26044075)
> It was lawyers as it isn't friendly to accessibility.

That is the point, and that is why it was changed.

The markup should reflect the structure and meaning of the document, so that accessibility tools and crawlers might better understand it.

Ideally, with all CSS and Javascript turned off, it should look as a plain, white, unintereseting, but otherwise usable website.

Re:Ask HN: Hacker News comment tree indentation on text-base... by mssundaram on Friday February 05, 2021 @08:03PM (#26043135)
Ah, so that's why Firefox reader mode renders it all flat
Re:Ask HN: Hacker News comment tree indentation on text-base... by akalsz on Friday February 05, 2021 @05:50PM (#26042230)
That makes sense then, w3m's inline image option was probably disabled for OP and the other two can't inline images at all.