As a user,
I want some help to pick templates which searching,
so that when I search, I get valid results
Acceptance Criteria:
- The UI Widget where I select templates shows a list of available templates when it has focus and i started to type the first letter.
- The UI Widget shows only the templates that match the text that is already typed.
- When a template from the list is selected, it becomes a "pill" inside the UI widget.
Background:
This needs to be implemented as a custom widget. Since MenuTagMultiselectWidget expects a fixed number of options and loading ALL the templates into memory would cost too much memory and bandwidth, it's better to subclass TagMultiselectWidget and use the LookupElement mixin to provide the menu.
The API endoint is opensearch. An example query for the German Wikipedia for all templates beginning with "Burg" looks like this:
https://de.wikipedia.org/w/api.php?action=opensearch&format=json&formatversion=2&search=Burg&namespace=10&limit=100&suggest=true