Issue #3564229 by dydave: Admin Toolbar Search: Refactored JS code with...

https://www.drupal.org/project/admin_toolbar/issues/3564229

Admin Toolbar Search: Refactored JS code with Vanilla JS and fixed ESLINT issues:

  • Fixed all ESLINT validation errors.
  • Replaced JQuery ($) calls where possible: The only real dependency/call remaining is to init the JQuery autocomplete.
  • Fixed #3552640 by stripping off the query string from searched labels, see function handleAutocomplete.
  • Simplified _renderItem template by removing unneeded span tag with the link URL, see also change to CSS.
  • Adjusted Tests class AdminToolbarToolsSearchTest to the change of the _renderItem, without a span but an a with href instead.
  • Replaced JS logic with the search autocomplete list of suggestions setting the z-index, with a simple CSS rule.
  • Added jsdoc comments where needed, for functions, params, etc...
  • FunctionalJavascript tests: Updated the keyboard class test to be a bit more generic and provide test cases for different events:
    Keyboard ('alt + a') and Click.

Merge request reports

Loading