fix(输入法): 优化双端联想排序并消除文字刷新闪烁
这个提交包含在:
1 父节点
bce6f8083b
当前提交
b95e7caae7
31 个文件已更改
+504
-124
没有与搜索条件相匹配的文件
@@ -30,6 +30,7 @@ p.choose({...hello});check(p.text==='你好'&&!p.composition,'candidate event pa
|
||||
p.finish();check(closed.at(-1).accepted&&closed.at(-1).text==='你好','finish returns text')
|
||||
p=page({initial:'unchanged'});p.insert('!');p.cancel();check(closed.at(-1).accepted===false,'cancel does not return edited text')
|
||||
p=page({inputType:'password',initial:'😀secret'});p.toggleLearning();check(!p.learning&&!p.display.includes('secret'),'password masked and cannot learn');p.onHide();check(!p.text&&!p.initial&&!p.original,'password clears on hide')
|
||||
p=page({inputType:'password',revealSecret:true,initial:'Visible123!'});check(p.display.includes('Visible123!')&&p.secret&&!p.learning,'explicit password reveal preserves private input');p.toggleLearning();check(!p.learning,'revealed password cannot enable learning');p.onHide();check(!p.text&&!p.initial&&!p.original,'revealed password clears on hide')
|
||||
p=page({initial:'你😀好'});p.cursor=2;p.backspace();check(p.text==='你好','UI Unicode deletion')
|
||||
p.startDelete();check(p.repeatDelay!==null,'delete hold delay starts');p.onHide();check(p.repeatDelay===null&&p.repeatTimer===null,'hide stops repeat timers')
|
||||
p=page();let resolve;p.dictionary={lookup:()=>new Promise(yes=>resolve=yes)};p.composition='64';const pending=p.query(p.requestId);p.onHide();resolve([{word:'你',consume:2,pinyin:'ni'}]);await pending;check(p.total===0,'late dictionary response cannot update hidden page')
|
||||
@@ -43,4 +44,15 @@ p.english();p.english();check(p.keyRows.flat().some(x=>x.value==='Z'),'uppercase
|
||||
p=page({initial:'test'});p.clearText();check(p.text==='test'&&p.clearArmed,'destructive clear needs second tap');p.clearText();check(p.text==='','confirmed clear')
|
||||
p.composition='shi';p.schedule();const owned=p.lookupTimer;p.onDestroy();check(!timers.has(owned)&&p.lookupTimer===null,'destroy releases owned lookup timer')
|
||||
p=page();p.learning=true;p.composition='64';p.allCandidates=[{word:'你',pinyin:'ni',consume:2}];storageFails=true;p.choose(p.allCandidates[0]);check(p.text==='你'&&!p.composition&&!p.learning,'storage failure cannot duplicate committed candidate');p.toggleLearning();check(!p.learning,'storage failure leaves learning off');storageFails=false
|
||||
p=page();p.mode='py';p.composition='niha';await p.query(p.requestId)
|
||||
p.choose(p.bar[0]);p.invalidate();await p.query(p.requestId)
|
||||
check(p.text==='你好'&&p.prediction&&p.bar[0].word==='世界','partial spelling commits once and offers context continuation')
|
||||
p.choose(p.bar[0]);check(p.text==='你好世界'&&!p.composition,'continuation appends only the next word')
|
||||
p=page();p.mode='py';p.composition='shi';await p.query(p.requestId)
|
||||
const steadyBar=p.bar,steadyText=p.display;p.composition='shij';p.schedule()
|
||||
check(p.busy&&p.bar===steadyBar&&p.display===steadyText,'pending lookup retains candidate and preview nodes instead of clearing visible text')
|
||||
const beforeStale=p.text;p.choose(steadyBar[0]);check(p.text===beforeStale,'retained candidates cannot commit while their replacement is pending')
|
||||
p=page({initial:'你好'});p.composition='';await p.query(p.requestId);p.space();check(p.text==='你好 '&&!p.text.includes('世界')&&!p.prediction&&!p.bar.length,'space ends the prediction context without auto-committing or leaving stale suggestions')
|
||||
p=page({initial:'你好'});p.composition='';await p.query(p.requestId);p.newline();check(p.text==='你好\n'&&!p.prediction&&!p.bar.length,'newline ends the prediction context and clears stale suggestions')
|
||||
p=page({inputType:'password',initial:'你好'});check(p.inputContext()==='','password content is never used as predictive context')
|
||||
console.log(JSON.stringify({suite:'ime-client',assertions:count,status:'passed'}))
|
||||
在新工单中引用
屏蔽一个用户