[wp-trac] [WordPress Trac] #40735: Events widget form should close after successful search

WordPress Trac noreply at wordpress.org
Thu May 18 11:52:38 UTC 2017


#40735: Events widget form should close after successful search
---------------------------------------+--------------------------------
 Reporter:  iandunn                    |       Owner:
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  4.8
Component:  Administration             |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch has-screenshots  |     Focuses:  ui, accessibility
---------------------------------------+--------------------------------
Changes (by afercia):

 * keywords:   => has-patch has-screenshots
 * type:  enhancement => defect (bug)
 * milestone:  Awaiting Review => 4.8


Comment:

 I went ahead: [attachment:40735.diff] unifies the previous
 [attachment:40735-button-link.diff]  and [attachment:40735-form-ux.diff]
 and also does the following:
 - moves focus back  to the toggle button when pressing "Cancel", there are
 several ways to do this please do feel free to change it and improve it if
 you prefer a different pattern
 - fixes a few mixed spaces and tabs
 - HTML attribute values are string not boolean, see `aria-hidden`, `aria-
 expanded` (minor because browsers take care of this so it's just for the
 sake of being a bit more cleaner)
 - a few JS standards
 - fixes one typo (`Javascript` to `JavaScript`) and a few minor things in
 the docblocks and inline comments

 Also to consider:
 - `isVisible` was confusing for me at first, had to read
 [http://underscorejs.org/#each some underscorejs docs] to have clear that
 for JavaScript object the `iteratee` function arguments are: `value, key,
 list`; I'd consider to rename it, maybe `visibility` or something less
 confusing; after all it's just the value set in the `elementVisibility`
 object whose keys/values are `element` and `visibility`
 - maybe the two `var` at the top should be unified in just one
 - minor optimization: instead of getting multiple times some elements,
 maybe I'd try to get them just once, see for example how many times
 `.community-events-toggle-location` is targeted with jQuery

 [attachment:40735.css.diff]
 is optional :) and tries to improve the form label, input field, "Submit",
 and "Cancel" button alignments. To consider:
 - should the "Cancel" button link be underlined or not? Currently, there's
 a CSS conflict with another rule; also, after the removal of the `.button`
 class, padding is now different
 - please consider to avoid introducing new colors: the `event-none` border
 color was `#0070AE` which is not used anywhere in core and I've changed it
 to `#00a0d2` which is the color already used for notice-info

 Changing ticket type to "bug" as the UX issue should be addressed for 4.8,
 as per yesterday's discussion on Slack.

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


More information about the wp-trac mailing list