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

Completer usability 2 (rebased of pr #1082) #1108

Merged
merged 5 commits into from Dec 7, 2011

Commits on Dec 7, 2011

  1. usability and cross browser compat for completer

    	- dissmiss the completer, append what alredy type, **Plus** one caracter in
    	  some cases
    
    	  List of special caracter that are handle are in a given list `()[]./\-+`
    	  for the moment. usefull for exaple when typing :
    	  >>> np.s<tab>in(
    	  and not having to type '(' twice.
    
    	  they are handle separately has the [a-zA-Z] ones because otherwise they
    	  will screw up the regexp, and are opt-in to avoid bugs with invisible
    	  caracters send because some browser have 'keypress' event for meta keys
    
    	  close ipython#1080
    
    		Note to this commit :
    	  list of test for the completer across browser with --pylab=inline flag
    
    	  #test direct one completion
    	  plt.an<tab>       -> plt.annotate
    
    	  #test filter,tab, only one completion
    	  plt.a<tab>n<tab>  -> plt.annotate
    
    	  # test partial common beggining
    	  # test dismmised if user erase
    	  plt.a<tab>nn<backspace><backspace>u<tab>                -> completer to `aut`
    	  ........................................<tab><tab><tab> -> nothing should append
    	  .......................................................<backspace><backspace<backspace> -> completer cancelled
    
    	  #test dismiss if no more completion
    	  plt.s<tab>c  -> completer 3 choices
    	  ...........u -> dismissed whith what user have typed.  `plt.scu`
    
    	  # test dismiss in no completion, special symbol
    	  # opt-in list of caracters +-/\()[].
    	  np<tab>.s          -> a 'dot' sould dismiss the completer and be appended
    	  .........<tab>in(  -> np.sin(
    	  np.s<tab>in[       -> np.sin[
    Carreau committed Dec 7, 2011
    Copy the full SHA
    c630b34 View commit details
    Browse the repository at this point in the history
  2. Apply pep8 to js

    Carreau committed Dec 7, 2011
    Copy the full SHA
    e480aee View commit details
    Browse the repository at this point in the history
  3. completer update code-miror on the fly

    	Following @fperez advice, change the completer apparence to avoid user confusion.
    
    	- Append what the user type in the completer in code-miror, (Almost) as if
    	  codemirror still have focus
    	- distinguish between "fixed" completion  part, which was sent to the kernel
    	  (now written in bold) and filtering one,handled only in JS,that the user
    	  can errase without dismissing the completer
    
    	I changed the action of <Space> to dismiss the completer with what have
    	already been typed and inserting a space instead of "picking" the currently
    	hilighted option
    
    	<Escape> will still dissmiss the completer and remove everything the user as
    	typed since the completer invocation
    
    	Note that while the completer is shown, code-mirror does not show any
    	blinking cursor
    Carreau committed Dec 7, 2011
    Copy the full SHA
    5f3907c View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    3a94f81 View commit details
    Browse the repository at this point in the history
  5. notebook: code Readability. Add dismissing symbols

    	* As minrk suggested, changes list of char to string.split()
    	* add also a few dismissing symbold like `,` `=` and `*` for
    	  the completer
    Carreau committed Dec 7, 2011
    Copy the full SHA
    b1cbd5f View commit details
    Browse the repository at this point in the history