[wp-trac] [WordPress Trac] #34893: Improve Customizer setting validation model

WordPress Trac noreply at wordpress.org
Tue Sep 12 07:02:53 UTC 2017


#34893: Improve Customizer setting validation model
-------------------------------------------------+-------------------------
 Reporter:  westonruter                          |       Owner:
     Type:  enhancement                          |  westonruter
 Priority:  high                                 |      Status:  closed
Component:  Customize                            |   Milestone:  4.6
 Severity:  normal                               |     Version:  3.4
 Keywords:  has-patch has-screenshots has-unit-  |  Resolution:  fixed
  tests commit                                   |     Focuses:  javascript
-------------------------------------------------+-------------------------

Comment (by westonruter):

 In [changeset:"41374"]:
 {{{
 #!CommitTicketReference repository="" revision="41374"
 Customize: Add global notifications area.

 * Displays an error notification in the global area when a save attempt is
 rejected due to invalid settings. An error notification is also displayed
 when saving fails due to a network error or server error.
 * Introduces `wp.customize.Notifications` subclass of
 `wp.customize.Values` to contain instances of `wp.customize.Notification`
 and manage their rendering into a container.
 * Exposes the global notification area as `wp.customize.notifications`
 collection instance.
 * Updates the `notifications` object on `Control` to use `Notifications`
 rather than `Values` and to re-use the rendering logic from the former.
 The old `Control#renderNotifications` method is deprecated.
 * Allows notifications to be dismissed by instantiating them with a
 `dismissible` property.
 * Allows `wp.customize.Notification` to be extended with custom templates
 and `render` functions.
 * Triggers a `removed` event on `wp.customize.Values` instances _after_ a
 value has been removed from the collection.

 Props delawski, westonruter, karmatosed, celloexpressions, Fab1en,
 melchoyce, Kelderic, afercia, adamsilverstein.
 See #34893, #39896.
 Fixes #35210, #31582, #37727, #37269.
 }}}

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


More information about the wp-trac mailing list