Closed Bug 1558248 Opened 4 months ago Closed 4 months ago

Improve rendering of jsterm autocomplete when typing the same characters as the selected value

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox-esr60 unaffected, firefox-esr68 wontfix, firefox68 wontfix, firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox68 --- wontfix
firefox69 --- fixed

People

(Reporter: fvsch, Assigned: nchevobbe)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [console-editor-mvp])

Attachments

(1 file)

I find the Console autocomplete a bit glitchy in a specific scenario, I wonder if that's always been the case or if it's a regression.

STR:

  1. Open Console and in a blank jsterm, type wi
  2. The input line should be autocomplete to window, with the letters ndow in gray. Now type the remaining letters slowly, staring at the gray autocomplete.

Expected result:
Each typed letter should go from gray to colorful (purple), with no visual glitch.

Actual result:
The autocompleted text disappears on each input, looking like this (each line represents a moment in time):

wi
window
win
window
wind
window
windo
window

This back-and-forth is not ideal and makes the autocomplete feel unreliable and/or slow, in my experience.

If we need to redo some work on each keystroke and the results take a little while to come back, maybe we could bypass this work if the typed letter(s) match the currently displayed completion?

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [console-editor-mvp]

This is probably caused by Bug 1491776 + Bug 1541352:

  • we always clear the completion text
  • and we now wait 75ms to reach the autocomplete function, which will update the completion text
Regressed by: 1491776, 1541352

We were clearing the completion text all the time to prevent
a visual glitch while typing (See Bug 1491776). But since we
are now waiting for 75ms before calling the autocomplete
function (which triggers the autocompletion text update), we
have a flash of the completion text, which isn't ideal.
In this patch, we check if the typed letters match the begining
of the completion text, and if they do, we don't clear the
completion text.
In the same time, we set the completion text in absolute position
so it doesn't jump when the new letter is added in the CodeMirror
document.
Finally, we change how the Editor pipe events from CodeMirror to
include parameters, so we can use them in JsTerm.

Duplicate of this bug: 1562460
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6cfc645e0c0
Don't clear the completion text when it starts with the typed letters. r=fvsch.
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.