[wp-trac] [WordPress Trac] #43386: render-partials-init similar to render-partials-response in customiser selective refresh.

WordPress Trac noreply at wordpress.org
Thu Feb 22 14:22:55 UTC 2018


#43386: render-partials-init similar to render-partials-response in customiser
selective refresh.
--------------------------------------------+-----------------------------
 Reporter:  gandham                         |      Owner:
     Type:  enhancement                     |     Status:  new
 Priority:  normal                          |  Milestone:  Awaiting Review
Component:  General                         |    Version:  4.9.4
 Severity:  normal                          |   Keywords:
  Focuses:  ui, javascript, administration  |
--------------------------------------------+-----------------------------
 These are the events that are triggered when a selective refresh takes
 place.

 {{{
 render-partials-response
 partial-content-rendered
 partial-placement-moved
 widget-updated
 sidebar-updated
 }}}

 But there is no event to identify the start of the partial request. This
 is required if we want to make some changes (like display a loader) to the
 UI while the request in progress.



 '''.customize-partial-refreshing''' class is added while the partial
 refresh is in progress, but a javascript event will be handy.
 Use case: Partial used to update a style tag in the head.

 adding the following event after initiating the request in
 wp-includes/js/customize-selective-refresh.js at line 773 works, but not
 sure if it the right way.

 {{{
 self.trigger( 'render-partials-init', data );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43386>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list