Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#8364 closed enhancement (fixed)

Make drag and drop smoother action

Reported by: janeforshort's profile janeforshort Owned by:
Milestone: 2.7 Priority: normal
Severity: normal Version: 2.7
Component: UI Keywords:
Focuses: Cc:

Description

The dashboard drag and drop is almost too glitchy for words. The targets appear and disappear lightning fast, and when hovering over the actual place they want to drop, target nowhere to be found. Often they have to drag to a position below ideal target, then drag the higher module down. What should be one drag can take several steps. Because this is on the dashboard, it will set a tone for the entire application, so I've marked this as major. Do we know why this is so glitchy?

Change History (8)

#1 @jacobsantos
16 years ago

jQuery seems to have issues with pointer locations and areas.

#2 @azaozz
16 years ago

Unfortunately there's not much we can do short of rewriting parts of jQuery UI Sortables. It seems it needs some timeout/delay when moving the placeholder and also less sensitivity when dragging one postbox over another. Hopefully next version would improve this.

#3 @dberebi
16 years ago

I've tried to fix this and spent some hours of work but with no succeed.
So I'll just write here what I've already tried out.

Firstly, I've never used jQuery's sortable interface, so I've searched for documentation and receive this page, well, it's the wrong one. All the site under interface.eyecon.ro use a different javascript from what WP use.

The correct one is the Official jQuery docs that somehow was really low in the search results.

The file \wp-admin\js\postbox.js is the file that activate the sortable and pass all the arguments.
I think the 'opacity' argument should be added to make the dragged element partially transparent.

Inside the file \wp-admin\includes\dashboard.php you can find the definition of the function wp_dashboard which generate the page content, wp_dashboard call the function do_meta_boxes (defined in \wp-admin\includes\template.php) twice (right+left), which generate each of widgets.

Inside \wp-admin\js\postbox.js I've tried to play with the values of the 'tolerance' argument, tried all of them ("guess", "intersect", "tolerance", "pointer").

Inside the function wp_dashboard I've changed classes and IDs to disable all the CSS defined by WP and tried everything I could think of (margins, width, positioning, floating, HTML tables without CSS and more), the widgets changed their behavior but not to the desired behavior.

Even when I disabled (from the php source) one column and remove almost all of the CSS / HTML complexity, it's still was irritating.

I think the problem is with the relatively complex WP admin interface, the only working demo of the sortable technique was this page that is really really simple.

Can anybody find a working example of jQuery's sortable with the same complexity of WP?

#4 @johnbillion
16 years ago

  • Summary changed from Dashboard Drag and Drop very glitchy to Draggable boxes very glitchy

This doesn't just happen on the dashboard, this happens with the boxes on the post writing screen too.

#5 @jacobsantos
16 years ago

  • Milestone changed from 2.7 to 2.8

Not a WordPress issue it seems. Any "fix" would have to be submitted upstream. I don't want to close this because it would be good to track it and keep it open for others to prevent duplicates.

Moving to next release, since it doesn't seem to be fixed anytime soon.

#6 @azaozz
16 years ago

(In [10019]) Make postboxes less "jumpy" when dragging, see #8364

#7 @ryan
16 years ago

  • Component changed from General to UI
  • Owner anonymous deleted
  • Severity changed from major to normal
  • Summary changed from Draggable boxes very glitchy to Make drag and drop smoother action
  • Type changed from defect (bug) to enhancement

#8 @ryan
16 years ago

  • Milestone changed from 2.8 to 2.7
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.