Live data from Hacker News

One Million Checkboxes

onemillioncheckboxes.com

81–90 of 320 posts

Re: One Million Checkboxes

#81
post #27

tried doing: ``` $$('input[type=checkbox]').forEach(elt => elt.click()); ``` and got an alert that said "CHILL LOL". fun site

Hmm… Is there a way to trick it to accept js that checks all boxes?

The problem is you need to send 467k (current count of checked boxes) websocket messages and backend(s) are already dying for ~1 hour. Good luck with that, I only played for some time by clearing first 1000 boxes every few seconds.

Even after you send those 467k messages they need to be sent to (I assume) few thousands browsers each, so you need to wait for 467M messages to go through :D

Re: One Million Checkboxes

#82
It’s considered bad UX to have a million checkboxes (or a million of any UI element) on a single page.

Consider breaking this up into 3-deep nested pages, each with 100 options.

Re: One Million Checkboxes

#83
post #34
post #8

(developer here) this is....more popular than i expected. the server's gonna be having some problems for a while

I think there's a severe problem with this implementation. By using wrapping, I can't write "boobs" and have everyone else read my graffiti without them having having the same zoom wrapping point.

I spent five minutes writing “hey you, yes you” only to read your comment and realize my message is unparsable for those not on mobile.

Re: One Million Checkboxes

#84
post #8

(developer here) this is....more popular than i expected. the server's gonna be having some problems for a while

i spun up 5 more servers and pushed some optimizations and i think it's gonna be ok for a bit.

Re: One Million Checkboxes

#85
post #27

tried doing: ``` $$('input[type=checkbox]').forEach(elt => elt.click()); ``` and got an alert that said "CHILL LOL". fun site

document.querySelectorAll("input[type=checkbox]").forEach(i => { i.checked = false; });

seems to work for a second. no alert.

Re: One Million Checkboxes

#86

It’s considered bad UX to have a million checkboxes (or a million of any UI element) on a single page. Consider breaking this up into 3-deep nested pages, each with 100 options.

Or at least an accordion for each row of checkboxes, with the first row expanded but all others closed by default.

Re: One Million Checkboxes

#89
I wonder what we'd see if you could only check boxes that are adjacent to already checked boxes (you'd obviously need to seed the array with some "anchors"). How long would it take for people to clear it?

Re: One Million Checkboxes

#90
post #59

Earlier quoted context omitted.

Would be fun to read a writeup of how you implemented it.

it's a tiny flask server, a bitset stored in redis, updates broadcast (too frequently! but i don't want to change it now) via websockets, and react-window to only render the checkboxes that are in view. I'll do a writeup when i finish putting out fires!

for future readers, i ended up swapping things out and batching my updates. spooky to do live, but helped a lot with performance
Post reply on HN