News for hackers. Stuff that matters.
Re:Ask HN: When did comments start being split across pages? by Raphmedia on Wednesday March 08, 2017 @11:32AM (#13821324)
If anything they should make it so that when you click "show more" it adds the next page to the current page instead of redirecting you to another page.
Re:Ask HN: When did comments start being split across pages? by SippinLean on Wednesday March 08, 2017 @11:59AM (#13821530)
This is what reddit does, but that has its own problems: How do I ctrl+f the whole content? What if I refresh? What if I don't have JS? I haven't seen an elegant solution yet.
Re:Ask HN: When did comments start being split across pages? by pmontra on Wednesday March 08, 2017 @12:24PM (#13821713)
I guess that the noscript behaviour should be to present the "More" link and let the user click it to load a new page. Exactly what we have now.

The JS in the page should attach an event to the link to append the new page at the bottom. Better: it should do it automatically when the scroll position is close enough to the end.

Bonus: the script should add a search box to search even in the content not yet in the page.

I googled if it's possible to intercept CTRL-F and handle it programmatically. It seems it is [1] but I don't know if I would do it: the user could be surprised to find a search box in a non standard position with a non standard behaviour. It reminds me of scrollbar hijacking.

[1] http://stackoverflow.com/questions/9159322/overriding-the-br...

Re:Ask HN: When did comments start being split across pages? by Raphmedia on Wednesday March 08, 2017 @01:44PM (#13822509)
This opinion is never popular because for some reason developers seem to be dead afraid of asking their user's output.

What I would do is add a dialog the first time the user press CTRL+F. Asks if the user wants the default or the override. Save this in a cookie or in the database.

Re:Ask HN: When did comments start being split across pages? by SippinLean on Thursday March 09, 2017 @10:05AM (#13829711)
"ctrl-f" was overly literal, I simply meant "a way to search the content of all the comments."

A simple (non-JS) "Search these comments" form would suffice, but I've never seen it implemented.

Re:Ask HN: When did comments start being split across pages? by joshka on Wednesday March 08, 2017 @06:06PM (#13824835)
Alternatively, you could load all the threads when responding to ctrl+F for the first time on a page and just leave the browser default find UX alone.
Re:Ask HN: When did comments start being split across pages? by 3131s on Wednesday March 08, 2017 @11:37AM (#13821357)
This 100%, or just put it all on one page. It's just text, so I really don't see why the change was necessary. I didn't notice it until yesterday until the CIA thread but it's really annoying.
Re:Ask HN: When did comments start being split across pages? by jasonkostempski on Wednesday March 08, 2017 @11:39AM (#13821366)
That would require javascript, don't they try to avoid that?
Re:Ask HN: When did comments start being split across pages? by Raphmedia on Wednesday March 08, 2017 @11:55AM (#13821495)
Simply make it so that when JS isn't being used by the link acts normally.

You have two option with the web. Either you put your logic in the backend or in the frontend.

This addition is obliviously to reduce the load on the server. So either you add some logic on the frontend to make the user experience good or you do like they do right now and have a bad user experience.

Re:Ask HN: When did comments start being split across pages? by chatmasta on Wednesday March 08, 2017 @11:46AM (#13821425)
No JS needed. You can do this with CSS using the target selector and display:none. But that would require loading all comments up front which is maybe what they're trying to avoid?
Re:Ask HN: When did comments start being split across pages? by dustinhayes on Wednesday March 08, 2017 @12:18PM (#13821676)
Not really, you could just load the same page with something like ?comments=all from the server.
Re:Ask HN: When did comments start being split across pages? by jasonkostempski on Friday March 10, 2017 @01:58PM (#13841045)
That seems better actually, considering "more" doesn't really make sense when the things you've already gotten may have shifted in the mean time.