-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
SelectMultiple widget #6890
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
SelectMultiple widget #6890
Conversation
|
ping @jdfreder, @ellisonbg, @jasongrout for widget review |
|
Looking at the code, but I definitely think this is better than the |
|
I am +1 on this feature and this type of implementation as a separate class. Some feedback:
|
|
Heh, well was just working with what was there from I'll add some more docstring, explaining this choice: I feel being consistent is quite important. |
|
More doc added, but this doesn't fix the underlying problem, I suppose. If renaming was going to happen:
So I guess changing |
|
Ned rebase apparently. Sorry. |
|
will look into... On Thu, Dec 4, 2014 at 10:15 AM, Matthias Bussonnier <
|
|
rebased! On Thu, Dec 4, 2014 at 10:16 AM, Nicholas Bollweg nick.bollweg@gmail.com
|
|
I have this on my review list for today. @bollwyvl it looks like you didn't push the rebase, it's not showing on GH. |
38e32bf to
e2ce836
Compare
|
@jdfreder Right you are! Sorry! I had another branch with a deceptively similar name. |
|
This will create a merge conflict with #6747 |
I like choices, @ellisonbg ? |
|
It is hard to evaluate the name "choices" outside of the context of the other names in the API. Can you summarize the different names and what they are for? |
|
#6747 was merged and it doesn't look like it caused conflicts, I'm surprised. I haven't looked, but it may not behave as expected anymore. |
e2ce836 to
f60c728
Compare
|
@jdfreder thanks, in fact needed a rebase... it was still using I also added some tests for As to the values/value/choices API question: Here are some options for (the things that can be chosen), (the thing that is chosen), (the things that are chosen):
|
|
For the naming, what about something along the lines of |
|
+1 to @takluyver 's suggestion |
|
+1 - I like that too On Wed, Jan 21, 2015 at 1:37 PM, Jonathan Frederic <notifications@github.com
Brian E. Granger |
|
Sorry, a bit out of the loop the last few days :) |
|
I prefer the consistency across all of _Selction widgets. |
|
Does that conflict with things that expect widgets to have a I don't have strong feelings either way, just thinking through the implications. |
|
Changed |
|
Also, i left |
|
I think I'd be inclined to pluralise even so, and just have value as a
|
|
I agree with @takluyver - I think value should be the only exception, and other variables should be named logically (selected_labels here). |
2b1dc1f to
27508df
Compare
|
okiedoke. I thought it would cause more problems that it did on the front end, but it appears to work just fine with only minor modification. rebased and changed. also updated the example notebook. |
|
Thanks @bollwyvl , I'm taking a look at this now. |
|
Hm... as shift/ctrl is part of the gimmick of mutliple select (potentially with the keyboard), the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When working on IPython, can you configure your editor not to strip trailing whitespace? It causes unnecessary git conflicts, and makes the diffs harder to review. Thanks.
|
gah, sorry about the whitespace, bane of all developers. switched to atom as to events, looks like http://codepen.io/anon/pen/PwKBjz i'm used to On Thu, Jan 29, 2015 at 2:16 PM, Thomas Kluyver notifications@github.com
|
|
No worries, these things happen. git rebase does have a I only see 'change' firing in your example, with Firefox on Linux, not 'input'. It seems to be firing at all the right times, both with mouse and keyboard input, though. |
19b2b4d to
fb5cf22
Compare
|
That was really unpleasant 👊 reminds me of the bad old days of big CVS merges! Does anyone in the project have a semi-official .editorconfig? Changed the event to I've taken screenshots, and still can't figure why the tests are failing, as the one right after the rebase worked... will keep investigating... |
|
The tests were using Now handling that little gem, I think this is basically ready to go... unless I should do yet more event investigating. Is keyboard support a thing that needs testing? |
f641410 to
8cd71d9
Compare
It's not tested now so I wouldn't worry about it. In the future we may be changing test frameworks anyways. I restarted Travis, because it looked like the last failure was sporadic. |
|
Thanks @bollwyvl ! I'm sorry this took so long to merge. Tests are passing, I looked over it one more time, and it looks good to me. |
Adds a minimal multiple select widget, with
_MultipleSelectionas baseline for additional multiple select widgets: i.e.ToggleButtonsMultiple.Unlike the suggestion of #5327 to have
multiple=True, this adopts a whole separate widget due to downstream incompatibilities: some of the_Selectionsubclasses cannot accept multiple values (Radios). Perhaps adding amultipletraitlet while allowing implementations to opt-out would make more sense.