[wp-trac] [WordPress Trac] #28709: Improve/introduce Customizer JS models for Controls, Sections, and Panels

WordPress Trac noreply at wordpress.org
Fri Oct 24 08:51:19 UTC 2014


#28709: Improve/introduce Customizer JS models for Controls, Sections, and Panels
------------------------------------+-------------------------
 Reporter:  westonruter             |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  high                    |   Milestone:  4.1
Component:  Customize               |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  javascript
------------------------------------+-------------------------

Comment (by westonruter):

 In [attachment:28709.wip.7.diff] ([https://github.com/xwpco/wordpress-
 develop/compare/2a5c56abda35b47cb946a11d36b31940ca030b69...5169fd3c115a8af92891e819180cd7ebcb64177c
 new changes]):

  * Clean up `accordion.js`, removing all Customizer-specific logic
  * Prevent `accordion.js` from acting on the Customizer if a plugin
 enqueues it for another purpose (Menu Customizer is an example)
  * `toggleExpanded()` and `toggleActive()` changed to `onToggleExpanded()`
 and `onToggleActive()`. Also, `expandedArgumentsQueue` introduced to hold
 arguments for animation `duration` and (soon) `allowMultiple`
  * Normalize API for passing parameters to `activate`/`deactivate`,
 `expand`/`collapse`
  * Add `defaultActiveArguments` and `defaultExpandedArgument`
  * Pass `onToggleActive` `args.duration` to slideDown/slideUp
  * Add `activeArgumentsQueue` to `Control`
  * Use `onToggleExpanded` and `onToggleActive` naming on Widget controls
  * Close top-level sections immediately when opening panel
  * Fix Widget Customizer `_applyCardinalOrderClassNames` to use API
 instead of DOM traversal

 Also props @kienstra @celloxpressions

 See related PRs for discussions:
  * https://github.com/xwpco/wordpress-develop/pull/29
  * https://github.com/xwpco/wordpress-develop/pull/36
  * https://github.com/xwpco/wordpress-develop/pull/37

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


More information about the wp-trac mailing list