Skip to content

usability and cross browser compat for completer #1082

Closed
wants to merge 4 commits into from
Commits on Dec 1, 2011
  1. @Carreau

    usability and cross browser compat for completer

    Carreau committed Dec 1, 2011
    	- 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 #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[
  2. @Carreau

    Apply pep8 to js

    Carreau committed Dec 1, 2011
Commits on Dec 3, 2011
  1. @Carreau

    completer update code-miror on the fly

    Carreau committed Dec 3, 2011
    	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
Commits on Dec 6, 2011
  1. @Carreau
Something went wrong with that request. Please try again.