[wp-trac] [WordPress Trac] #34893: Improve Customizer setting validation model
WordPress Trac
noreply at wordpress.org
Mon May 16 18:29:57 UTC 2016
#34893: Improve Customizer setting validation model
-------------------------------------------------+-------------------------
Reporter: westonruter | Owner:
Type: enhancement | westonruter
Priority: high | Status: accepted
Component: Customize | Milestone: 4.6
Severity: normal | Version: 3.4
Keywords: has-patch needs-testing needs-unit- | Resolution:
tests has-screenshots | Focuses: javascript
-------------------------------------------------+-------------------------
Comment (by westonruter):
@mrahmadawais:
> Would it be better if we can designate a certain area for notifications
at the top so that folks building custom controls won't mess up the
notifications
For custom controls, developers can take two approaches to displaying
notifications:
1) They can include a element with a `customize-control-notifications-
container` class in the control's content.
2) Or they can override the `controlgetNotificationsContainerElement()`
method to change how the notification gets injected.
> Error notification inside the widgets area is not looking good. The
white background of the notification is getting mixed up with the white
background of widget accordion. This can be solved by moved the error
message to the top of the chain i.e. before the div with class widget-top
and inside the div with class widget. It would look something like this
I think the style should be modified rather than moving the notification
outside of the control's collapsed contents. If it were outside, this
would be confusing when users expect to see a list of controls not a
mixture of a list of controls and validation messages.
@celloexpressions I tried re-using the default `error` styles in my
default `div.customize-control-notifications-container`. But I think we
should stop trying to do that. Instead of adding `error` to that root
container element, I think the `error` should be added to the `li` itself,
and so individual notifications could be errors where others could be
updates or informational messages.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34893#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list