Make WordPress Core

Opened 12 years ago

Closed 9 years ago

#20791 closed enhancement (fixed)

Add tolerance: 'pointer' option to widgets

Reported by: alexvorn2's profile alexvorn2 Owned by: chriscct7's profile chriscct7
Milestone: 4.3 Priority: normal
Severity: normal Version: 3.2
Component: Widgets Keywords: has-patch commit
Focuses: javascript, administration Cc:

Description

I made a conclusion that it's more easy to sort the widgets in a sidebar if is with tolerance: 'pointer' option enabled...

please consider adding this to sortable function of the widgets.

Attachments (3)

20791-1.diff (425 bytes) - added by jkudish 12 years ago.
first pass at adding tolerance: pointer to the widgets sortable js
20791.2.diff (413 bytes) - added by MikeHansenMe 12 years ago.
file rename
20791.3.diff (407 bytes) - added by MikeHansenMe 9 years ago.

Download all attachments as: .zip

Change History (19)

#1 follow-up: @jkudish
12 years ago

  • Keywords needs-patch 2nd-opinion removed
  • Resolution set to invalid
  • Status changed from new to closed

Looks like the latest copy of trunk already has tolerance: pointer, as per: https://core.trac.wordpress.org/browser/trunk/wp-admin/js/widgets.dev.js#L153

#2 in reply to: ↑ 1 ; follow-up: @SergeyBiryukov
12 years ago

  • Keywords needs-patch 2nd-opinion added
  • Resolution invalid deleted
  • Status changed from closed to reopened

Replying to jkudish:

Looks like the latest copy of trunk already has tolerance: pointer

It's in droppable() function. This ticket is about sortable().

#3 in reply to: ↑ 2 @jkudish
12 years ago

Replying to SergeyBiryukov:

It's in droppable() function. This ticket is about sortable().

My mistake, should have looked closer :(

@jkudish
12 years ago

first pass at adding tolerance: pointer to the widgets sortable js

#4 @alexvorn2
12 years ago

  • Version changed from 3.3.2 to 3.4

#5 @DrewAPicture
12 years ago

  • Version changed from 3.4 to 3.3.2

Version field tracks when the feature was first requested.

#6 @SergeyBiryukov
12 years ago

  • Keywords has-patch dev-feedback added; needs-patch 2nd-opinion removed

@MikeHansenMe
12 years ago

file rename

#7 @MikeHansenMe
12 years ago

Updated the file to apply patch to widgets.js instead of widgets.dev.js now that production js is minified.

#8 @MikeHansenMe
12 years ago

  • Cc mdhansen@… added

#9 @alexvorn2
12 years ago

  • Severity changed from minor to normal

@MikeHansenMe
9 years ago

#10 @chriscct7
9 years ago

  • Keywords ux-feedback added; dev-feedback removed
  • Milestone changed from Awaiting Review to 4.3
  • Owner set to chriscct7
  • Status changed from reopened to accepted
  • Version changed from 3.3.2 to 3.2

#11 follow-up: @helen
9 years ago

Can we get a description of what "easier" is here, perhaps with some screencasts?

#12 in reply to: ↑ 11 @chriscct7
9 years ago

Replying to helen:

Can we get a description of what "easier" is here, perhaps with some screencasts?

Here's a demo that shows why the pointer tolerance makes it easier:
http://jquery-ui.googlecode.com/svn/tags/1.6rc5/demos/sortable/tolerance.html

Default Tolerance:
Try dragging the box called "default tolerance" to the middle of the first row (so basically to the right of "2" in the first row). Note that you have to be past 2 before the shift happens, even though you know you're going to move it past it.

Pointer Tolerance:
Try dragging the box called "pointer tolerance" to the middle of the second row (so to the right of the row 2 "2". Note jQuery realizes you're going to drag it to the right, and does the swap after you've passed about 80% of the box.

Screencast demo: https://db.tt/VWg57PTm

#13 @chriscct7
9 years ago

Is it a massive UI improvement? I mean its not earth shattering but it is slightly more intuitive and also makes position changes faster. You don't have to unintuitively drag it as far as you do right now

#14 @chriscct7
9 years ago

  • Focuses javascript administration added
  • Keywords commit added; ux-feedback removed

#15 @johnbillion
9 years ago

  • Type changed from feature request to enhancement

This is a small but really nice change. Adding it to the widget customizer too.

#16 @johnbillion
9 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 32689:

Switch to pointer tolerance for improved drag and drop behaviour when reordering widgets.

Props jkudish, MikeHansenMe.
Fixes #20791

Note: See TracTickets for help on using tickets.