Expanding autocomplete in the WordPress admin

Autocomplete is not a new concept in the WordPress admin – tags have had suggestions powered by suggest.js since their introduction six years ago in version 2.5. This, however, remained the only instance of Ajax-powered autocompletion for another four years, until adding users in multisite was enhanced with jQuery UI autocomplete for 3.4. It was originally committed with deliberately unpolished styling, so when I saw a request to make it look better, I decided to take it on. I may not consider myself a creative designer, but I do have an eye and passion for UI consistency. After a little iteration on both the design and code, we had a fully functional instance of autocomplete.

WordPress autocomplete evolution

At the start of the 3.9 cycle, during ticket triage, I was reminded of a ticket I had opened several months ago for adding autocomplete for the new site admin email address in multisite. I created a patch, and after some peer review, committed it. Lead developer Andrew Nacin noted that there were other spots that could benefit from an autocomplete UI: wp_dropdown_users() and wp_dropdown_pages().

These two drop downs have long been pain points for larger WordPress implementations. With the potential for millions of users and/or pages, not only are lengthy drop downs awkward, they can potentially stall and even crash browsers. With a couple of weeks left before we enter beta, it’s time we tackle these patches.

After a few weeks of intensive work massaging over 14,000 lines of CSS with an eye toward future maintenance, I’m ready to work on a task more focused on PHP and JavaScript. If you’re interested in being a part of these efforts, find me in the #wordpress-dev IRC channel (I’m “helen”) or leave a comment on Trac. I’m excited to tackle some long-standing scaling problems, and continue to explore ways that autocomplete can solve problems and enhance the WordPress admin user experience.

Leave a Comment

Finely crafted websites & tools that make the web better.