Board Thread:Technical Updates/@comment-24006128-20201016144211/@comment-26939652-20201025214334

Andrewds1021 wrote: Lytora, if you can do better, I am sure Fandom would be happy to see your results. Autocomplete is "simple" to use and "simple" to understand but let's not confuse that with "simple" to program. That's why I said, open source the code. It is simple to program. From all the things that are broken, this is one of the low hanging fruit.

I'll spell it out a little more - the hard part is that standard autocompleters work on a single form control and any input event there is for autocompletion. Here we have a editable form control with autocompletion trigger ('[[' before current cursor position on same line in "unterminated" state) and stop characters (pipe, closing ']', enter and other vertical movements). Luckily, you have all that already figured out in the classic editor, so you can reuse all or parts of it. The rest of the keydown events, mapped to debounced ajax requests are all readily available.

As far as the autocompletion endpoint in the backend goes, I do not believe the db structure is that different that it requires a complete rewrite. Other than porting to a newer PHP version and minor differences in wikipedia code, I expect this to be 80% or better reusable from legacy.