Skip to content
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

Widgets #550

Merged
merged 129 commits into from
May 28, 2014
Merged

Widgets #550

merged 129 commits into from
May 28, 2014

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Apr 21, 2014

This adds HandsonTable, PivotTable and DatePicker (also Tabs, but that's just a stub right now) widgets, Date property, app/downloads, glyphs/widget_server.py and glyphs/data_tables_server.py examples. There are improvements to ObjectExplorer. This PR merges in sbt branch (just for my convenience). This PR is very, very, very (or even more) WIP. No point in reviewing right now, but you try running the examples (app/downloads requires data; I will send an E-mail tomorrow how to obtain it).

There are lots of issues with this PR. HandsonTable has known issues with rendering, so you may need to resize the window to make it render better, but at least it shows up, which wasn't the case at the beggining. I had to from .widgetobjects import * in bokeh.objects to help Viewable discover classes (first import counts and without this hack you will get missing models errors). I had to include, hopefully temporarily, bootstrap.css to make PivotTable render (almost) properly. I tried to use reference-less imports, but without success. glyphs/widget_server.py allows data editing through HandsonTable and line glyph is nicely updated, but not DataRange1d, which doesn't follow data modifications.

@hhuuggoo
Copy link
Contributor

@mattpap what is the issue with the reference import of bootstrap?

@mattpap
Copy link
Contributor Author

mattpap commented Apr 23, 2014

Added Tabs widget and a new example (based on plotting/file/glyphs.py).

@mattpap
Copy link
Contributor Author

mattpap commented May 28, 2014

Now all Bootstrap's CSS classes are prefixed with bk-bs-, so if you want to use .btn-primary then you will have to use .bk-bs-btn-primary. This applies as well to data- attributes, events, etc. Bokeh's CSS classes should be prefixed with bk- alone, but that's currently not true almost everywhere (besides widgets). Bootstrap is included via bokehjs/src/less/bootstrap.less. If you need more imports, uncomment appropriate lines in that file.

Currently bokeh-server's user interface is broken, because it still uses Bootstrap 2 almost everywhere. This will be fixed in another PR.

We have to deal with inclusion of images, fonts, etc. In a few cases I used base64 encoded images, to allow using them in HTML file plots. Tests pass even if images are missing because now examples/test treat 404 errors related to images as non-critical (will issue only a warning).

There is a very strange issue with glyphs/taylor_server example. Run server and then this example. Open the link (preferably first open JS console). Reload the page. There should be one log item from slider in both cases. That's fine. Now change slider's value. Reload the page. Loading of the page should hang for a moment and you should see a lot of slider's logs. It looks like slider's value is being set very many times initially. This might be related to session-refactor or to me adding .save() in one too many places.

@bryevdv
Copy link
Member

bryevdv commented May 28, 2014

I plan on merging this in the next hours, if no objections.

bryevdv added a commit that referenced this pull request May 28, 2014
@bryevdv bryevdv merged commit fa7bd25 into bokeh:master May 28, 2014
@hhuuggoo
Copy link
Contributor

if the performance gets worse over time my guess is that we are binding events multiple times @mattpap are you using the modelform for this example? I wrote it, and I think the modelform interactions with widgets is poor. It complicates things with respect to who (whether the widget or the modelform) should send the data to the server

@mattpap
Copy link
Contributor Author

mattpap commented Jun 11, 2014

No, this example uses session/document directly and while True: session.pull() (more or less).

damianavila added a commit that referenced this pull request Jun 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants