Commit Graph

370 Commits

Author SHA1 Message Date
Jonathan Frederic
79fa062310 Make selection widget respect order. 2014-11-24 15:40:18 -08:00
Jonathan Frederic
52a0314719 Something 2014-11-24 15:40:18 -08:00
Jonathan Frederic
2ef509e505 Add doc string to Output widget 2014-11-18 11:31:33 -08:00
Jonathan Frederic
a5779bcd0e Output Widget 2014-11-18 11:29:35 -08:00
Sylvain Corlay
7ac82931ca Tooltip on toggle button 2014-11-13 19:04:06 +00:00
Min RK
b5e7ce30ca handle setting Widget.comm = None
which is done in `Widget.close`

fixes loads of warnings in widget test output, caused every time a widget is closed.
2014-11-12 11:29:10 -08:00
Sylvain Corlay
ed5e602950 jupyter -> IPython 2014-10-29 21:52:03 -04:00
Sylvain Corlay
374459e5e7 Adding custom keys for core jptr notebook 2014-10-29 21:52:03 -04:00
Sylvain Corlay
18e77a090a registering core widgets 2014-10-29 21:52:03 -04:00
Sylvain Corlay
e5b347804a widget registry 2014-10-29 21:52:03 -04:00
Jonathan Frederic
ba77877c18 Rebase fixes 2014-10-28 17:55:36 -07:00
Jonathan Frederic
db10ae8f2d s/target_name/widget_class 2014-10-28 16:49:46 -07:00
Jonathan Frederic
cb2c76999c Address some more review comments... 2014-10-28 16:49:46 -07:00
Jonathan Frederic
a68df8a8b1 Address @minrk 's review comments. 2014-10-28 16:49:46 -07:00
Jonathan Frederic
fbca0bfa3f Rebase fixes. 2014-10-28 16:49:45 -07:00
Jonathan Frederic
2b5ebb9e8f Make Python push initial state.
Also added initial state push callback.
2014-10-28 16:49:45 -07:00
Jonathan Frederic
e7ee9c12b3 Enable widget instanciation from front-end. 2014-10-28 16:44:02 -07:00
Thomas Kluyver
031530da42 Support specifying requirejs modules for widget models 2014-10-24 12:14:43 -07:00
Jonathan Frederic
79670e8afb Merge pull request #6494 from takluyver/widget-comm-require
Allow widget views to be loaded from require modules
2014-10-21 10:11:41 -07:00
Jonathan Frederic
1172876191 Add version trait to Widget base,
From widget Trello: version numbers for widget models;
when reloaded, will give the widget a chance to do
something intelligent or fail (by default) if the
version number doesn't match.
2014-10-13 11:52:19 -07:00
Jonathan Frederic
6a304fc63c Merge pull request #6540 from takluyver/comms-mgr-needs-no-shell
Make comm manager (mostly) independent of InteractiveShell
2014-10-12 16:11:36 -07:00
Min RK
60bfcf8c74 Merge pull request #6665 from jdfreder/travis_please_run_on_this
Separate widget model name from com target name.
2014-10-09 11:45:41 -07:00
Jonathan Frederic
4b968ece0b s/target_name/model_name 2014-10-09 10:55:46 -07:00
Jonathan Frederic
24096b0f45 Separate widget model name from com target name. 2014-10-08 21:31:00 -07:00
Jonathan Frederic
60531c917f Merge pull request #6481 from jdfreder/intvalidatefix
Fix bug in bounded int/float logic.
2014-10-07 10:50:02 -07:00
Thomas Kluyver
09b10dcb86 Make changes suggested by @jdfreder 2014-10-05 09:35:54 -07:00
Thomas Kluyver
5953a3f874 Allow widget views to be loaded from require modules
This required refactoring things that create widget views to use
callbacks instead of return values.
2014-10-05 09:35:53 -07:00
Sylvain Corlay
54a36e7369 forcing value to be in values 2014-10-03 23:47:48 +00:00
Sylvain Corlay
8a384cd489 adding a tooltip in IPython buttons 2014-10-03 16:41:34 +00:00
Jonathan Frederic
f83140dae8 s/long thing/set_state 2014-09-30 15:55:31 -04:00
Sylvain Corlay
859de50a68 Adding directional link widget 2014-09-26 18:33:47 +00:00
Jason Grout
34939886a3 Adding Link widget 2014-09-26 18:32:59 +00:00
Jonathan Frederic
341527779b Fix notify_trait getting called too early. 2014-09-25 14:51:38 -07:00
Thomas Kluyver
3cb8c5a0a1 Merge pull request #6532 from SylvainCorlay/barewidgetmodels
Fix Issue #6530
2014-09-25 12:10:00 -07:00
Sylvain Corlay
a9fca81e95 Set default view to None and never display widget with no view 2014-09-24 23:10:41 -04:00
Thomas Kluyver
f420cdf3e7 Make comm_manager a property of kernel, not shell 2014-09-24 17:38:04 -07:00
Jonathan Frederic
aec576a5f2 Fix infinite loop typo 2014-09-24 15:48:19 -07:00
Matthias Bussonnier
684d739d92 Merge pull request #6520 from minrk/comm-default
avoid copious warnings in interact tests
2014-09-24 13:44:58 +02:00
Brian E. Granger
4ec1a3b41e Merge pull request #6235 from jdfreder/addclass
Remove add/remove_class and set/get_css.
2014-09-23 16:28:50 -07:00
Jonathan Frederic
d4d554052e Address problems found in in-person review 2014-09-23 15:18:00 -07:00
Brian E. Granger
1e8b4ee586 Merge pull request #6051 from chronitis/interact-widget-on-demand
Interact on_demand option
2014-09-23 14:02:12 -07:00
MinRK
ec4d3597c7 avoid copious warnings in interact tests
comm was mocked out, but in a way that makes traitlets complain
2014-09-22 13:21:19 -07:00
Gordon Ball
48e1a0b2bc s/choose/manual/g 2014-09-22 21:23:51 +02:00
Jonathan Frederic
02e3a58030 s/fore_color/color
s/back_color/background_color
2014-09-16 10:17:59 -07:00
Jonathan Frederic
9c1c4f9f0a Fix bug in bounded int/float logic. 2014-09-15 22:24:49 -07:00
Jonathan Frederic
78db5dc24e Merge pull request #6377 from jasongrout/fix-widget-prefix
Strip the IPY_MODEL_ prefix from widget IDs before referencing them.
2014-09-15 13:40:09 -07:00
Jason Grout
2acee4a269 Strip the IPY_MODEL_ prefix from widget IDs before referencing them. 2014-08-28 19:52:20 +00:00
Jonathan Frederic
cb9014e42c Fixed rebase bugs and other bugs. 2014-08-28 11:15:35 -07:00
Jonathan Frederic
fa1c6f93f1 Added bootstrap3 progress bar classes 2014-08-28 11:15:35 -07:00
Jonathan Frederic
9b4d19bad7 Added Bootstrap specific classes,
and fixed a few bugs here and there...
2014-08-28 11:15:35 -07:00
Jonathan Frederic
a0e70e350f Fix some bugs found by the widget examples,
add margin and padding base traits,
add overflow traits to box base.
2014-08-28 11:15:24 -07:00
Jonathan Frederic
fdcf263965 Partial implementation of styles 2014-08-28 11:09:55 -07:00
Jonathan Frederic
9af77a6374 Initial crack at using specific traits for styling. 2014-08-28 11:09:55 -07:00
Jonathan Frederic
f85a01041c Remove add/remove class methods,
Remove helper set/get css methods
2014-08-28 11:09:55 -07:00
Gordon Ball
859e9f5261 Change from on_demand kwarg to interact_choose function 2014-08-26 10:37:32 +02:00
Gordon Ball
8296f24904 Merge master 2014-08-26 10:25:38 +02:00
Jonathan Frederic
cf0ca9d4a5 Merge pull request #6050 from chronitis/interact-range-widgets
Range widgets
2014-08-25 21:40:21 -07:00
Jonathan Frederic
1b29be13c6 Merge pull request #6332 from jasongrout/widget-property-lock
Widget property lock should compare json states, not python states
2014-08-25 10:12:04 -07:00
Gordon Ball
9383822d7a Clean up validation in __init__ 2014-08-24 12:26:56 +02:00
Gordon Ball
a096d01310 Test case for setting only lower or upper, no sensible default so should be an error 2014-08-24 12:26:02 +02:00
Gordon Ball
a12b1a50a9 Change range trait to _range 2014-08-24 11:48:19 +02:00
Gordon Ball
b8c0afbb55 Merge master 2014-08-22 10:19:03 +02:00
Brian E. Granger
94f717781d Merge pull request #6125 from jdfreder/flex
Embrace the flexible box model in the widgets
2014-08-20 14:15:22 -04:00
Jonathan Frederic
be3ba35736 Fix typo in deprecated class name. 2014-08-20 09:34:05 -07:00
Gordon Ball
8838762b30 Remove a rogue print statement 2014-08-20 16:49:52 +02:00
Gordon Ball
08895738f2 Merge master 2014-08-20 16:44:58 +02:00
Gordon Ball
05f07f1f71 Add a number of extra tests for the range widgets 2014-08-20 16:25:53 +02:00
Gordon Ball
2be045fe25 Support both value tuple and upper, lower traits for both int and float widgets 2014-08-20 16:25:33 +02:00
Jonathan Frederic
8877d32c4e Merge pull request #6194 from SylvainCorlay/immediate-widget-comm
Allow model id to be set externally on creation of the widget.
2014-08-19 14:33:03 -07:00
Jason Grout
0e5ceca059 Make the widget property_lock store the JSON state, not the original object
Comparison between arbitrary python objects can get crazy, whereas we really
only care about if the JSON state we are syncing is different.  So with this change,
we store and check against the JSON state.
2014-08-18 17:28:07 +00:00
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
2014-08-14 12:45:19 -07:00
Jonathan Frederic
2db702fa57 Filenames s/container/box 2014-08-13 13:29:30 -07:00
Jonathan Frederic
d985ee86c6 s/Container/Box 2014-08-13 13:19:27 -07:00
Jason Grout
5cd46788f9 Before syncing a widget's state, check first for the property lock, then for the widget state lock 2014-08-12 18:23:57 +00:00
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.
2014-08-12 17:29:41 +00:00
Sylvain Corlay
f9fa4ada06 allowing widet id to be set externally 2014-08-11 18:36:59 +00:00
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.
2014-08-11 18:36:59 +00:00
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.
2014-08-11 18:30:26 +00:00
Jonathan Frederic
36721c73c6 Added some doc strings on the widgets.
Also address the comments Matthias left me.
2014-08-08 14:57:51 -07:00
Jonathan Frederic
dbb88f95cd Make HBox and VBox helper functions 2014-08-08 14:57:51 -07:00
Sylvain Corlay
c9ed512d54 adding hbox and vbox
Conflicts:
	IPython/html/static/widgets/js/widget_container.js
	IPython/html/widgets/widget_container.py
2014-08-08 14:57:51 -07:00
Jonathan Frederic
170b13102e Fix interact tests for rename 2014-08-08 14:56:11 -07:00
Jonathan Frederic
ba3033971e Renamed *Widget to *,
depracted old names.
2014-08-08 14:56:11 -07:00
Jonathan Frederic
37f00f73d7 Added baseline and stretch 2014-08-08 14:56:10 -07:00
Jonathan Frederic
6faf86ee77 Embrace flexible box model 2014-08-08 14:56:10 -07:00
Gordon Ball
8c5218b581 Default to 25-75% of min-max if no value is set instead of 0-1 2014-08-07 21:32:25 +02:00
Jason Grout
d64627380b Default view should be the base widget view class 2014-08-07 13:12:15 -04:00
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
2014-08-07 17:11:06 +02:00
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
2014-08-04 13:46:01 -07:00
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.
2014-07-31 12:23:03 -07:00
Sylvain Corlay
1bbc915ac0 setting _comm to None 2014-07-30 23:16:24 -04:00
Sylvain Corlay
ea52ef8704 del Widget.widgets[seld.model_id] in close rather than in __del__ 2014-07-30 00:28:30 +00:00
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.
2014-07-28 19:11:20 +00:00
sylvain.corlay
a9c34b679b decoupling the comm lifetime from the widget lifetime 2014-07-26 12:36:21 -04:00
Brian E. Granger
372507e3f1 Merge pull request #6128 from jasongrout/widget-trait-serialization
Widget trait serialization
2014-07-23 14:13:24 -07:00
Jason Grout
8fb0ae4d36 Change serialize/deserialize to to_json/from_json 2014-07-23 20:22:50 +00:00
Jason Grout
97141c6bca Simplify the code for picking json serialization functions to expose the logic better 2014-07-22 15:21:28 +00:00
Jason Grout
3235f42d12 Container assumes the children attribute is not None
Thanks to @SylvainCorlay for pointing this out.
2014-07-18 16:59:41 +00:00
Jason Grout
06084e996c Change serialization terminology to serialize/deserialize 2014-07-17 20:57:10 +00:00
Jason Grout
eed0715a09 Prepend a sentinel value to model ids to distinguish them from normal UUIDs (from Sylvain Corlay). 2014-07-17 20:55:27 +00:00