[wp-trac] [WordPress Trac] #42348: Themes search: reintroduce the debounced search

WordPress Trac noreply at wordpress.org
Thu Oct 26 15:20:03 UTC 2017


#42348: Themes search: reintroduce the debounced search
-------------------------------------------+-------------------------
 Reporter:  afercia                        |      Owner:
     Type:  defect (bug)                   |     Status:  new
 Priority:  normal                         |  Milestone:  4.9
Component:  Customize                      |    Version:  trunk
 Severity:  normal                         |   Keywords:  needs-patch
  Focuses:  ui, accessibility, javascript  |
-------------------------------------------+-------------------------
 A recent change in [41797] changed how the theme searches work on the
 admin screens `themes.php` and `theme-install.php`. The searches were
 debounced while users type a search term, specifically to not trigger a
 search and wait they enter the complete search term.

 This is particularly important for the .org themes, since it avoids to
 trigger multiple AJAX requests while typing. It is also important for
 usability and accessibility on both screens.

 On `theme-install.php` seeing the screen that "flashes" displaying partial
 search results while typing is not the best user experience.

 Moreover, on both screens, a `wp.a11y.speak()` message fires when there
 are search results. Basically, with this change, it's very likely a
 message gets announced every time a character is entered in the search
 field, thus "bombarding" users with continuous, audible messages like
 "Number of Themes found: nn" and so on and on.

 For more details on why the search were debounced, see:

 https://core.trac.wordpress.org/changeset/31994
 https://core.trac.wordpress.org/ticket/26600

 and

 https://core.trac.wordpress.org/changeset/27830
 https://core.trac.wordpress.org/ticket/27055

 The recent [41797] change uses throttling instead of debouncing to address
 a specific Customizer need, to avoid a "flash of unsearched content" when
 going back from the Customizer to the themes screen. However, it breaks
 how the search is supposed to work on the admin screens. Development
 happened on GitHub, see https://github.com/xwp/wordpress-develop/pull/278
 and the specific commit: https://github.com/xwp/wordpress-
 develop/pull/278/commits/4e3abbb7c37898b9c2a0124e8c10725f3c1d6f82

 I've tried to reproduce the original Customizer issue changing back to
 `debounce()` and honestly I don't see a great difference in the "flash" of
 content, unless I'm missing something.

 Anyways, in order to fix a minor "flash" of content, this change is
 breaking a major UI feature, not to mention the multiple AJAX requests,
 and I'd propose to just revert back to `debounce()`.

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


More information about the wp-trac mailing list