Add search aliases for warning templates#2209
Add search aliases for warning templates#2209IlyasLebleu wants to merge 4 commits intowikimedia-gadgets:masterfrom
Conversation
|
I like the idea. It's worth checking though if the feature could be implemented more concisely by building upon the existing Morebits/select2 matchers instead of doing it from scratch. |
|
@siddharthvp Good idea! Currently, the matcher used by Twinkle is a custom function that runs on top of the existing Select2 default matcher, as it needs to return all existing children of a matched object. My code modifies the default matcher in order to do both at once (plus the alias functionality) – I'm not sure if that is doable with Select2 alone, but it would be great if possible, especially if you already have any matchers in mind. I'll take a look at the lint errors today! |
|
You just need to fix the errors. You can ignore the warnings. Although the "use let or const instead of var" warning might be worth fixing too. |
|
Looking at it asap, thanks! |
7934453 to
da4e907
Compare


Adds an option for searching warning templates through aliases, for users unsure about the exact name of the template. For example, typing "llm" in the search field returns the {{uw-ai}} template series.
Currently only used for {{uw-ai}}, although written such that other aliases can easily be added if needed.