[wp-trac] [WordPress Trac] #50699: Fix and improve arranging metaboxes

WordPress Trac noreply at wordpress.org
Thu Oct 22 03:17:36 UTC 2020


#50699: Fix and improve arranging metaboxes
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  azaozz
     Type:  task (blessed)                       |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.6
Component:  Administration                       |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-dev-   |     Focuses:  ui,
  note                                           |  accessibility
-------------------------------------------------+-------------------------

Comment (by johnjamesjacoby):

 Sorry @azaozz, my friend, but I dislike r49179 and the general direction
 this is going.

 Remember, that the meta-box API is not specific to Posts. It's used in
 Media and mocked in Comments, but the API itself is flexible enough to be
 used on any screen by plugins that register them. That means this affects
 more than just Core pages - it's every plugin that uses meta-boxes.

 Anecdotally as a user, I rearrange meta-boxes all the time, and as a
 developer I rely on the meta-box API extensively in several plugins that
 anticipate the ability to easily rearrange them. BuddyPress, bbPress, WP
 User Profiles, Sugar Calendar, Easy Digital Downloads, all are using them
 with the expectation their meta-boxes can be easily dragged and dropped.

 After #49288, what is in trunk now is actually the worst of both worlds –
 there is no keyboard navigation and there is no mouse navigation, and it's
 made extra weird that they can still be toggled open & closed but cannot
 be moved. All users now lose the ability to obviously customize screens
 that use meta-boxes, which is a fundamental UX that's been in WordPress
 since at least 2007.

 > I'm not sure I would ever discover that as an existing user and would be
 convinced everything was broken if I updated with no context.

 This was me for 30 minutes this evening. I started by assuming some code
 of my own creation had broken all meta-boxes across my multi-network
 installation. After a brief panic and after deactivating all plugins, I
 narrowed it down to this change. It never occurred to me that "Screen
 Options" was the key to re-unlocking this behavior. There is simply no way
 this is easier for anyone.

 In addition, because of the way this JavaScript is written and enqueued
 together, I don't see a reliable way to bring the old functionality back
 with a plugin without forking the old file, dequeueing this one, and
 hacking some JavaScript to remove the new text in Screen Options.

 > However that introduced an always visible drop-area on the Dashboard
 when only one metabox is visible.

 Suggest to fix this as an isolated concern.

 > Seems better to fix that bug and at the same time improve/enhance how
 metaboxes are dragged/moved/arranged in general.

 Suggest to deeply reconsider this elsewhere, perhaps on #51419.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50699#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list