Closed
Bug 879028
Opened 12 years ago
Closed 11 years ago
Tab and Shift+Tab should cycle through autocompletions
Categories
(DevTools :: Console, defect, P3)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: fitzgen, Assigned: jwalker)
References
(Blocks 1 open bug)
Details
(Whiteboard: [autocomplete])
When typing in the console and the autocompletion pops up, I should be able to cycle forward through the suggestions with Tab and backwards with Shift+Tab.
Updated•12 years ago
|
Whiteboard: [autocomplete]
Comment 1•12 years ago
|
||
This is different from what Chrome's console does. Tab seems to work in our case in the same way as it does for them. Still, the idea makes sense to me - Tab/Shift-Tab should cycle through suggestions.
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
Reporter | ||
Comment 2•12 years ago
|
||
Should be able to tab, and then just start typing, no need to explicitly say we are done with autocompletion by hitting enter or anything.
http://www.youtube.com/watch?v=LbUCQAYIB0o
Assignee | ||
Comment 3•12 years ago
|
||
Nick, I'm not clear on the key sequences there. I see TAB as the 'accept completion proposal' character, but you're using it as a 'get proposal' character?
Whatever we decide, I think it makes sense to put the fix into JSTerm.
Reporter | ||
Comment 4•12 years ago
|
||
In the video, I type "window.create" and then the autocompletion suggestions automatically pop up. I cycle through them by hitting shift repeatedly. Each time a suggestion is selected, it is inserted into the text. When I have selected the suggestion I want, I can just continue typing without hitting any key to "accept" the suggestion because it is already in my text.
Reporter | ||
Comment 5•12 years ago
|
||
Sorry hitting TAB repeatedly
Comment 6•12 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] from comment #4)
> In the video, I type "window.create" and then the autocompletion suggestions
> automatically pop up. I cycle through them by hitting shift repeatedly. Each
> time a suggestion is selected, it is inserted into the text. When I have
> selected the suggestion I want, I can just continue typing without hitting
> any key to "accept" the suggestion because it is already in my text.
I am with this behavior to. Although a slight modificaiton (I don't know if Nick already meant this or not)
when you have typed "window.create" and the popup appears like:
window.create|___________
|createElement |
|createWhimsy |
|createHorseJS |
-------------------
the first entry can be pre entered for you, but in selection, such that if you want to type anything else, then go ahead and type it, like :
window.create[Element]___
|createElement |
|createWhimsy |
|createHorseJS |
-------------------
text in [] is selected.
Now if the user presser TAB key, we remove the selection from the "Element" string while still keeping the popup open, highlighting the first entry from the popup and cursor at the end of the line like :
window.createElement|____
|[createElement] |
|createWhimsy |
|createHorseJS |
-------------------
text in [] is highlighted.
Now if the user presses TAB again, then the "Element" string gets replaced with "Whimsy" string, still without selection and the "createWhimsy" gets highlighted like :
window.createWhimsy|_____
|createElement |
|[createWhimsy] |
|createHorseJS |
-------------------
This way, the user can simply type "." to carry on with the expression and then the popup will go away (and actually return with newer suggestion set) like :
window.createWhimsy.|__________
|__proto__ |
|prototype |
-------------
and so on.
Assignee | ||
Comment 7•12 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] from comment #4)
> In the video, I type "window.create" and then the autocompletion suggestions
> automatically pop up. I cycle through them by hitting shift repeatedly. Each
> time a suggestion is selected, it is inserted into the text. When I have
> selected the suggestion I want, I can just continue typing without hitting
> any key to "accept" the suggestion because it is already in my text.
What happens if you type ``window.screen<RETURN>``? (window.screen is legal, as it window.screenX)
Or, more broadly, do you have to watch the screen to know what will happen when you press <RETURN>, <LEFT> or <RIGHT>?
Comment 8•12 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #7)
> (In reply to Nick Fitzgerald [:fitzgen] from comment #4)
> > In the video, I type "window.create" and then the autocompletion suggestions
> > automatically pop up. I cycle through them by hitting shift repeatedly. Each
> > time a suggestion is selected, it is inserted into the text. When I have
> > selected the suggestion I want, I can just continue typing without hitting
> > any key to "accept" the suggestion because it is already in my text.
>
> What happens if you type ``window.screen<RETURN>``? (window.screen is legal,
> as it window.screenX)
In that case, "screen" text would already by the first suggestion, infact, you will have to press TAB key to go to "ScreenX"
Reporter | ||
Comment 9•12 years ago
|
||
RETURN always does what it otherwise would. If you are in the console, it submits the text to be evaluated. If you are in the scratchpad, it would add a newline.
Same with LEFT and RIGHT: they always do what they would whether or not the autocompletion suggestions are present or not.
Assignee | ||
Comment 10•12 years ago
|
||
(In reply to Nick Fitzgerald [:fitzgen] from comment #9)
> RETURN always does what it otherwise would. If you are in the console, it
> submits the text to be evaluated. If you are in the scratchpad, it would add
> a newline.
>
> Same with LEFT and RIGHT: they always do what they would whether or not the
> autocompletion suggestions are present or not.
So, without looking at the screen, I type ``window.create<RETURN>``, do I get what I expect?, which is to say:
"window.create
"
Comment 11•12 years ago
|
||
(In reply to Joe Walker [:jwalker] from comment #10)
> (In reply to Nick Fitzgerald [:fitzgen] from comment #9)
> > RETURN always does what it otherwise would. If you are in the console, it
> > submits the text to be evaluated. If you are in the scratchpad, it would add
> > a newline.
> >
> > Same with LEFT and RIGHT: they always do what they would whether or not the
> > autocompletion suggestions are present or not.
>
> So, without looking at the screen, I type ``window.create<RETURN>``, do I
> get what I expect?, which is to say:
>
> "window.create
> "
Yes
Comment 12•12 years ago
|
||
If any of you are interested, this is what I (and Nick) were talking about : http://scrapmac.github.io/aulx/
Comment 13•12 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #12)
> If any of you are interested, this is what I (and Nick) were talking about :
> http://scrapmac.github.io/aulx/
[except that the UP and DOWN keys also behave as TAB and SHIFT TAB in that demo]
Reporter | ||
Comment 14•12 years ago
|
||
Yes, that feels great to me (except for the arrow keys)
Reporter | ||
Updated•12 years ago
|
Blocks: devtools-shortcuts
Updated•12 years ago
|
Assignee: nobody → rFobic
Updated•12 years ago
|
Assignee: rFobic → nobody
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → jwalker
Status: NEW → ASSIGNED
Comment 15•11 years ago
|
||
Style editor now has autocopmletion. But there cycling is allowed *only* via TAB/SHIFT-TAB . UP and DOWN will close the popup and move the caret instead.
Is this what you wanted Nick in your comment 14 ?
Reporter | ||
Comment 16•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #15)
> Style editor now has autocopmletion. But there cycling is allowed *only* via
> TAB/SHIFT-TAB . UP and DOWN will close the popup and move the caret instead.
>
> Is this what you wanted Nick in your comment 14 ?
Perfect.
Comment 17•11 years ago
|
||
After implementing the key binding as discussed in this bug in the Style Editor's autocopmletion popup, everybody is complaining about the missing UP/DOWN and ENTER keybinds.
After all, every other code editor has those key bindings too.
Also, it turns out that people are ready to press Escape and Enter to go to next line (when popup is open) rather than not having Enter key insert first result.
I think that this bug should be Wontfixed by popular demand.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Resolution: FIXED → WONTFIX
Comment 18•11 years ago
|
||
(At this point, I was just asking for an opinion. Not to actually wontfix it. I would have done it myself otherwise :) )
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Comment 19•11 years ago
|
||
(In reply to Girish Sharma [:Optimizer] from comment #17)
> After implementing the key binding as discussed in this bug in the Style
> Editor's autocopmletion popup, everybody is complaining about the missing
> UP/DOWN and ENTER keybinds.
>
> After all, every other code editor has those key bindings too.
>
> Also, it turns out that people are ready to press Escape and Enter to go to
> next line (when popup is open) rather than not having Enter key insert first
> result.
>
> I think that this bug should be Wontfixed by popular demand.
Sure, +1 for wontfixing. As discussed on twitter, even if we think we have something cooler than the 'standard', *not* using the standard interaction costs us by surprising people.
Updated•11 years ago
|
Status: REOPENED → RESOLVED
Closed: 11 years ago → 11 years ago
Resolution: --- → WONTFIX
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•