This class was rolling its own version of get_template_name, which
meant that calling code needed to first call get_template and was forced
to use render_from_template(). This fixes that by implementing the
named_templatable interface and the get_template_name method. Now,
renderables that extend comboboxsearch can just be passed to render()
for rendering.
- core_grades_renderer::group_selector() was changed previously, but it
was providing redundant context data to
core_group/comboboxsearch/group_selector and on the other hand, it was
not providing 'name' and 'value' for core/comboboxsearch
- The $groupactionbaseurl parameter of
core_grades_renderer::group_selector() is now deprecated as it was not
used.
- a bug is fixed: if only a lastname initial was set, the clear search
button was not being displayed.
- Added the `dropdown` class to ensure toggle element focus when the
dropdown is closed.
- Improved keyboard handling by adding the `dropdown` class.
aria.js will automatically handle keyboard interactions.
- Removed redundant keyboard handling.
- The "view all results" option is just a normal option in a combobox.
It should not be treated as the default action for a combobox.
- Ensured correct markup for 'Esc' key handling. aria.js automatically
focuses on the toggle element if the dropdown's toggle and the
dropdown menu are wrapped within a .dropdown element.
- Implemented menu closure for outside clicks and when leaving the edit
box.
- Manually focused on the user search element when opening the search
dropdown due to a focusLock issue.
- Fix the issue of another dropdown staying open
- Clicking on the clearSearchButton should not close the dropdown
This has been generated running the following Sniffs, all
them part of the Moodle's CodeSniffer standard:
- PSR12.Functions.ReturnTypeDeclaration
- PSR12.Functions.NullableTypeDeclaration
- moodle.Methods.MethodDeclarationSpacing
- Squiz.Whitespace.ScopeKeywordSpacing
All them are, exclusively, about correct spacing, so the changes
are, all them, only white space changes.
Only exceptions to the above are 3 changes what were setting the
return type in a new line, and, when that happens, the closing
parenthesis (bracket) has to go to the same line than the colon.