On Wed, 8 Apr 2026 13:30:22 GMT, Nizar Benalla <[email protected]> wrote:
>> Please review a change to replace the jQuery-UI autocomplete component in >> JavaDoc search with our own search widget previously used only in the search >> page. The new search widget adds a few new features: >> >> - Tabbed table interface to easily switch between element categories >> (types, members, packages etc.) >> - Module selector to limit search to individual modules in multi-module >> documentation bundles >> - No dependency on jQuery-UI or jQuery as the code is written in plain >> JavaScript >> - Single search implementation for both search page and navigation bar >> search widget >> >> The code for the search widget, which previously lived in `search-page.js` >> and was used for the search page (`search.html`) only, is converted from >> jQuery to plain JavaScript and moved to `search.js.template`. >> `search-page.js` as well as all jQuery JavaScript and CSS files are deleted >> as they are no longer needed. >> >> Keyboard navigation of search results differs from the jQueryUI autocomplete >> component, as using the Tab key to open the selected result is problematic >> for users of keyboard navigation who rely on the Tab key as primary means to >> move focus. Instead, keyboard navigation uses the arrow keys to move through >> result items and tabs, and the Enter key to open the selected result item. >> >> The new search widget [can be tested >> here](https://cr.openjdk.org/~hannesw/8378228/api.02/) with the Java SE/JDK >> API docs. > > Refactoring awesomeness ratio: > > 14321 deletions > 740 additions > RAR: 19.35 > > Impressive! Thanks for the very good remarks, @nizarbenalla. I updated the PR with a commet that addresses both, and also removes a redundant `return true` in another `forEach` callback. I updated the script file in the demo docs with the new version, you may have to shift-reload to make your browser get the new version. ------------- PR Comment: https://git.openjdk.org/jdk/pull/30057#issuecomment-4224516723
