frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Picknplace.js, an alternative to drag-and-drop

https://jgthms.com/picknplace.js/
72•bbx•2d ago
I find that the drag and drop experience can quickly become a nightmare, especially on mobile. To tap, hold, drag, and scroll, all at the same time, is both difficult to achieve, and prone to errors. I've always had in mind this 2-step approach, where picking an element and placing it were two separate steps. So I implemented this basic version to showcase my idea.

While it might take more time than a regular drag and drop, the benefit is for people who struggle with holding down the mouse button. With picknplace.js, you only need two clicks and some scrolling.

This solution is meant as an experiment, so I'm open to discussion.

Comments

feep•2d ago
https://github.com/jgthms/picknplace.js/

Linked in page is 404.

gabrielsroka•2d ago
Your link is 404 (is that what you meant?)

Their page uses https://jgthms.com/picknplace.js/picknplace.js

bbx•2d ago
Sorry, it's public now.
mrozbarry•2d ago
The keyboard arrows to move works nice, but pressing enter to place appears to cancel it. I'm on firefox 145/mac os 15.6.1 if that matters.
bramhaag•2d ago
On mobile this is a strong contender for the worst UX I've ever seen. The whole page moves, so you have to continously scroll back up after placing something.

If when in pick mode you would only scroll the list, I would be able to organize it much faster.

Bolwin•2d ago
Scroll up to what? The whole list fits on screen for me
anonymous908213•2d ago
It's even worse on desktop. You have to scroll the entire screen (with mousewheel or arrow keys) to move the selection. I spent 30 seconds thinking it was bugged because the intuitive solution would be to click once, then simply click where you want to place it, but the "place" button only showed up on the one you already "picked". Fine idea, worst conceivable execution of UX I have ever seen.
chipheat•1h ago
Perhaps a combination of the two? Maybe standard drag-and-drop works as usual, but if you drag the item to some deadzone (like the side of the screen?), it will stick and you're free to scroll to where you want to put it.
bangaladore•2d ago
Given I need to read the instructions to understand how to use this, It's a no go for me. I clicked it and I thought there was a bug because I could only place on the element I clicked.
hinkley•1h ago
I just tried it? And it did something that seemed weird but reasonable.
fellowniusmonk•2d ago
Regardless of the technical and UX merit of this project.

There are clearly a bunch of people who haven't used a new interface in perhapse years and are simply obtuse.

It took me less than 5 seconds to start using this one handed while I was pissing at a urinal, I mean that quite literally.

nkrisc•1h ago
Yes, the users must be wrong.
breadchris•2d ago
wow! I love this solution. I agree on the pain of drag and drop on mobile.
loa_observer•2d ago
how does it work with more complex layout not just vertical list of items, like those drag-and-drop for visualization UI: https://github.com/Kanaries/graphic-walker

you can see that there are different areas of draggable and droppable, on different directions.

jotaen•2d ago
This looks like an interesting concept!

> I find that the drag and drop experience can quickly become a nightmare, especially on mobile.

To me, drag and drop is only a nightmare on mobile. On desktop (using a mouse or trackpad), drag and drop actually works quite well.

Your design experiment reminds me of a recent talk of Scott Jenson, where he talked about how we just took over established UX patterns from desktop to mobile as is, and how that created all sorts of nuisances. (https://youtu.be/1fZTOjd_bOQ?t=1565)

If mobile drag&drop was implemented like you are suggesting from the very start, I actually might have preferred that over the situation we now ended up with.

One technical note on your implementation: on certain mobile browsers, there is a glitch where the UI can jump around as the browser dynamically slides top or bottom menu bars in and out.

ndgold•1d ago
I do not like this. I am still glad you shared it!
aitchnyu•1d ago
I repeatedly clicked pick and place and scratched my head for a minute. Wish there were a cue that I have to scroll.
nkrisc•1h ago
Viewing this on my phone and tapping the colored does nothing at all. Are they supposed to do something?
codeptualize•1h ago
That's neat. Not sure if I would deploy it, as it will be hard to explain/teach people how to use it (as I see in other comments already), but I do see the value in it.

It solves the "drag and drop beyond what fits the screen" much better than you can with drag and drop, the awkward auto-scroll-on-nearing-the-edge-thing.

I would say, if you need to reorder many items, it gets a bit disorienting, the whole list moves as it's anchored to the item you are moving. Maybe there is a way to combine drag and drop where this kicks in if you go beyond the bounds of the visible area.

Also don't think this can work well with multiple axis/drop zones.

hinkley•1h ago
I wonder if a stack metaphor would work for that. So that N items are no bigger than 2 items.
css_apologist•1h ago
i was expecting when i click pick, that a "place" button would appear on each other item, or i could click on a row

OR possibly highlighting the spots between rows either with a line, or "place"

i think that's a much more intuitive & reliable ui, and would be an improvement on drag n drop. or a supplement to it

bbx•1h ago
That's a great idea actually. I'd have to find a way to highlight the possible landing spots.
css_apologist•1h ago
(i do like innovating on this btw)

here's a basic CSS starting point

    :has(.pnp-picked) .pnp-item:not(.pnp-picked):not(:last-child)::after {
        content: "[place]";
    }
topaz0•1h ago
Does not work with an indexed scrollwheel -- one click of the scroll wheel moves like 4 lines in your list, which seems to break the assumptions of your code. I get very strange behaviors, e.g. "pick" Five, scroll up and down, see swapping of Ten and Six during scroll. Then "place" results in Five being in the same place as before but Nine and Ten are swapped. Similar when using arrow keys.
hinkley•1h ago
These feel like fixable things.
topaz0•16m ago
The ones that are moving the wrong item to the wrong place are fixable, but there will always be a problem when scrolling is quantized if there is a possibility that any item in the list is shorter than the scroll quantum.
sgt•1h ago
Interesting concept but kind of unintuitive to figure out without reading about it first. Maybe you can tweak it?
hysan•1h ago
This doesn’t appear to always work? Sometimes the placed item gets sent back to the original position even though it’s clearly being placed in a new spot (at least from what I can see visually). The UX idea is nice.
victorbjorklund•1h ago
I don’t love it but really cool as something to test a new way.
racl101•1h ago
Interesting.

Definitely see its potential for mobile pages.

On web it feels unintuitive to scroll. It feels more natural to drag and drop. Guess Trello boards have conditioned us.

But on web this control is way better.

paxys•1h ago
Neat concept, but why scroll the entire page? It just ends up being distracting and confusing. Once you hit "pick" the scroll action should affect just the list and nothing else.
euph0ria•1h ago
Ideas for usability: -Add a background behind the buttons when you have picked. -When having picked, display above the buttons a helper text like "Now scroll to change position".
woodpanel•1h ago
Came here to write the same. Give it some visual state of “pickedness“ (e.g. by displaying this state as elevated).

But in any case, great stuff!

hinkley•1h ago
CSS outline would be a good visual indicator here as it won’t modify the page layout.
mattacular•1h ago
Really nice, I found it highly intuitive on first use. Only thing I might suggest is making it more obvious what the "handle" button is that initiates the pick.
hinkley•1h ago
It’s been a long time since I’ve said “woah” out loud to something that wasn’t a science video.

This is much better on mobile and I suspect for accessibility.

flowerthoughts•1h ago
Oh, lovely. Let's play with this problem. Variations to consider:

- Zoom out after drag start and back in when hovering over items.

- Drag to a staging area/clipboard.

kej•1h ago
I could see this being really useful for editing lists that are longer than the page. The example that immediately comes to mind is reordering a playlist on YouTube Music, which currently requires dragging to near the screen edge and trying to convince the list to scroll while you still hold on to the item you're trying to move.
hoppp•1h ago
Doesn't work on my phone or I just didn't get it at all.
jmisavage•1h ago
Interesting concept. Not sure if I like it more than drag and drop though, but I do love explorations like this. Reminds me of the old days when Flash devs would build some truly crazy stuff.

Potential bug: The first time I tried it on my iPad, it didn’t place the item, but it did on subsequent uses.

mentalgear•1h ago
For mobile, this seems like a good, maybe even better solution than the status Quo. Maybe not so much for desktop.
dzogchen•36m ago
Took me about a minute to figure out how it works.
lylejantzi3rd•30m ago
It's interesting. I was expecting the bar to follow the cursor as you move it and clicking a second time would place it wherever it was.

But, that's on desktop. The scrolling works a lot better on mobile.

stevenhubertron•18m ago
The amount of time it took me to figure out how to use this I am embarrassed to say was too long.
nkmnz•15m ago
Yeah me too. It was only on third try that I realized I shouldn't move the cursor but just scroll :D
untech•16m ago
It’s good, I like it. I think that it might become easier to use if:

- The whole item is clickable for the pick

- Picked state is indicated clearly, possibly by hovering the item

- You click on the item itself to place, or possibly anywhere on the screen

recursive•13m ago
How move an item from the top to the bottom? Do you need to add 100% padding to the top and bottom of every list? Most lists can't be scrolled far enough to get the screen coordinates of the top to the bottom.

Beginning January 2026, all ACM publications will be made open access

https://dl.acm.org/openaccess
1145•Kerrick•7h ago•129 comments

We pwned X, Vercel, Cursor, and Discord through a supply-chain attack

https://gist.github.com/hackermondev/5e2cdc32849405fff6b46957747a2d28
433•hackermondev•3h ago•173 comments

GPT-5.2-Codex

https://openai.com/index/introducing-gpt-5-2-codex/
294•meetpateltech•4h ago•170 comments

Texas is suing all of the big TV makers for spying on what you watch

https://www.theverge.com/news/845400/texas-tv-makers-lawsuit-samsung-sony-lg-hisense-tcl-spying
324•tortilla•2d ago•184 comments

How China built its ‘Manhattan Project’ to rival the West in AI chips

https://www.japantimes.co.jp/business/2025/12/18/tech/china-west-ai-chips/
126•artninja1988•4h ago•112 comments

Skills for organizations, partners, the ecosystem

https://claude.com/blog/organization-skills-and-directory
212•adocomplete•5h ago•135 comments

Classical statues were not painted horribly

https://worksinprogress.co/issue/were-classical-statues-painted-horribly/
509•bensouthwood•10h ago•253 comments

Two kinds of vibe coding

https://davidbau.com/archives/2025/12/16/vibe_coding.html
31•jxmorris12•1h ago•13 comments

1.5 TB of VRAM on Mac Studio – RDMA over Thunderbolt 5

https://www.jeffgeerling.com/blog/2025/15-tb-vram-on-mac-studio-rdma-over-thunderbolt-5
9•rbanffy•40m ago•0 comments

T5Gemma 2: The next generation of encoder-decoder models

https://blog.google/technology/developers/t5gemma-2/
70•milomg•3h ago•10 comments

Delty (YC X25) Is Hiring an ML Engineer

https://www.ycombinator.com/companies/delty/jobs/MDeC49o-machine-learning-engineer
1•lalitkundu•2h ago

The Legacy of Nicaea

https://hedgehogreview.com/web-features/thr/posts/the-legacy-of-nicaea
17•diodorus•5d ago•1 comments

How did IRC ping timeouts end up in a lawsuit?

https://mjg59.dreamwidth.org/73777.html
99•dvaun•1d ago•11 comments

Show HN: Picknplace.js, an alternative to drag-and-drop

https://jgthms.com/picknplace.js/
72•bbx•2d ago•47 comments

The Scottish Highlands, the Appalachians, Atlas are the same mountain range

https://vividmaps.com/central-pangean-mountains/
59•lifeisstillgood•3h ago•15 comments

FunctionGemma 270M Model

https://blog.google/technology/developers/functiongemma/
117•mariobm•4h ago•33 comments

Firefox will have an option to disable all AI features

https://mastodon.social/@firefoxwebdevs/115740500373677782
187•twapi•4h ago•173 comments

TRELLIS.2: state-of-the-art large 3D generative model (4B)

https://github.com/microsoft/TRELLIS.2
50•dvrp•2d ago•10 comments

Show HN: Stop AI scrapers from hammering your self-hosted blog (using porn)

https://github.com/vivienhenz24/fuzzy-canary
86•misterchocolat•2d ago•53 comments

Your job is to deliver code you have proven to work

https://simonwillison.net/2025/Dec/18/code-proven-to-work/
566•simonw•8h ago•481 comments

Meta Segment Anything Model Audio

https://ai.meta.com/samaudio/
110•megaman821•2d ago•14 comments

Oliver Sacks put himself into his case studies – what was the cost?

https://www.newyorker.com/magazine/2025/12/15/oliver-sacks-put-himself-into-his-case-studies-what...
22•barry-cotter•2h ago•61 comments

How to hack Discord, Vercel and more with one easy trick

https://kibty.town/blog/mintlify/
74•todsacerdoti•3h ago•14 comments

I've been writing ring buffers wrong all these years (2016)

https://www.snellman.net/blog/archive/2016-12-13-ring-buffers/
40•flaghacker•2d ago•18 comments

Using TypeScript to obtain one of the rarest license plates

https://www.jack.bio/blog/licenseplate
125•lafond•8h ago•133 comments

AI Vending Machine Was Tricked into Giving Away Everything

https://kottke.org/25/12/this-ai-vending-machine-was-tricked-into-giving-away-everything
17•duggan•1h ago•1 comments

Please just try HTMX

http://pleasejusttryhtmx.com/
393•iNic•8h ago•331 comments

The <time> element should do something

https://nolanlawson.com/2025/12/14/the-time-element-should-actually-do-something/
52•birdculture•2d ago•16 comments

Launch HN: Pulse (YC S24) – Production-grade unstructured document extraction

31•sidmanchkanti21•7h ago•34 comments

The immortality of Microsoft Word

https://theredline.versionstory.com/p/on-the-immortality-of-microsoft-word
33•jpbryan•7h ago•48 comments