←back to thread

Overengineered Anchor Links

(thirty-five.com)
392 points matser | 1 comments | | HN request time: 0.2s | source
Show context
LinuxAmbulance ◴[] No.43571959[source]
As a backend person, sometimes I look at what's being done for front end stuff and pull back in ever so slight horror.

It's an excellent article, and the work within is very well done, but there's a part of me that screams "Why would you introduce this much complexity for what should be a simple scroll?" (overcoming technical hurdles to produce the desired end result aside).

replies(15): >>43571970 #>>43572158 #>>43572805 #>>43573073 #>>43573171 #>>43573393 #>>43574527 #>>43574744 #>>43575824 #>>43577195 #>>43577887 #>>43579848 #>>43580668 #>>43584041 #>>43590654 #
nkrisc ◴[] No.43573171[source]
Because the default behavior, the problem they describe in the introduction, is bad. It confuses many people, I’ve seen it firsthand many times as an observer in usability testing.
replies(1): >>43573519 #
erikpukinskis ◴[] No.43573519[source]
Is it really necessary to highlight the heading at all?

I’m a passionate frontend engineer, but I do think we are often busy “asking if we could”, and ignore “if we should”.

Worth noticing, on mobile you can’t even read the conclusion in the “it’s beautiful” demo, because the navigation covers it.

I understand that it is just a demo, and that issue could be solved independently…

But I think it also points at the observation that when you try to do these kinds of unusual things, you open yourself to unintended consequences.

And while you can mitigate those consequences one by one, my experience is that you generally won’t have a chance nailing them all, unless you are also minimizing their number… by not getting too fancy.

replies(2): >>43576216 #>>43577865 #
1. hombre_fatal ◴[] No.43577865[source]
> Is it really necessary to highlight the heading at all?

You should be able to take a given UX and ask yourself if it can be improved.

A table of contents that tells you where you are on the page is useful.

Here's an implementation: https://getbootstrap.com/docs/5.3/components/modal/

On desktop, the table of contents on the right shows you which header you're on.