Lurker News
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 (152) 101 threads

Earlier comments
topaz02 replies#
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.
hinkley2 replies#
These feel like fixable things.
topaz01 reply#
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#
dom scroll event interceptor maybe?
webstrand#
Somewhat shockingly, apparently DOM does not give access to the raw scrollwheel data.
ljouhet#
I have a regular scroll wheel and it moves two items each time. Totally unusable for me.

(great idea, though)

css_apologist2 replies#
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

bbx1 reply#
That's a great idea actually. I'd have to find a way to highlight the possible landing spots.
css_apologist#
(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]";
    }
iamwil#
I was expecting that the line item would move with my mouse movement, not with my scroll.
ericskiff#
Awesome to see real UX experimentation, and this elicited a strong response from me at first "oh I haaaaate that".

On further reflection, this is very interesting and I understand where the drag and drop interaction breaks down on long lists. Some additional UI affordances to communicate what's happening may make it intuitive and clear.
Things I'd want to experiment with if I was implementing this:
* A "wheel" effect where the items in the list grow slightly as they near the chosen item which stays locked in the interface at the center, popping into place at at each 'click'. Somewhat like the Price Is Right wheel flipper
* Making the interaction entirely scroll based once I click. Setting the item in place can be done by any other click or keypress, and cancelled with the escape hotkey. My interaction is pick, scroll, click (without having to aim back at the thing I just placed by scrolling)

lylejantzi3rd#
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.

Load more comments