Draft: applets/kicker: briefly delay search results to reduce glitchiness

Kicker displays its search results in columns based on the individual runners. Runners report asynchronously, and the results are immediately updated. This will also change the width of the total columns, and depending on where the applet is placed relative to the screen edges, the popup's position. The display order is fixed, so the columns may rearrange themselves as more runners report, and whenever the query is modified (such as by adding another letter) the whole thing is reset, the applet resizes to its minimum size, and everything starts over from the beginning. The whole process feels glitchy and very janky.

Instead, we add some delay to the results, starting from when the query is started. Once the delay is over, or when the query fully completes (whichever comes first), we show all the results we have so far; any runners reporting after are added immediately as before. While the delay is ongoing, we maintain the previous size of the applet (and search bar) to further reduce unnecessary resizing.

The delay is set to 400 ms; this was tested on a 10-year old laptop (where usually Applications reports in time, even if Files may come in later) and a somewhat more modern but lower-end desktop (where the query is usually finished a fair bit before the delay anyway), and felt acceptable in both.


before after
kicker_searchdelay_before kicker_searchdelay_after

Value could certainly be tweaked further, but this felt alright. If we go with something like this, I want to make it so that hitting Return immediately will wait until the results are there and then launch that, currently it'll often go for the wrong thing (e.g. hitting "kons" and immediately return will launch "Default Applications", but if you wait a split second longer it'll launch konsole. But this is pre-existing, and probably better done as a separate patch.

@teams/usability @teams/vdg

Merge request reports

Loading