[wp-trac] [WordPress Trac] #26086: Fix "moby6"

WordPress Trac noreply at wordpress.org
Sun Nov 17 19:00:14 UTC 2013


#26086: Fix "moby6"
----------------------------+----------------------
 Reporter:  azaozz          |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  3.8
Component:  Administration  |    Version:  trunk
 Severity:  normal          |   Keywords:  ui-focus
----------------------------+----------------------
 The MP6 merge introduced a component (moby6) that needs quite a lot of
 fixing. The JS part of it (currently in common.js) is mostly "hacks", good
 for a testing plugin but not for core. Most of the functionality there can
 be done better with CSS.

 - Most names are non descriptive ("moby6" sounds like a plugin's prefix?).
 Some names are quite poor for use in core, like `activate` and
 `deactivate` custom jQuery events.
 - Global custom jQuery events are better attached to `document`, not
 `documentElement`.
 - Disabling jQuery UI sortable is done with
 `$(selector).sortable('disable')` not by changing the handle elements
 classes. Also there is some JS making it (mostly) possible to use UI
 Sortable on touch devices. If that is not needed anywhere, better to
 remove it.
 - Syntax like `window.stickymenu && window.stickymenu.enable();` is not
 particularly readable, core uses `if ( typeof ... !== 'undefined' )`. Also
 there is no `stickymenu` JS global in core, the name is `stickyMenu`.
 - Cloning an element from JS, appending it to a different place in the DOM
 and then hiding the original is a really hacky way to move the search box
 on some screens. If it really really has to be done from JS, the original
 can me moved, no need of cloning.
 - The `removeHamburgerButton` function doesn't do anything.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26086>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list