- Open link inspector
- Type "Link"
It briefly brings up the results that starts with the word link and then reloads some unmatched article suggestions
It briefly brings up the results that starts with the word link and then reloads some unmatched article suggestions
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| TitleSearchWidget: Use OO.ui.mixin.RequestManager | mediawiki/core | master | +24 -10 |
It could be due to the slowness in the overall search mechanism, I feel it has got significantly slower after this change: https://phabricator.wikimedia.org/T101169
Perhaps the request for suggestions beginning with "L" was not canceled, and arrived after the suggestions for "Link"? The network panel in the browser inspector should show you what's happening, and also how slow these requests are.
This appears to happen because TitleWidget doesn't abort pending requests, and requests are able to overtake each other. A similar bug probably caused T114178: [Regression wmf.1] Search results appear in the drop down even after clearing the search term inside the link inspector. Additionally, results aren't cached, so if you type "Head", then press backspace, then type "d" again, you'll see a repeated request for "Head" (and also for "Hea").
Why wasn't LookupElement reused here? :S We solved all these problems years ago, over the course of multiple painful months.
The main difference was the appearance. LookupElement renders as an absolutely position overlay, whereas SearchWidget is visually what we are aiming for. I'm not happy that we have such similar widgets (Input+Lookup vs Search) with such different APIs...
Since this is the same cause as T114178, my fix for that will have fixed it.
Once https://gerrit.wikimedia.org/r/#/c/252388/ is approved, I'll rewrite TitleSearchWidget to use the new RequestManager mixin it provides, and then it'll pick up the same caching benefits that LookupWidget brings.
Change 252592 had a related patch set uploaded (by DLynch):
[WIP] TitleSearchWidget: Use OO.ui.mixin.RequestManager
My OOUI patch landed. After the next OOUI release (Tuesday) I'll get the rewrite of TitleSearchWidget landed.
Change 252592 merged by jenkins-bot:
TitleSearchWidget: Use OO.ui.mixin.RequestManager