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
Jason Grout
d64627380b
Default view should be the base widget view class
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
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
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
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
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
Thomas Kluyver
95dc697e3b
Remove Widget.closed attribute
...
Closes gh-5282
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
Jonathan Frederic
0eebd9e05b
Added msg_throttle sync=True widget traitlet
12 years ago
MinRK
ddc22152ea
show traceback in widget handlers
...
rather than logging
closes #5064
12 years ago
Brian E. Granger
2b7310f794
Merge pull request #4933 from jdfreder/widget-model-name
...
Small Widget inconsistency fixes
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
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
288b8a0ced
s/view_name/_view_name
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
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
bfdebf9632
More PEP8 changes
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
c1c7bb7563
Everyone uses one model
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