[wp-trac] [WordPress Trac] #28709: Improve/introduce Customizer JS models for Controls, Sections, and Panels
WordPress Trac
noreply at wordpress.org
Mon Oct 6 22:53: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: needs-patch | Focuses: javascript
-------------------------+-------------------------
Comment (by celloexpressions):
This is a great start, Weston!
I think we should make sure that we support custom sections and panels as
fully as we support custom controls. Whether that's through something
similar to how controls do it, or something a little more intuitive,
that's an important component of the API as a whole, even if it's not used
as commonly.
As much as I'd love for everything to be rendered from JS, I don't think
we're quite there yet. I see #29572 and this ticket as the first steps,
then in 4.2 we could introduce a more comprehensive API for dynamically
creating controls, then maybe in 4.3 render everything from JS by default.
If we could build out some structure for sections and panels in JS, and
maybe the ability to dynamically create sections, at least for now, I
think that would be best. We're going to have to do a lot for back-
compatibility once we get to that stage, so I think we'll need to move
carefully with the more radical changes.
Some of the things I'd like to see done in the first-pass here:
- Remove all customizer-specific logic from accordion.js, in favor of
open/closing/state functions internally (ie, stop using accordion.js in
the Customizer). Also with the thought that we may move away from using an
accordion for sections sooner rather than later. This would also
facilitate deep-linking.
- Support for deep-linking, or a logical way that that would be
implemented once this initial API is in, coordinating with the
expanding/collapsing of sections.
- JS-side support for contextual sections and panels (or a logical way to
add that), I already did the PHP side on #29758.
Things that should probably wait, but that we should keep in mind:
- Rendering all sections and panels from JS by default.
- Changes to how custom sections and panels work in PHP.
- I'm thinking it might be best to avoid significant changes to the
control models for now, other than the ability to associate them with
sections in some way, so that we can scope this appropriately for 4.1 and
start building off of it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28709#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list