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

(jgthms.com)

257 points | by bbx 2 days ago

68 comments

  • px1999 17 minutes ago
    This is really nice and a very original take. It feels good on mobile / other touch devices.

    I'd love to see it feel a bit more polished on desktop (maybe I'll give that a shot if I find a bit of spare time!) - I could see a few simple things like adding up/down arrows to the picked item and wiring into up and down arrow presses going a long way to making it work really well there too.

    Genuinely, thank you for sharing this, it's something different and interesting.

  • thunderbong 5 hours ago
    Brilliant! Its been a while since I've seen a brand new UX patten.

    As some others have mentioned, the picked state needs to be a bit more clear.

    Some suggestions -

    1. As a border around 'Pick' to indicate it as an action

    2. Once an item is picked, add a mask on the whole page, with only the picked item in front of the mask. (This is going to be a bit challenging, I'm guessing, to show the gaps between the items as you scroll)

    3. Once an item is picked, the 'Cancel' and 'Place' bar should have a background. Sometimes this overlaps the list and is not clearly visible.

    4. It should not be possible to scroll way above or below the list.

    5. On 'Cancel' scroll back to the item.

    Again, congratulations! It's one thing to think of something, quite another to be able to implement it nicely.

    • savolai 1 hour ago
      +1 inspiring and relevant to a project i am working on.

      I would suggest having the place button next to/in the item being dragged like Pick. When learning to use this, having it at a distance creates unnecessary cognitive burden.

      Also, I would probably make the entire item clickable for pick, if there didn’t have to be a click target on the item for other functionality.

    • rendaw 25 minutes ago
      I also hate drag and drop.

      It'd be good if when you picked something it automatically added the border too - otherwise I think this won't work on short pages?

      I have some hesitations though - relying on scroll as the positioning method means that if you don't have a fine-grained scroll method e.g. on desktop, if you have a non-continuous wheel, you'll need to rely on "drag and dropping" the scroll bar, which doesn't really improve things (and has its own issues if your page is very long).

      I think I'd prefer something other than scroll-to-position. Like what about making gaps between items with a "drop" button? Or adding up/down arrow buttons to the "picked" element so that fine grained adjustments could be done?

    • uxamanda 4 hours ago
      Yes! This is very cool. Should be somewhat “locked” into the right area of scroll and picked item should have some height above the others.
  • jotaen 2 days 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.

    • killerstorm 7 hours ago
      > On desktop (using a mouse or trackpad), drag and drop actually works quite well.

      Strong disagree here. It is intuitive, it is easy to demonstrate. But it's not really convenient, especially on a trackpad. I have enough mouse agility to play RTS games but not to do a reliable drag-and-drop, especially in a complicated case - across windows, with scroll, etc.

      • jrowen 6 hours ago
        Yes, it can get tricky if you have to scroll a bunch, e.g. moving a file in a big directory into a subfolder, trying to hit that one pixel where it will scroll up, or using two other fingers to attempt to scroll, while holding the drag finger down...(CLI pros, you win this one).

        I would like a desktop pick and place that works like drag and drop, you click and then it sticks to the cursor, but you are free to do whatever gestures until you click again.

        • sunrunner 6 hours ago
          > while holding the drag finger down

          I'm not sure if this is common on other desktop operating systems but the 'Drag Lock' feature on macOS allows you to double-tap an item, then drag it without holding the button down to begin a drag. At that point lifting your finger continues the drag until you tap once to release it.

          I would be amazed at how many people using macOS have never found this option except I'm not sure I've ever seen it being called out as a feature, and nowadays it's also buried deep under Accessibility settings (the irony) instead of just being a Trackpad option, so a lot of users might not even think to go there.

          • stonecharioteer 5 hours ago
            Double tap or double click is to open a file. If you're using it to do anything else, that's so counter intuitive.
  • hnlmorg 22 minutes ago
    I really don’t like this. It took me several attempts to figure out what was going on.

    And even after I had finally figured it out, it still felt more like a rendering glitch than good UX.

    If I struggled then I really can’t see this working for non-technical folk.

    Worse yet, because people wouldn’t expect this behaviour coupled with the fact that scrolling shouldn’t have any changes to the website state, you’ll likely see people constantly making accidental changes to the ordering of the list.

  • digitaltrees 1 hour ago
    I did not like this as is and found it confusing, but think it has potential and with a few adjustments could be great. I am sure you might have been planning them, and so congratulations on getting something out for comment rather than over building.

    1. It will be more intuitive if you can long press or click on the item rather than have to click the "pick" link. That behavior is too deeply ingrained from drag and drop at this point.

    2. It would help to show place locations where it will be inserted between objects. I found myself instinctively scrolling up and down to line it up perfectly because it just didnt feel likely to succeed if it wasnt properly placed in the middle, and the absence of visual cues make it seem like I needed to me more accurate with my placement.

    Overall cool concept and good work. Keep it up.

  • stephenlf 4 hours ago
    This is awesome. I wonder how it would feel if just the selections scrolled, like Apple’s interface for setting alarms and timers.

    I especially love it because it leaves open the possibility of interacting with the rest of the screen while an element is picked. Eg you could navigate a directory tree while finding the right place to put a file. Though I guess it’s similar to cut/paste in that respect.

  • Sn0wCoder 6 hours ago
    Great work building something and having the courage to show HN ;-)

    Interesting design. Even though I read the instructions still could not get it to work for 30 or so seconds. Might want to show some text 'Now Scroll' with up/down arrows to the left or right of the list.

    Seems ok when the list is in the middle of the page and you already have room to scroll up and down, but how is it going to work when the list is at the top or bottom of the page?

    Or when the page is so short it does not scroll at all? I suppose you could have the container scroll but then it needs to be considerable larger than the list.

    Honestly when you click 'Pick' all of the others should say 'Place' would be more intuitive and give the user options to support both. As they use it they will pick up they can scroll if they want.

  • killerstorm 7 hours ago
    Nice. I actually did something similar 25 years ago, I called by think "pick-and-put".

    At that time I switched from MS-DOS environment to Windows 98. And as I was trying new UI features, I found drag-and-drop incredibly annoying. Especially if you do it between different windows, it requires a lot of movements, etc.

    I had an idea that going further into skeuomorphism can make things better, so I started experimenting with 3D UI, particularly, a file manager with 3D UI. And as an alternative to drag-and-drop I designed pick-and-put.

    It's actually very simple: right mouse button picks up an object and you get a symbol of that object next to the cursor. Then a click onto empty space puts it there. Or you can click a copy button which would copy it, etc.

    I think it could work really well if we got a convention that some mouse button always picks an object. But we don't.

    I don't think there's a way to make it works in the same way on desktop and mobile in a way which would be good. On desktop you have a mouse pointer, and you can easily represent point of insertion.

    For mobile you came up with this scroll trick, but I think many people would find it unintuitive and annoying - especially on desktop.

  • bramhaag 2 days 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.

    • adriand 5 hours ago
      > On mobile this is a strong contender for the worst UX I've ever seen.

      Pretty hyperbolic. First of all, this is a human and their work you’re talking about. A little respect goes a long way. Secondly, if this is the worst UX you’ve ever seen on mobile, I have to assume you’ve only been using the internet for the past week or so. This experience worked great for me on mobile Safari with no instructions required. You can’t say that for a lot of mobile UX including, I might add, Safari itself.

    • anonymous908213 2 days 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 10 hours 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.
    • Bolwin 2 days ago
      Scroll up to what? The whole list fits on screen for me
    • whiterook6 8 hours ago
      Surely you're being hyperbolic. I've seen some atrocious UX before. Maybe what you mean is it's a good idea but the scrolling part should be list-based instead of page-based.
      • polalavik 7 hours ago
        No because what if the list is half cut off by the page but you want to go to the bottom? If it doesn’t scroll the page it’s even worse. If it does scroll the page it’s not great. It’s just bad design. Also not intuitive. I didn’t read the directions and it took me a couple seconds to get what was going on.
  • Mikhail_Edoshin 1 hour ago
    Apple Newton had a way to drag/copy things around, a visual clipboard of sorts. They used a stilus, so it's similar. You drag an object to a side of the screen, where it turns into a visible but small handle and stucks. I think it could stay there any time and you could have several objects arranged this way. Then you can go anyplace, including a different application. Once you're in the right place, you could drag an object back and put it where you wanted to put it.
    • pwdisswordfishy 1 hour ago
      Apple Newton had smell-o-vision? It was really ahead of its time.
  • topaz0 10 hours 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 10 hours ago
      These feel like fixable things.
      • webstrand 3 hours ago
        Somewhat shockingly, apparently DOM does not give access to the raw scrollwheel data.
      • topaz0 9 hours 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.
        • awinter-py 4 hours ago
          dom scroll event interceptor maybe?
  • lylejantzi3rd 9 hours 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.

  • css_apologist 10 hours 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

    • iamwil 2 hours ago
      I was expecting that the line item would move with my mouse movement, not with my scroll.
    • bbx 10 hours ago
      That's a great idea actually. I'd have to find a way to highlight the possible landing spots.
      • css_apologist 10 hours 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]";
            }
  • jon_richards 4 hours ago
    But how are you going to replace the OG? https://mrcoles.com/dragondrop/

    (Ironically doesn’t work on mobile)

    • kaizenb 57 minutes ago
      sounds effects on! piuww piuwww! waaaaa I'm going to eat youuu!
  • yojo 4 hours ago
    This reminds me of a UI pattern I saw in an old iOS comic reader (Comic Zeal) for organizing your comics. You had a horizontal rule that worked as a cursor. You could swipe things to the side (“pick”) to add them to the cursor. You then moved the cursor to the desired location and tapped it to dump the contents (“place”).

    My biggest problem with the OP implementation is the “place” button can be far from the “pick” button. Why not just leave it on the moving element - change the label from “pick” to “place” and call it a day.

  • mwillis 3 hours ago
    The “place” aspect of the process needs some refinement. On iOS, it triggers the page bump (and necessitates and extra click) because it’s aligned at the bottom of the page. Having the “place” action hover near the selected object could be an alternative. I really enjoy this pattern. Nice work.
    • chanux 3 hours ago
      cancel place should have some kind of a separator between them. I thought it is to cancel placing instead of two options to cancel or place.
  • bryanhogan 1 hour ago
    This is very cool! I would still call this a 3-step approach, since you are performing 3 actions, but nonetheless, this UX interaction could be quite an improvement in some cases.
  • bangaladore 2 days 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 10 hours ago
      I just tried it? And it did something that seemed weird but reasonable.
  • dash2 1 hour ago
    Why "click, scroll and drop", rather than "click, point and drop"? The latter seems more general, works in 2D, and doesn't require two-finger mouse scrolling.
  • CGamesPlay 5 hours ago
    OK, so I get that you're trying an alternative on the metaphor that drag and drop uses. The metaphor is "pick up the item, move it, then drop it", but the implementation doesn't work well on mobile, so you made it modal. But for me scrolling feels like "pick up the item, move the rest of the world so the item above the target, then drop it". It feels very strange.

    As an refinement, I would keep the modality but add back in the dragging paradigm. Use a typical "move item" scrubber control, but have that control switch the item to a floating modality, and give it "send back" and "drop here" buttons. The user can drag the item, scroll, interact with the page, and the item stays with them to get where they want to go. Here is a crude mockup: https://excalidraw.com/#json=9DwYqkWRhdEgEEqyzY7X8,fCdPzIzTm...

  • untech 9 hours 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

    • cosmic_cheese 8 hours ago
      Came to say that it badly needs better state communication.

      What I’d do is to add a drop shadow and increase scale by 1-3%, with a clean, snappy animation between placed and picked up. I might also add a “gripping hand” graphic with a cursor-like appearance to picked up items and show a “scroll to move” instruction next to the hand graphic if the user hasn’t done anything for a couple of seconds.

  • codeptualize 10 hours 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 10 hours ago
      I wonder if a stack metaphor would work for that. So that N items are no bigger than 2 items.
  • fitsumbelay 4 hours ago
    I'm old enough to remember when using a mouse felt like being unchained. I also remember how quickly dragging began to feel like a time waste, even more so after spending more time on CLIs than GUIs. So though this seems limited to vertically arranged DOM things it's very cool for eliminating the least productive/most frustrating stage of drag-drop interactions

    Would love to see this work with keyboard only

  • jkrubin 2 hours ago
    This is fantastic. It didn’t work for me at first bc i dragged assuming it was dnd, but then would say that is “user error”
  • Timwi 6 hours ago
    When I had to implement a UI for reordering a list, I just had a “move” button on each item, and when you press it “move here” buttons would appear between every item (and at the top and bottom). These buttons are positioned absolutely, so there is no reflow from stretching the list. The location where you ‘place’ the item is where you click, not dependent on scroll position. Without even planning for use on mobile it ended up “just working” on mobile because you only need to tap buttons.
  • kej 10 hours 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.
    • hmokiguess 5 hours ago
      Yessss this exactly! Moving songs up/down in large playlists would be fun with this concept. I wish that was a thing for music apps.
  • wild_pointer 4 hours ago
    9/10 for originality. 2/10 for usefulness.

    Not bashing, that's how good ideas are found. But not this time IMO :)

    • m3sta 3 hours ago
      I disagree.
  • stevenhubertron 9 hours ago
    The amount of time it took me to figure out how to use this I am embarrassed to say was too long.
    • nkmnz 9 hours ago
      Yeah me too. It was only on third try that I realized I shouldn't move the cursor but just scroll :D
  • will_walker 7 hours ago
    As a ux designer, I like this, especially as it solves the problem of dragging mobile elements below the fold or off the visible screen view.

    One suggestion I'd love to try out- let the user select multiple elements at once, and reorder the selected elements in the hovering state using conventional drag and drop mechanics. This might add complexity or might be a much more convenient way to deal with lists!

    Or, dragging the element selected should allow a user to manually ‘place’ the item on screen.

    I wouldn’t use this on desktop, though! Mice typically allow you to scroll and drag pretty easily.

  • hmokiguess 5 hours ago
    I think you could play with sticky footers, sticky headers, and some active styling indicators like opacity and background plus highlights to let the user know they are in scroll mode. Really fun idea, love this! Wish Apple Music UI for moving songs on playlists had that. Holding my dumb while dragging is suboptimal comparing to click and scroll.
  • recursive 9 hours 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.
    • leptons 8 hours ago
      It seems like it only works on pages that scroll, which is not good. I deleted the <header> and <footer> elements on the page, and was unable to anything but "cancel" after clicking "pick". Also did not work setting max-height on the <main> element and overflow-y:scroll, even though I could scroll the items did not scroll with it. It is an experiment and probably doesn't have every implementation detail covered yet.
  • csmantle 7 hours ago
    This actually caused a constant switching of attention on mobile. Each time an element is picked up I'll have to look at the bottom toolbar, then the floating element in the center, then back to the bottom to place it, so on and so forth. And the list in the demo is not that long yet.

    ------

    Will this work on lists that sre short? It seems that it relies on overflow to move the element

  • paxys 10 hours 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.
  • breadchris 2 days ago
    wow! I love this solution. I agree on the pain of drag and drop on mobile.
  • hinkley 10 hours 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.

  • jmisavage 10 hours 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.

  • sgt 10 hours ago
    Interesting concept but kind of unintuitive to figure out without reading about it first. Maybe you can tweak it?
  • ickelbawd 8 hours ago
    Very cool concept. Several people have made good suggestions on improving the UX. If I were implementing I’d probably try to support a stack of picked items so I could grab several and move them all at once.
  • jahsome 6 hours ago
    On mobile I wish there were a way to lock the browser window from scrolling. It was really disorienting with both the window and the list item moving.
  • aitchnyu 1 day ago
    I repeatedly clicked pick and place and scratched my head for a minute. Wish there were a cue that I have to scroll.
  • nvader 5 hours ago
    I instinctively tried to tap on the object again to place it, and I think that should be the default.
  • hysan 10 hours 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.
  • ajkjk 6 hours ago
    you should perhaps mention that this is about dragging and dropping objects in lists. otherwise there is an additional level of jarring-ness due to not even knowing what problem you're trying to solve (and then bewildered by what it does as a result).
  • euph0ria 10 hours 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".
    • hinkley 10 hours ago
      CSS outline would be a good visual indicator here as it won’t modify the page layout.
    • woodpanel 10 hours 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!

  • joshribakoff 6 hours ago
    Doesnt work, place just reverts on mobile safari. Even if it worked this adds steps.
  • mattacular 10 hours 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.
  • popalchemist 3 hours ago
    Unresponsive in chrome, even in incognito.
  • racl101 10 hours 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.

  • flowerthoughts 10 hours 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.

  • feep 2 days ago
  • mentalgear 9 hours ago
    For mobile, this seems like a good, maybe even better solution than the status Quo. Maybe not so much for desktop.
  • mrozbarry 2 days 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.
  • loa_observer 2 days 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.

  • nkrisc 10 hours ago
    Viewing this on my phone and tapping the colored does nothing at all. Are they supposed to do something?
  • hoppp 10 hours ago
    Doesn't work on my phone or I just didn't get it at all.
  • nurettin 2 hours ago
    Great, maybe highlight the item so we can distinguish the picked item from the others without scrolling.
  • victorbjorklund 10 hours ago
    I don’t love it but really cool as something to test a new way.
  • deskman 4 hours ago
    Honestly when I see things like this, I feel Ai can steal our coding but it can NEVER still our resoning and creativity. Thanks for sharing!
  • fellowniusmonk 2 days 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 10 hours ago
      Yes, the users must be wrong.
  • dzogchen 9 hours ago
    Took me about a minute to figure out how it works.
  • benatkin 3 hours ago
    I completely got the point of it, however, I wanted to do something that was easy with this and not so easy with traditional drag and drop, which is move an object down several screenfuls. If it had 50 items rather than 10 I think it would be better for both those who easily see the advantage of this method and those who don't.
  • ndgold 2 days ago
    I do not like this. I am still glad you shared it!
  • alexjray 5 hours ago
    Not trying to diminish the work at all because it works well but I hate this UX pattern. There is likely a reason this hasn't been done. If it wasn't for the pick -> scroll -> place instruction I would have no idea how to use it.
  • gaigalas 8 hours ago
    Ditch the scroll.

    Pick: all previous "Pick" buttons become "Place". You choose one.

    Done. Simple, explicit, intuitive.

  • wnevets 8 hours ago
    is the whole page supposed to scroll when you scroll after picking?
  • agumonkey 8 hours ago
    a bit confusing, but lovely original idea, well made demo too

    thanks for sharing

  • lloydatkinson 6 hours ago
    Doesn't do anything in Edge?