[wp-trac] [WordPress Trac] #39691: wpLink autocomplete search improvement

WordPress Trac noreply at wordpress.org
Tue Jun 27 14:54:07 UTC 2017


#39691: wpLink autocomplete search improvement
-------------------------------+------------------------------
 Reporter:  enrico.sorcinelli  |       Owner:  adamsilverstein
     Type:  enhancement        |      Status:  assigned
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Editor             |     Version:  4.8
 Severity:  normal             |  Resolution:
 Keywords:                     |     Focuses:
-------------------------------+------------------------------
Changes (by adamsilverstein):

 * owner:   => adamsilverstein
 * status:  new => assigned


Comment:

 @enrico.sorcinelli Thanks for your patch!  This seems like a useful
 enhancement.

 So this would remove an extra request to the server after typing a space?

 I'm not sure I understand how the search string normalization affects the
 underlying db query, can you give some examples of the search string and
 query before/after normalization? Getting some of these cases in tests and
 adding a test for `normalizeQuery` would be very helpful. We have some
 tests in `tests/wp-includes/js/tinymce/plugins/` as a starting point.

 I wonder if `normalizeQuery` would be more generally useful across the
 admin and should be added to the wp namespace?

 A few tips to match the [https://make.wordpress.org/core/handbook/best-
 practices/coding-standards/javascript/ WordPress JavaScript Coding
 Standards]. The code needs a little more whitespace, and the conditionals
 should be Yoda conditionals. Also, the comment lines should be
 capitalized. Finally, `dbcollate` should probably be camel cased:
 `dbCollate`

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


More information about the wp-trac mailing list