Gordon Ball
8838762b30
Remove a rogue print statement
12 years ago
Gordon Ball
08895738f2
Merge master
12 years ago
Gordon Ball
05f07f1f71
Add a number of extra tests for the range widgets
12 years ago
Gordon Ball
2be045fe25
Support both value tuple and upper, lower traits for both int and float widgets
12 years ago
Jonathan Frederic
8877d32c4e
Merge pull request #6194 from SylvainCorlay/immediate-widget-comm
...
Allow model id to be set externally on creation of the widget.
12 years ago
Jonathan Frederic
690059f8f8
Merge pull request #6296 from jasongrout/sync-hold
...
Add a new context manager, Widget.hold_sync(), which holds any syncing until the manager exits
12 years ago
Jason Grout
5cd46788f9
Before syncing a widget's state, check first for the property lock, then for the widget state lock
12 years ago
Jason Grout
af26d9cc24
Add a new context manager, Widget.hold_sync(), which holds any syncing until the manager exits
...
Sometimes for consistency or efficiency purposes, it makes sense to update
a group of properties all at once. This context manager makes this possible.
We also fix a bug where send_state was not passing the key on to get_state.
12 years ago
Sylvain Corlay
f9fa4ada06
allowing widet id to be set externally
12 years ago
Jason Grout
8513f673e3
Make the widget comm attribute more straigtforward
...
Instead of automagically instantiating a comm when it is accessed, require a call to open(). This makes the comm attribute much less magical, and hopefully more understandable.
12 years ago
Jason Grout
16c366d1b5
Automatically open a comm on creation of widgets
...
This will immediately create a model on the javascript side when a widget is created. This means that, for example, a widget that only interacts with its model can work without "displaying" it.
12 years ago
Gordon Ball
8c5218b581
Default to 25-75% of min-max if no value is set instead of 0-1
12 years ago
Jason Grout
d64627380b
Default view should be the base widget view class
12 years ago
Gordon Ball
ff3f952b18
Merge branch 'master' into interact-range-widgets
...
Conflicts:
IPython/html/static/style/ipython.min.css
IPython/html/static/style/style.min.css
IPython/html/static/widgets/js/widget_int.js
12 years ago
Jonathan Frederic
ba0a805404
Merge pull request #6226 from jasongrout/css-top-default
...
Remove $el_to_style from the widget javascript code; '' now defaults to this.$el
12 years ago
MinRK
09c1354ea7
avoid unregistering widget model twice
...
widgets are registered when the comm is created;
closing unregisters them. Calling `close` a second time
should be a no-op.
12 years ago
Sylvain Corlay
1bbc915ac0
setting _comm to None
12 years ago
Sylvain Corlay
ea52ef8704
del Widget.widgets[seld.model_id] in close rather than in __del__
12 years ago
Jason Grout
eccc20ce1a
Remove $el_to_style from the widget javascript code; '' now defaults to this.$el
...
This seems to make it easiest to select the top-level element. An alternative is to use special syntax for top-level elements, like in https://github.com/ipython/ipython/pull/6185
This will be followed up by other fixes that let the user set specific common properties of different elements.
This change also adds the .addBack() call, which means that nonempty selectors now apply to this.$el and its descendants, rather than just the descendants of this.$el.
12 years ago
sylvain.corlay
a9c34b679b
decoupling the comm lifetime from the widget lifetime
12 years ago
Brian E. Granger
372507e3f1
Merge pull request #6128 from jasongrout/widget-trait-serialization
...
Widget trait serialization
12 years ago
Jason Grout
8fb0ae4d36
Change serialize/deserialize to to_json/from_json
12 years ago
Jason Grout
97141c6bca
Simplify the code for picking json serialization functions to expose the logic better
12 years ago
Jason Grout
3235f42d12
Container assumes the children attribute is not None
...
Thanks to @SylvainCorlay for pointing this out.
12 years ago
Jason Grout
06084e996c
Change serialization terminology to serialize/deserialize
12 years ago
Jason Grout
eed0715a09
Prepend a sentinel value to model ids to distinguish them from normal UUIDs (from Sylvain Corlay).
12 years ago
Jason Grout
14f3897b56
Make Container widgets take children as the first positional argument
...
This makes creating containers less cumbersome: Container([list, of, children]), rather than Container(children=[list, of, children])
12 years ago
Jason Grout
0c72fddaba
Update widget serializer/unserializer to allow custom serialization on a trait-by-trait basis.
...
Serializers/unserializers are given as the trait metadata keys `to_json` and `from_json`.
12 years ago
Jonathan Frederic
636362787b
Fixed buggy behavior
12 years ago
Jonathan Frederic
14ff754cdf
Allow a widget to be displayed more than once within a parent widget.
12 years ago
Gordon Ball
bfd029f5ab
Remove tests for 4-5 tuples, add tests for validate logic
12 years ago
Gordon Ball
b7bb76f073
Fix validate logic if min/max are changed
12 years ago
Gordon Ball
1cb0cbf4b9
Remove 4-5 tuple forms from interact()
12 years ago
Gordon Ball
c85155b25d
Add some tests for the 4-5 int/float form in interact()
12 years ago
Gordon Ball
59a461f928
Fix format problem when showing an error
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
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