Gordon Ball
59a461f928
Fix format problem when showing an error
12 years ago
Gordon Ball
5eea47203b
Disable run button until the function finishes
12 years ago
Gordon Ball
5524077e87
Add an extended range abbreviation including a step value
12 years ago
Gordon Ball
945a840674
Add float implementation of range widget
12 years ago
Gordon Ball
3178a184c0
Add initial implementation of 2-handle range sliders for integers.
12 years ago
Gordon Ball
4752b83feb
Add 'on_demand' option to interact() so that long-running functions can be started only when explicitly requested
12 years ago
Raffaele De Feo
694f33e2ba
Validate initial value of "_BoundedFloatWidget".
12 years ago
Jonathan Frederic
74483d77da
Change css dict to a list,
...
even though this introduces O(N) complexity, it fixes a bug
where path dependent css traits could be executed out of order,
making it impossible to actually set the traits from the back-end.
12 years ago
Jessica B. Hamrick
287e9a5cbd
Add tests for default/custom description
12 years ago
Jessica B. Hamrick
31812159af
Only set widget description in interact if it does not already exist
12 years ago
Maximilian Albert
fb11e70f53
Fix copy & paste error in docstring.
12 years ago
Jessica B. Hamrick
e436850582
Add placeholder attribute to text widgets
12 years ago
jdavidheiser
e0a40d54cb
Update widget_selection.py
12 years ago
jdavidheiser
52e58dce6d
Update widget_selection.py
12 years ago
jdavidheiser
9810033988
widget_selection update
...
Fix for the fact that dictionary randomization sometimes switches the order of the arguments passed to the class on initialization. This means that, potentially, 'value' can be updated BEFORE 'values', and since the method to update 'value' checks to see whether it exists in 'values', this breaks things.
12 years ago
Thomas Kluyver
95dc697e3b
Remove Widget.closed attribute
...
Closes gh-5282
12 years ago
Jonathan Frederic
673577cf6c
Merge pull request #5207 from Zaharid/childfireevent
...
Children fire event
12 years ago
MinRK
d8b6a1a0ba
don't validate ContainerWidget.children
...
just use a plain Tuple, so we don't have to define a new Trait
12 years ago
MinRK
cc1ba8b1f7
remove incorrect is instance check in children_changed
12 years ago
MinRK
c89ec19fca
don't check shape of ContainerWidget.children
12 years ago
Jonathan Frederic
7855de2f13
s/CTuple/Tuple
12 years ago
Jonathan Frederic
dedbc3b0e1
Changed children list to CTuple.
...
Also removed some unused refences in the widget code
and added support for tuples in the pack/unpack code.
12 years ago
zah
439003d709
Children fire event
...
Now when a container widget is displayed, the _handle_displayed method
of each of its children is fired.
12 years ago
Brian E. Granger
708c30c912
Merge pull request #5136 from minrk/interact-default
...
set default value from signature defaults in interact
12 years ago
MinRK
62f318c777
undo failed changes
...
before raising
otherwise, invalid values were still accepted
12 years ago
MinRK
b51cc50357
further tests for default values in interact
...
both valid and invalid
12 years ago
MinRK
acfc2d5308
set default value from dict
12 years ago
Jonathan Frederic
0eebd9e05b
Added msg_throttle sync=True widget traitlet
12 years ago
MinRK
e91ef370dd
remove no-op adding abbreviations from always-empty dict
12 years ago
MinRK
8a2d92010a
set default value from signature defaults in interact
...
If available, use the default value from the signature for the initial condition,
when using range/choice abbreviations.
Not affected:
- single-value abbreviations (`@interact(a=5)` sets `a=5`)
- explicit Widgets
12 years ago
MinRK
d772b4c3da
catch errors at a lower level in interact
...
for cleaner tracebacks in the interact callback than the fallback case
12 years ago
MinRK
ddc22152ea
show traceback in widget handlers
...
rather than logging
closes #5064
12 years ago
MinRK
813e32dfea
set readout=True as default on SliderWidgets
12 years ago
MinRK
7861bee65f
test widget interaction (Python)
12 years ago
MinRK
6d555b7aee
return f with @interact, not just @interact(**kwargs)
12 years ago
MinRK
031b69895c
fix ValueError format message
12 years ago
MinRK
48a56d3156
simplify float/int slider abbreviation logic
...
fixes unhanded case where only one entry is a float
12 years ago
MinRK
7911c6c237
finish removing *args support
12 years ago
MinRK
ad6109692d
ensure range widgets get value that is on a step
12 years ago
MinRK
a58ca8a0a0
s/const/fixed/
12 years ago
MinRK
2d2c5beb0e
move @annotate to py3compat
12 years ago
MinRK
3053a855a9
remove positional arg support from interact
12 years ago
MinRK
feab63754d
update interact now that SelectionWidget.values is a dict
12 years ago
Brian E. Granger
88fb17b182
Adding const pseudo-widget for fixing arguments to interact.
12 years ago
Brian E. Granger
6e8c63ea19
Adding decorator forms of interact. Yeah!
12 years ago
Brian E. Granger
dd9a6efaed
Utter interact insanity.
...
This involves a bunch of really complicated logic to handle the
different ways that function parameters can be processed in Python.
Most importantly, this includes support for *args in interact.
12 years ago
Brian E. Granger
55cddce784
Fixing interact imports.
12 years ago
Brian E. Granger
2ef393aaa3
Renaming interact.py->interaction.py to improve imports.
12 years ago
Thomas Kluyver
a96c228554
Get widgets from function annotations and default arguments.
...
Also, preserve the order of function parameters from the signature where
possible.
This uses a backport of the Python 3.3 signature machinery that @minrk
found and improved.
12 years ago
Brian E. Granger
5853bb8ff7
Adding .widget to function.
12 years ago
Brian E. Granger
93047f1d3c
Updating interact to work with latest state of widgets.
12 years ago
Brian E. Granger
faebb43e01
Updating interact to new APIs.
12 years ago
Brian E. Granger
1d6cde4877
Adding interact.py.
12 years ago
MinRK
5823b875eb
don't allow empty selection in selection widgets
...
raises KeyError on failed lookup (in both directions)
12 years ago
MinRK
ca0afa1d8b
value_names is read-only
12 years ago
MinRK
3e1f2e22f8
Make `SelectionWidget.values` a dict
...
rename 'labels' and '_value' to 'value_names' and 'value_name'.
To specify a mapping of value names and values, use a dict.
If you specify `values=[list]`, then an OrderedDict will be used.
Assignment after construction only supports a dict.
12 years ago
Brian E. Granger
2b7310f794
Merge pull request #4933 from jdfreder/widget-model-name
...
Small Widget inconsistency fixes
12 years ago
Brian E. Granger
cef93c8cfb
Adding initial version of readout to sliders.
12 years ago
Thomas Kluyver
c633256fc9
Fix some formatting in widget docstrings
12 years ago
Jonathan Frederic
865c7330a9
s/model_name/_model_name
12 years ago
Jonathan Frederic
75b148d40b
Renamed widgets...
...
TextWidget, TextareaWidget, CheckboxWidget, and SelectWidget
12 years ago
MinRK
36db60eacb
review pass on Python-side of widgets
...
- remove variable signature complexity
- use a few more traitlets as appropriate
12 years ago
Jonathan Frederic
e793d022b5
Callback dispatcher return callback value.
...
Also import it with the widgets namespace so it can be used elsewhere.
12 years ago
Jonathan Frederic
00b39af9cf
Fixed type in container
...
._children was not being set... Instead the value was being returned (useless).
12 years ago
Jonathan Frederic
91e82218a8
Changed selection widget API to use labels list
...
for mapping custom str reprs to items in the selection list
12 years ago
Jonathan Frederic
288b8a0ced
s/view_name/_view_name
12 years ago
Jonathan Frederic
2d13d05e9c
Replace O(N^2) algorithm with a faster one.
12 years ago
Jonathan Frederic
9e643f5692
Support multiple types in selection widget.
12 years ago
Jonathan Frederic
629d65da89
Fixed context errors and a couple of typos to get the tests working again
12 years ago
Jonathan Frederic
d7b86104b8
Fixed typo - else -> elif
12 years ago
Jonathan Frederic
046280b51a
s/ModalView/PopupView
12 years ago
Jonathan Frederic
e323f64e6d
Create base widget classes
12 years ago
Jonathan Frederic
b432b4840f
Use CUnicode for width and height in ImageWidget
12 years ago
Jonathan Frederic
e823d386ab
Fixed name conflict with _property_lock
12 years ago
Jonathan Frederic
077bd5c6ca
Added new CallbackDispatcher class
12 years ago
Jonathan Frederic
611614b6eb
Document in widget packing that vaues must be JSON-able.
12 years ago
Jonathan Frederic
cf05ef015a
ict comprehension and list comprehension in pack/unpack widgets
12 years ago
Jonathan Frederic
cb6094281c
s/custom_content/content
12 years ago
Jonathan Frederic
5fe860ed26
Added doc strings to properties in widget.py
12 years ago
Jonathan Frederic
1689eed2f6
Reorganized attrs in widget.py
12 years ago
Jonathan Frederic
d317532a38
Halign dict colons
12 years ago
Jonathan Frederic
7387f886c6
containers and selectioncontainers now only allow one of any single child
12 years ago
Jonathan Frederic
bfdebf9632
More PEP8 changes
12 years ago
Jonathan Frederic
ff39989b8b
s/Int/CInt s/Float/CFloat
12 years ago
Jonathan Frederic
74185a68e7
Got containers and mutlicontainers working! Yay
12 years ago
Jonathan Frederic
4017c7b27a
Fixed *almost* all of the test-detected bugs
12 years ago
Jonathan Frederic
c085593e2a
More fixes
12 years ago
Jonathan Frederic
d694666e66
A lot of bug fixes...
...
Related to 1-to-1 changes
12 years ago
Jonathan Frederic
047a90538f
1-to-1 widget / view mapping
12 years ago
Jonathan Frederic
c1c7bb7563
Everyone uses one model
12 years ago
Jonathan Frederic
b16171ac76
Added sync=True to all view name attrs
12 years ago
Jonathan Frederic
cfe8a07337
Added sync= attr to DOMWidget
12 years ago
Jonathan Frederic
b4a83b6044
sync=True isntead of a keys list
12 years ago
Jonathan Frederic
00650fd64a
Dev meeting Jan 2014, widget review day 2
12 years ago
Jonathan Frederic
d3ffd25107
Dev meeting widget review day 1
12 years ago
Paul Ivanov
897d51a567
fix typos
12 years ago
Paul Ivanov
95e99c0c61
remove unused imports
12 years ago
Jonathan Frederic
d103c682c5
Many checks off the todo list, test fixes
12 years ago
Jonathan Frederic
0f715170b3
Add a comment that explains the notion of the default element
...
to be styled in set_css's' doc string.
12 years ago
Jonathan Frederic
be268dcf98
Implement a context manager as a property locking mechanism in Widget.
12 years ago
Jonathan Frederic
70c6a295d0
Finished renaming Multicontainer to SelectionContainer
12 years ago
Jonathan Frederic
a528610e07
renamed: ../static/notebook/js/widgets/widget_multicontainer.js -> ../static/notebook/js/widgets/widget_selectioncontainer.js
...
renamed: widget_multicontainer.py -> widget_selectioncontainer.py
12 years ago
Jonathan Frederic
c62b496b0e
s/image_format/format
12 years ago
Jonathan Frederic
261e92de74
re-order handle custom msg and handle recieve state
12 years ago
Jonathan Frederic
15dabce113
send_state only once for dict signature of set_css
12 years ago
Jonathan Frederic
6c11760a89
Fixed comments for optional kwargs so they are redundant.
12 years ago
Jonathan Frederic
670f4881ec
remove 3rd callback type from on_displayed
12 years ago
Jonathan Frederic
7e6c8e4f1d
Remove view_name from display
12 years ago
Jonathan Frederic
463bcf85ee
Fixed _send so it can open a comm if needed.
...
It no longer returns anything.
12 years ago
Jonathan Frederic
85b5adff58
Remove first three lines of repr widgets
12 years ago
Jonathan Frederic
4e19dd7933
s/_handle_widget_constructed/_call_widget_constructed
12 years ago
Jonathan Frederic
39aaf7bf88
s/default_view_name/view_name
12 years ago
Jonathan Frederic
21a14e11a4
s/Widget/DOMWidget s/BaseWidget/Widget
12 years ago
Jonathan Frederic
696a6e4c28
add/remove_class now can accept a list of classes
12 years ago
Jonathan Frederic
2600913067
Removed ViewWidget
12 years ago
Jason Grout
a0b2cc40b8
Make widget keys have more explicit inheritance
12 years ago
Jason Grout
ce98452180
Get rid of keys magic; make the keys very explicit
12 years ago
Jason Grout
f0a4b9ea30
Make the widget keys property traverse the superclasses and accumulate the _keys attributes.
...
This caches the result, overwriting the property.
12 years ago
Jonathan Frederic
7c3b21d239
Fixed typo in model_id property
12 years ago
Jonathan Frederic
57f3057ca5
Moved view widget into widget.py
12 years ago
Jonathan Frederic
46e88dc205
Fixed indent of line 450
...
... caused Travis to get mad
12 years ago
Jonathan Frederic
a2235efbea
Further indentation cleanup
12 years ago
Jonathan Frederic
35a536f3b8
Re-decoupled comm_id from widget models
12 years ago
Jonathan Frederic
1b4e2ad6fe
Added ViewWidget
12 years ago
Jason Grout
b41f77e635
Fix the python side of the add/remove class functions to send custom messages
12 years ago
Jason Grout
747b219771
Move some Widget class references to BaseWidget
12 years ago
Jason Grout
07ffef8392
Make sure containers transmit the children; take care of case where children is possibly empty.
12 years ago
Jason Grout
18beaff887
Remove unused code and debugging statements
12 years ago
Jason Grout
72f7d2fe09
Remove the automatic _children_attr and _children_lists_attr.
...
When serializing, any Widget object is encoded as its comm_id. The view should know how to deal with the attribute, and should know that the attribute is a comm_id.
12 years ago
Jason Grout
ad1e23bfc2
Intermediate changes to javascript side of backbone widgets
12 years ago
Jason Grout
518cb4c647
Separate the display from the models on the python side, creating a BaseWidget class.
...
Conflicts:
IPython/html/widgets/widget.py
12 years ago
Jonathan Frederic
2df05bc5b8
Display handler now supports full kwargs
12 years ago
Jonathan Frederic
996d133710
Remove redundent _handle_close method
12 years ago
Jonathan Frederic
857ae831fb
Decoupled Python Widget from Comm
...
Fixed conflicts:
IPython/html/widgets/widget.py
12 years ago
Jonathan Frederic
f2fefe20ff
Added event for widget construction
12 years ago
Jonathan Frederic
ea27ae599b
Added parent parameter to on_display callback
12 years ago
Jonathan Frederic
1b02e8f607
Add ImageWidget
12 years ago
Jonathan Frederic
8e1c52382c
Added `method` property to messages from the front-end
12 years ago
Jonathan Frederic
0f34affc35
Dont send add and remove class calls if no comm exists
12 years ago
Jonathan Frederic
4e1e091648
Added ModalView
12 years ago
Jonathan Frederic
4333c84907
Fix scroll_to_bottom
12 years ago
Jonathan Frederic
6aac36ee13
Remove on_click, doesn't apply
12 years ago
Jonathan Frederic
4f663d896d
Made scroll to bottom use msgs
...
allow multiple msg handlers
added send to view to automatically hookup callbacks
changed send signature to optionally accept a cell to connect callbacks
12 years ago
Jonathan Frederic
cc96589afc
Changed on_submit to use custom messages instead of stateful communcation
12 years ago
Jonathan Frederic
10002f5a81
Changed button to use custom messages instead of state to communicate events.
12 years ago
Jonathan Frederic
c299022cc7
Changed add_class and remove_class to use messages instead of stateful communication
12 years ago
Jonathan Frederic
d795654251
Add scroll_to_bottom method for TextAreaView (StringWidget).
12 years ago
Jonathan Frederic
9019b639d1
Fixed a bug that didn't allow callbacks to set a property
...
on the widget that triggered the callback.
12 years ago
Jonathan Frederic
0d7428a903
Added TextBox submit event
12 years ago
Jonathan Frederic
c0ff518107
Added support for custom widget msgs
12 years ago
Jonathan Frederic
742ad511f6
Added check on widget close to make sure comm isn't already none.
12 years ago
Jonathan Frederic
1f39592bb1
Added missing types import
12 years ago
Jonathan Frederic
8502b2c182
Remove init_widget_js, use require.js for everything
...
Updated examples
Fixed bug with message throttling
12 years ago
Jonathan Frederic
08b1d08fb6
Fix: added inspect import to widget.py
12 years ago
Jonathan Frederic
3390f64dc2
Added flex properties to container.
...
Also replaced underscores in flex align properties with dashes.
12 years ago
Jonathan Frederic
2ba2d42e84
Added flexible box model align properties.
12 years ago
Jonathan Frederic
a67f2ec472
Fixed doc string comments, removed extra space
12 years ago
Jonathan Frederic
8279db0eb0
Fixed widget button onclick register so it only will ever register a callback once.
12 years ago
Jonathan Frederic
35fc3af84f
Added on_display callback
12 years ago
Jonathan Frederic
12b02b3e49
Use baseProjectUrl for widget import path
12 years ago
Jonathan Frederic
6834224332
Updated set_css so it can handle a dictionary of keys and values.
12 years ago
Jonathan Frederic
20c97e0f87
Use relative paths for widget js jquery imports
12 years ago
Jonathan Frederic
6110e1c307
Updated ButtonWidget onclick description
12 years ago
Jonathan Frederic
e84e1d2df6
Fixed button on_click handler so it's initiated on instanciation
12 years ago
Jonathan Frederic
8fba5d2f07
Added add_class and remove_class methods.
12 years ago
Jonathan Frederic
048ba656d4
Remove text repr of js includes.
12 years ago
Jonathan Frederic
810ea87e5b
Added `visible` property to all widgets
12 years ago
Jonathan Frederic
82dd891483
Allow parent to be set after construction...
...
But still must be set before display call
12 years ago
Jonathan Frederic
e9fe606ba6
More relative imports, Travis w/ Py3.3
12 years ago
Jonathan Frederic
2c3d80c275
Added selected_index property to TabView
12 years ago
Jonathan Frederic
8687ad881a
Fixed widget imports for Python3
12 years ago
Jonathan Frederic
f2d77f3b78
Added labels to basic widgets
12 years ago
Jonathan Frederic
9b891d4018
s/TextareaView/TextAreaView & s/TextboxView/TextBoxView
12 years ago
Jonathan Frederic
dfd4e3269e
Added TabView to multicontainer
12 years ago
Jonathan Frederic
6dd1bce589
Added ability to title multicontainer pages before multicontainer display()
12 years ago
Jonathan Frederic
510c97679d
Added ability to set container page titles for widget multicontainer
12 years ago
Jonathan Frederic
a2294581ea
Actual absolute paths...
12 years ago
Jonathan Frederic
5871471c1f
Absolute paths
12 years ago
Jonathan Frederic
692c8f29a6
Added multicontainer widget
12 years ago
Jonathan Frederic
f422bb9be2
Cleaned up Python widget code.
12 years ago
Jonathan Frederic
837ef44256
LOTS OF WIDGET CHANGES
...
Moved model-like code out of manager.
Added parent/child API.
Throttling now occurs on a model by model level.
View/cell association is fixed for the most part, but there is still
one assumption being made in handle_com_msg.
12 years ago
Jonathan Frederic
c692d2aaa8
Made registered model name look like other model names
12 years ago
Jonathan Frederic
76a7a25c12
Fixed stale reference to base.py -> widget.py
12 years ago
Jonathan Frederic
0d25759d53
Add state packet delta compression.
12 years ago
Jonathan Frederic
d72262e071
Fixed button widget click event handler/
12 years ago
Jonathan Frederic
c20859a5c9
Add button widget
12 years ago
Jonathan Frederic
e619bdf313
Flex box system improvements
...
Now to set a container to vbox or hbox you call .vbox() or .hbox()
12 years ago
Jonathan Frederic
2ad57f6f9d
Attempt 1, HBox and VBox implementation.
12 years ago
Jonathan Frederic
65a6000919
Renamed widget python classes to avoid name stomping
12 years ago
Jonathan Frederic
f3a3e7c9cb
Added int widget
12 years ago
Jonathan Frederic
26f31184e7
Added float widget
12 years ago
Jonathan Frederic
55a6e00788
Added missing import reference for bool widget
12 years ago
Jonathan Frederic
03a832753e
Changed js loading,
...
Use require.js in js files
Assume 1 on 1 mapping of py file names to js file names
12 years ago
Jonathan Frederic
f037f2bd42
Cleaned up python widget classes
12 years ago
Jonathan Frederic
7490cab0c1
Added boolean widget
12 years ago
Jonathan Frederic
990303f3eb
Removed require.js scheme since it forces async event driven model,
...
this model does not work with the comm/widget communication model.
We need to be able to load the dependencies before we send the
show() message to the widget manager. Otherwise a race condition
will exist where the widget manager may recieve the show message
before the dependencies have been loaded (happened almost every time).
12 years ago
Jonathan Frederic
4b55ef61b0
Added system that allows js to be required by widgets.
12 years ago
Jonathan Frederic
bc0363039e
Removed funky javascript loading mechanism
...
NOTE: UNTIL THE NEW JS LOADING MECHANISM IS IN PLACE, THIS BREAKS THE SYSTEM
12 years ago
Jonathan Frederic
f939713d14
Updated imports to reflect class move
12 years ago
Jonathan Frederic
fffaba9a7b
Moved widget js into static
12 years ago
Jonathan Frederic
cb7eb8354f
Fixed bug where properties couldn't be set on model till model was shown
12 years ago
Jonathan Frederic
dde9018ab3
Register init_widget_js
...
and remove cls parameter
12 years ago
Jonathan Frederic
119104f2e8
Register new widgets in IPython.html.widgets namespace
12 years ago
Jonathan Frederic
a0d03e30f0
Add string widget
12 years ago
Jonathan Frederic
1b6062beee
Add selection widget
12 years ago
Jonathan Frederic
c9a44b86cb
Add container widget
12 years ago
Jonathan Frederic
4dc1155c7e
Handle widget hide/show logic
...
also only create a widget manager once
12 years ago
Jonathan Frederic
3a16f603b9
Updates to widget.py
...
Added global init js function
Moved init comm logic to show function
12 years ago
Jonathan Frederic
f32f450d0f
Moved widget.js into widget code directory
12 years ago
Jonathan Frederic
22dcf3aa68
Basic display logic
...
s/show/_repr_...
Added code to display Javascript in frontend.
12 years ago
Jonathan Frederic
918d57050a
Added widget.py
12 years ago