[wp-trac] [WordPress Trac] #27355: Customizer: Add framework for partial preview refreshes
WordPress Trac
noreply at wordpress.org
Sat Apr 4 07:03:43 UTC 2015
#27355: Customizer: Add framework for partial preview refreshes
-------------------------+-----------------------------
Reporter: westonruter | Owner: westonruter
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Customize | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript
-------------------------+-----------------------------
Description changed by westonruter:
Old description:
> In regards to the Widget Customizer merge in #27112, we agreed to remove
> the partial preview refreshing of widgets (live previews via postMessage
> transport and re-rendering widgets via Ajax then doing DOM replacements).
> This live preview functionality for widgets was removed in favor of
> generalizing the functionality so that any customize control can add
> support for doing so. This partial preview refresh is key to keeping
> things DRY by eliminating the current requirement that all setting
> updates via postMessage transport re-implement all rendering logic in
> JavaScript for components that are normally written out in PHP—but even
> when the render logic is attempted to be written in JS, it will never be
> able to account for any filters added in PHP.
>
> For instance, with such partial preview refreshes, the Navigation Menu
> control needn't do a full refresh of the preview: the menu's container
> could be targeted for a partial refresh, where the new menu gets rendered
> via an Ajax request and the response replaces the old menu.
>
> Originally mentioned at
> https://core.trac.wordpress.org/ticket/27112#comment:10
New description:
In regards to the Widget Customizer merge in #27112, we agreed to remove
the partial preview refreshing of widgets (live previews via postMessage
transport and re-rendering widgets via Ajax then doing DOM replacements).
This live preview functionality for widgets was removed in favor of
generalizing the functionality so that any customize control can add
support for doing so. This partial preview refresh is key to keeping
things DRY by eliminating the current requirement that all setting updates
via postMessage transport re-implement all rendering logic in JavaScript
for components that are normally written out in PHP—but even when the
render logic is attempted to be written in JS, it will never be able to
account for any filters added in PHP.
For instance, with such partial preview refreshes, the Navigation Menu
control needn't do a full refresh of the preview: the menu's container
could be targeted for a partial refresh, where the new menu gets rendered
via an Ajax request and the response replaces the old menu.
Originally mentioned at
https://core.trac.wordpress.org/ticket/27112#comment:10
Feature plugin available
WordPress.org: https://wordpress.org/plugins/customize-partial-refresh/
GitHub project: https://github.com/xwp/wp-customize-partial-refresh
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27355#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list