[wp-trac] [WordPress Trac] #37974: Add multi-panel feature to pages through add_theme_support
WordPress Trac
noreply at wordpress.org
Mon Oct 17 22:45:40 UTC 2016
#37974: Add multi-panel feature to pages through add_theme_support
-----------------------------------------+------------------
Reporter: karmatosed | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 4.7
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: has-ux-feedback needs-patch | Focuses: ui
-----------------------------------------+------------------
Comment (by bradyvercher):
Thanks for the feedback @westonruter. I started a refactor of this without
Backbone views to get a better handle on the current approach in the
Customizer, but it felt a lot more fragile and difficult to maintain.
> As long as a control adheres to the general interface and its UI is
encapsulated in the control, it shouldn't matter if the control's logic is
handled by another library...
Are you suggesting the views should be assigned to properties on the
control instead of adding them to a public namespace?
> The most important thing is ensuring that there is bidirectional sync
between the control's setting and the UI state for the control. So this
means there should be a: `control.setting.bind( function( value ){
ui.setState( _.clone( value ) ); } )` and `ui.onChange( function( value )
{ control.setting.set( _.clone( value ) ); } )`. I don't see this in the
patch, so it needs to be added.
The setting only contains an array of post IDs, which would mean posts
need to be fetched when the setting is changed to update the UI. The
content endpoints from the REST API would come in really handy here,
otherwise this might require another AJAX callback.
It also seems like this might create an infinite loop.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37974#comment:158>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list