Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Notebook] Deactivate tooltip on tab by default. #4398

Merged
merged 3 commits into from Nov 4, 2013

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Oct 17, 2013

Codepath is not removed by this.

Should I cleanup the codepath also ?

Still need to search in documentation if/where we say that tooltip is triggered by tab.

(also people will hate us for some time)

@damianavila
Copy link
Member

Yep, they will hate us, jeje... but I think, at the end, is a good solution.
+1

@ivanov
Copy link
Member

ivanov commented Oct 19, 2013

i missed where this came from, but it makes me 😦 to not be able to just tab to get the tool tip.

I am still able to sometimes trigger the tooltip by pressing tab a bunch of times. The completions I get with this branch don't make sense, either (why should cell magics pop-up first as arguments to a function call?)

@damianavila
Copy link
Member

@ivanov this came from the last meeting... there was a discussion about this and the general agreement was to separate completion from the tool tip...

Btw, when I tested, I did not see the tooltip... even pressing the tab a bunch of times....

But, testing again, now I see the "cell magics" completion... I did not see it before because I was completing over a letter that did not match any cell magic...

@Carreau
Copy link
Member Author

Carreau commented Oct 19, 2013

I missed where this came from, but it makes me :-( to not be able to just tab to get the tool tip.

The rationale (on a muti language env) is that to be able to decide whether to use oinfo or complete there have to be some lexing in the frontend if both are bound to tab. So either we extend the message spec (to decide in kernel), or we split help/complete action on 2 keys.
Shift tab exist for quite some time now and was already configurable, shift tab have also the advantage of working on selection in the middle of code.

I personally was for the first solution of asking the kernel, but in some case there is no way to decide what the user wish.

I am still able to sometimes trigger the tooltip by pressing tab a bunch of times.

Will try but I don't understand why...

The completions I get with this branch don't make sense, either (why should cell magics pop-up first as arguments to a function call?)

This is how completion behave in all frontend, not notebook specific :

In [3]: histogram(
Display all 343 possibilities? (y or n)
%%!                        %loadpy                    %who                       UnboundLocalError          contrib                    long
%%HTML                     %logoff                    %who_ls                    UnicodeDecodeError         copyright                  map
%%SVG                      %logon                     %whos                      UnicodeEncodeError         credits                    max
%%bash                     %logstart                  %xdel                      UnicodeError               def                        memoryview
%%capture                  %logstate                  %xmode                     UnicodeTranslateError

@ivanov
Copy link
Member

ivanov commented Oct 22, 2013

thanks @Carreau - i understand better now why this needs to happen. I suppose it's a little too much work to just weaponize Tab and let the kernels dictate the behavior that key should implement ...

@ellisonbg
Copy link
Member

I am +1 on cleaning up the code.

@Carreau
Copy link
Member Author

Carreau commented Oct 23, 2013

As per @ellisonbg request, logic cleaned. Rebased on master also.

@rossant
Copy link
Contributor

rossant commented Oct 26, 2013

Excuse me, but how do I get the tooltip back in the notebook? Tab does not work anymore (move focus to next cell), shift+tab moves focus to previous cell.

@Carreau
Copy link
Member Author

Carreau commented Oct 26, 2013

Can you try to force refresh see if this is not stale cache ? Will retry this branch more extensive though.

@rossant
Copy link
Contributor

rossant commented Oct 26, 2013

@Carreau no luck -- it's been a few days. Same problem in latest Firefox, Chrome, Opera, IE11.

@Carreau
Copy link
Member Author

Carreau commented Oct 26, 2013

with this branch or on master?

@rossant
Copy link
Contributor

rossant commented Oct 26, 2013

ah sorry, master. Can you reproduce this problem?

@Carreau
Copy link
Member Author

Carreau commented Oct 26, 2013

does the JS console says anything ?

@rossant
Copy link
Contributor

rossant commented Oct 26, 2013

[13:17:25,343] TypeError: cell.kernel.object_info_request is not a function @ http://127.0.0.1:8888/static/notebook/js/tooltip.js:228

@Carreau
Copy link
Member Author

Carreau commented Oct 26, 2013

Ok found the reason. something that comms broke.

@rossant
Copy link
Contributor

rossant commented Oct 26, 2013

Ok, thanks for your help! I let you take it from here :)

@minrk
Copy link
Member

minrk commented Oct 28, 2013

Anything else here?

@Carreau
Copy link
Member Author

Carreau commented Oct 29, 2013

I don't see anything else to add remove..

minrk added a commit that referenced this pull request Nov 4, 2013
[Notebook] Deactivate tooltip on tab by default.
@minrk minrk merged commit 4134fc9 into ipython:master Nov 4, 2013
@Carreau Carreau deleted the no-tooltip-on-tab branch November 4, 2013 19:52
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
[Notebook] Deactivate tooltip on tab by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants