Created attachment 115948 [details] Proposed changes Recently there were changes in autocomplete suggest https://bugs.webkit.org/show_bug.cgi?id=65511 The gray text right next to a text caret has been replaced with a pop-over. Can we keep both pop-over and "gray text on the same line" the same way Google SERP does? * It looks better when only one autocomplete item suggested * Accepting first suggestion by pressing right arrow key feels more intuitive
I agree. Just for comparison, Xcode still shows the popup when there is only one match.
Xcode 4 suggest allows you to look up a reference by pressing the "?" icon. http://elv1s.ru/i/xcode-autocomplete-single-item.png I believe that's why it shows the popup when there is only one match. Web Inspector's suggest doesn't have anything like that, so do see the reason show it.
Funny, I don't see the "?" button on Xcode 4.2.
I agree showing it for one item isn't useful.
(In reply to comment #4) > I agree showing it for one item isn't useful. I also find single suggestion looking weird, I agree we should fix it. Summary: 1) Show inline completion at all times 2) Do not show suggest box with single entry
Created attachment 115985 [details] Proposed changes 2 I haven't considered the following case: Type 'con' Press arrow down (it should select the second item, 'console') Press arrow up (it should select the first (previous) item, 'confirm')
> > Type 'con' > Press arrow down (it should select the second item, 'console') > Press arrow up (it should select the first (previous) item, 'confirm') I am not sure I understand what you are trying to say. But I like the mock.
Here https://bug-72798-attachments.webkit.org/attachment.cgi?id=115948, on the right side, there is no 'confirm' item in the pop-over. It was a mistake. It was impossible to select 'confirm' using arrow keys once you selected item above. Hope it makes sense.
(In reply to comment #8) > Here https://bug-72798-attachments.webkit.org/attachment.cgi?id=115948, on the right side, there is no 'confirm' item in the pop-over. It was a mistake. It was impossible to select 'confirm' using arrow keys once you selected item above. > > Hope it makes sense. Yeah, you should always list all options in the suggest box. (Except for there is only one option :) )
Read as "(Except for the case when there is the only option)."
Created attachment 116082 [details] Patch
It still shows a pop-over box when there is the only option available (e.g. "doc|ument").
A text caret position bug has been introduced: http://www.screenr.com/Stqs
Created attachment 116186 [details] Patch
(In reply to comment #13) > A text caret position bug has been introduced: http://www.screenr.com/Stqs Thanks for the heads up! It was actually introduced with the suggest box from the outset but is annoying. I've uploaded an updated patch now.
Comment on attachment 116186 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=116186&action=review > Source/WebCore/inspector/front-end/TextPrompt.js:69 > + setProxyElementDisplay: function(x) renderAsBlock() ?
Committed r100981: <http://trac.webkit.org/changeset/100981>