-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Improve Bokeh Layout #4343
Merged
Merged
Improve Bokeh Layout #4343
Changes from all commits
Commits
Show all changes
280 commits
Select commit
Hold shift + click to select a range
f6fc7e1
Have Box and Widget recompute height on render if mode is responsive
birdsarah 7e33759
Add example with lots of widgets laid out.
birdsarah 818d609
Fix layout tests
birdsarah 504d6dd
Get layout working on page load
birdsarah 83b628a
Add a space to top for aesthetics.
birdsarah b594f5f
Remove coloring from slider, and tweak slider template.
birdsarah 81f98b2
Start tweaking css for widgets
birdsarah f2e0022
Start tweaking styling of widgets to give better consistency
birdsarah 06c608f
Small tweak back for layout box
birdsarah 6f5a12d
Tweak constraints on LayoutDOM & Widget
birdsarah 2589fa4
Fix up tests after changing layout constraints.
birdsarah c540ebd
Tweak button display
birdsarah 1393463
Set the text_input height
birdsarah 526980e
Continue small styling tweaks
birdsarah 8b7ee69
Add grow concept
birdsarah 04c8726
Merge branch 'master' into birdsarah/4164_add_initial_box_layouts_2
birdsarah c96738f
Merge branch 'birdsarah/4164_split_plot_to_plotcanvas' into birdsarah…
birdsarah 204d4d9
Add ToolBar widget to python side
birdsarah 245c115
Add ToolBar object to Plot
birdsarah fc3537f
Merge branch 'master' into birdsarah/4164_add_initial_box_layouts_2
birdsarah 4b4586d
Merge branch 'birdsarah/4164_add_initial_box_layouts_2' into birdsara…
birdsarah 5220a34
tools is also deprecated on Plot.
birdsarah 342c8cc
Move ToolManager to Toolbar model
birdsarah ea85c1e
Be resilient to setting logo via Plot declaration
birdsarah 1e22f0c
Toolbar becomes a Widget
birdsarah ed99ae7
Add a simple example for laying out plots with rows & columns
birdsarah 752775b
Massive simplification of responsive width_height example
birdsarah 651ffe6
Update responsive tests
birdsarah 8b17ae6
Fix-up bokehjs tests and remove resize tests
birdsarah d4b6625
Move location of toolbar definition
birdsarah d5d1d0a
Remove old resize code
birdsarah e20fba0
Also add protection onto plot.tools
birdsarah cc9c285
Remove plot_template (keep it for grid_plot)
birdsarah 2fcfdbd
Trigger a resize event from document not a layout_update event
birdsarah 2246d12
Remove the update_dimensions method
birdsarah d9675eb
Remove the plot template
birdsarah f36ca86
Don't repeate create Variables
birdsarah 871d621
Update responsive box test
birdsarah 055995a
Remove min_size constraint from plot_canvas, and use parent constraints
birdsarah 4d3d7c2
Remove all title related code
birdsarah af270db
Move grow onto LayoutDOM
birdsarah 18c7b78
Make adding toolbar less flaky
birdsarah b77569c
Make all variables identifiable & improve kiwi error
birdsarah ef783b8
Increase information in logger statement
birdsarah f168e77
Comment out WEAK_EQ whitespace constraint.
birdsarah 577a767
Improve error reporting in kiwi further
birdsarah 1a6b1f1
Update document resize values
birdsarah df611b7
Slightly improve resize triggering
birdsarah 7d520a5
Factor out edit_variable in responsive mode onto LayoutDOM
birdsarah 98d8570
Remove whitespace constraints on LayoutDOM
birdsarah b722dbf
Give the layout engine a bit of a workout
birdsarah 24ea02e
Factor out a render_dom method
birdsarah 90f9c30
Move render_dom into LayoutDOM for use by plot
birdsarah 63b595f
Correct layout_canvas test
birdsarah 720575a
Lots of logging when defaults don't match
birdsarah 150a6e2
Toolbar should be in define, not in internal
birdsarah 013992d
Add resize to plot_canvas
birdsarah 6317e80
Need to add back in that extra resize :s
birdsarah 33ae245
Trigger on resize if plot is root
birdsarah 0ce63ee
Toolbar can render itself!
birdsarah a33b346
Update document
birdsarah d6e517c
Add some protection into canvas so it doesn't try and set to zero (wh…
birdsarah 7c3b08e
Update Box render to handle width and fixed mode
birdsarah 393a5b3
Update layout_dom to handle fixed mode properly
birdsarah 9514303
Update box to work with fixed layout
birdsarah 128e729
Update widgets to handle fixed view
birdsarah 3970399
Get Toolbar playing nicely with layout engine
birdsarah 783d650
Make default responsive mode on PlotCanvas box
birdsarah 22fa65b
PlotCanvas handles fixed responsive mode now.
birdsarah c05db1d
Tweak toolbar tooltips
birdsarah a9abab5
Add custom dom layout for toolbar
birdsarah ddf66af
Plot is a subclass of Box and creates a PlotCanvas
birdsarah fb98a10
Make Plot into a Box layout that holds Toolbar and PlotCanvas
birdsarah 5acd86b
Get GMapPlot working again
birdsarah a286404
Clean-up duplicated or no-longer needed css
birdsarah 9a5c629
Remove no-longer needed property from document
birdsarah 7475d21
Improve defaults mismatch reporting
birdsarah 4e0b5aa
Tweak properties to get defaults test passing
birdsarah 12cebf7
Add new base screenshots
birdsarah 44abdd5
Add other failing screenshot test and small tweaks
birdsarah 922a72c
Deprecate old layouts from models interface.
birdsarah 0144048
Fix-up erroring layout tests
birdsarah 14a9f7e
Merge branch 'birdsarah/4164_turn_plot_into_box_2' into birdsarah/416…
birdsarah 56fc649
Remove throttled resize for now
birdsarah 7461177
Try slightly more aggressive handling of minimum sizes on canvas
birdsarah 499421a
Do not render margins on plots
birdsarah eace593
We can't mess with dom_left.
birdsarah e542929
Merge branch 'birdsarah/4164_turn_plot_into_box_2' into birdsarah/416…
birdsarah 60ac11b
Small tweak to set a default location.
birdsarah 2603ec7
Merge branch 'birdsarah/4164_turn_plot_into_box_2' into birdsarah/416…
birdsarah a2d6174
Correct model deprecation
birdsarah f4692ae
Tweak some defaults for a more unified theme.
birdsarah 8684e2b
Merge branch 'birdsarah/4164_turn_plot_into_box_2' into birdsarah/416…
birdsarah 024c939
Continue deprecating old style layouts
birdsarah bd63336
Undo changes that added item to curdoc.
birdsarah 0ab8cc5
Revert "Undo changes that added item to curdoc."
birdsarah d3eaf01
Make Row & Column available via bokeh.plotting
birdsarah a954066
show methods handle adding object to document if necessary
birdsarah 56b9560
Fix up examples that were still not rendering.
birdsarah 3799785
Add an explanatory note to side panel
birdsarah 6cd4b8d
Remove responsive and grow, and give bk-root height
birdsarah 1ba80bd
Reset all new layouts
birdsarah 9ff1068
Take logic out of LayoutDOM, Setup Plot as a container
birdsarah 40e45dd
Remove responsive stuff from document
birdsarah c9a4af3
Have plot pull up constraints
birdsarah c50c925
Have plot initialize its children's views
birdsarah 9ddd80f
Have toolbar render itself
birdsarah 9a340ad
Get PlotCanvas and Toolbar stuck together
birdsarah 5588332
Get toolbar laid out above plot.
birdsarah 543dee4
Make naming on canvas/canvas.coffee clearer
birdsarah 859d1f5
Add dom_left dom_top variables
birdsarah 02a6e74
Delayed trigger
birdsarah 3913c22
Plot correctly renders with no toolbar.
birdsarah 9d12355
Add the orientation variables
birdsarah cd8fa23
Children's order doesn't matter for the way we're constructing constr…
birdsarah 456d723
Get toolbar rendering correctly above and below
birdsarah 523e837
Correct weak constrainer export
birdsarah 6633342
Get toolbar displaying on all four sides in a responsive box
birdsarah af23664
Have resize work against bk-root, not window.
birdsarah 5efda9f
Remove unused responsive mode
birdsarah c1a6dee
Add a note about how to do multiple roots.
birdsarah 9b96c6c
INDIVIDUAL PLOTS WITH TOOLBARS ARE RESPONSIVE AT THIS POINT!
birdsarah cc8a4c3
Add whitespace constrained variables and make dom_left and dom_top ed…
birdsarah 9dccd4b
Boxes inherit from LayoutDOM
birdsarah 27b9de2
We're going to use two new variables
birdsarah 6b067ad
Add hook so boxes can be found in dom
birdsarah cb7efb2
Add some more variables needed for layout
birdsarah d9edb3a
A single column or row will work-ish
birdsarah b59df75
Will layout a grid if every plot is wrapped in a box.
birdsarah a5e7221
Merge branch 'master' into birdsarah/4164_rework_layout
birdsarah 72c8a3b
Tweak box algorithm for readability & testability
birdsarah 3ab9361
Update LayoutDOM and Plot after box tweaking
birdsarah bf33a41
Small layout clean-up
birdsarah 0545429
Small clean-up - still need Box wrapper for plots to line up correctly
birdsarah 73f16db
Plots no longer need to be wrapped
birdsarah 264ce36
Update the test layouts
birdsarah d6eca60
More clean-up
birdsarah c05c52b
Document doesn't have an ide so tweak variable name
birdsarah 1f28680
Get deeply nested layouts working again.
birdsarah 069221c
Get plots axes aligning (works with no toolbars)
birdsarah 91f2a35
Small tweak to variable name for consistency and easy of editing
birdsarah 037c466
Start playing with alignment vars (toolbars have gone missing)
birdsarah f6a4972
Get plots w/ toolbars nested and aligning
birdsarah 313635a
Get toolbars lining up awesomely.
birdsarah 150372d
Add a widget box.
birdsarah 8dbd92d
Add a note to charts, get vplot/hplot/vform working again
birdsarah de983e8
Add a demo layout "mega plot"
birdsarah f12d68d
Add back responsive property, clean-up adding layouts to document
birdsarah bb46dc4
Sort out tests after the epic overhaul
birdsarah b34b87e
XFail VBoxForm & Plot test
birdsarah b9097b7
fix-up xfail test
birdsarah fa86086
color_sliders needs to be executable
birdsarah d9e7dc9
Use Column for VBoxForm not WidgetContainer
birdsarah 7e399de
Clean-up document resize code
birdsarah 9f96b72
Make box_layout more flexible about presence of width & height variab…
birdsarah 2c84a2b
Increase trigger delay
birdsarah cf1094d
Only use the bits of bootstrap we need for bokeh core css.
birdsarah 4bb2959
Clean-up rendering of canvas
birdsarah 86df1ba
Implement fixed responsive mode.
birdsarah 33d18b3
Toolbar inherits from Model not LayoutDOM
birdsarah ce75d3b
WIP Width responsive boxes
birdsarah 5387fac
Tweak deprecation, make plot fixed by default.
birdsarah fc5af25
Merge branch 'master' into birdsarah/4164_rework_layout
birdsarah c3e8ab0
Fix deprecation warning when using charts due to new tools.
birdsarah 68be7fe
Fix hover toolbar
birdsarah c5b7bd9
Tweak tests
birdsarah 8386332
Fix missing crosshair tool.
birdsarah 29ace2d
Plots are back to fixed by default, stop xfailing test
birdsarah 9084773
Move canvas resize wait into utils, and use it on all tests.
birdsarah 0db6314
Add missing asserts to wheel zoom test
birdsarah 12e3588
Update screenhot tests
birdsarah 21be572
Small tweaks to range and responsive tests.
birdsarah 2cb43d7
Remove testing examples cruft
birdsarah e3d428f
Update responsive modes to `fixed`, `box`, `width_ar`, `height_ar`, `…
birdsarah a9ddb66
Add re-run option to integration tests
birdsarah 1d4cd45
Fix-up widget display.
birdsarah d4492a1
Fix-up tests after new resposnive names
birdsarah 0fa2e36
Give widgets a little more room to breathe
birdsarah 64b0a68
Plot test had wrong indentation
birdsarah 4133c11
Get fixed and width_ar layouts playing nicer in mixed-layouts.
birdsarah 66203c6
Fix-up selenium tests
birdsarah a1eebba
Implement height_ar mode
birdsarah 888b016
Small clean-up of layout_dom.coffee
birdsarah bc5fafe
Implement box_ar on plot - must be wrapped in a box.
birdsarah 38a1289
set reponsive defaults, tweak warning message
bryevdv 3be1b4e
Add missing default for toolbar_location (how was this not picked up)
birdsarah 02c69f4
Add a toolbar box that can layout a toolbar anywhere.
birdsarah 4b933b2
Merge branch 'master' into birdsarah/4164_rework_layout
birdsarah c09ca05
Update GridPlot responsive default
birdsarah 295cb4a
Try and fix wierd rendering issue after merge
birdsarah 1026fea
Revert "Revert "Make hidpi work for webgl""
birdsarah 7422b20
Merge branch 'master' into birdsarah/4164_rework_layout
birdsarah cf77571
Give ToolbarBox merge tools capability
birdsarah 1ba26b3
Massively simplified gridplot.
birdsarah 542c778
Add initial python implementation of GridPlot
birdsarah 88487c9
update custom model JS for random_tiles example
bryevdv 8353577
Restore to height_width responsive functionality
birdsarah 1532ade
Merge branch 'birdsarah/4164_rework_layout' of github.com:bokeh/bokeh…
birdsarah 4399b88
Merge remote-tracking branch 'origin/revert-4358-revert-4348-almarkle…
almarklein e1073d2
GridPlot is a function, clean-up to ToolbarBox
birdsarah c146bf6
ToolbarBase needs to be a LayoutDOM
birdsarah e507f2e
Give clear to all row objects
birdsarah 47081ce
Add get_width function to box.coffee
birdsarah 47cd784
Have layout dom try harder to get a size in fixed mode
birdsarah dc4c28d
Deprecate io.gridplot
birdsarah dec7ac2
Add a spacer class and use it so gridplot can support None
birdsarah 738de9c
Remove BokehJS GridPlot
birdsarah a95a7e2
Ensure rendering order and remove work-around for mixed layouts.
birdsarah 200db92
Only render positions when not in fixed mode
birdsarah 4ceafa7
Return null from get_width
birdsarah 72557e5
Tweak styling so fixed grid right toolbar is correct
birdsarah 0cd5cd3
Remove gridplot tests now its deprecated
birdsarah d231b83
Add tests for toolbar tweaks, clean-up constraints tests
birdsarah 38f0102
Make gridplot fixed by default
birdsarah 2f532a6
Merge pull request #4360 from bokeh/try_merging_hdpi
birdsarah d06952b
Merge branch 'master' into birdsarah/4164_rework_layout
birdsarah 06b6014
Remove console.log statement from canvas
birdsarah ce1fb39
Fix-up nasty merge conflict on plot tests
birdsarah 007f8e1
vform and VBoxForm deprecate as WidgetBox
birdsarah 944efd2
Improve toolbar and widgets in layouts
birdsarah 0b87c3d
Merge branch 'master' into birdsarah/4164_rework_layout
birdsarah b25fc1b
Fix-up annotations tests after merge
birdsarah 7e030a7
All default to fixed, auto-wrap widgets into widget boxes
birdsarah 085fb2e
Update geojson points after API change
birdsarah f14e328
Correct bad defaults - LayoutDOM is null, others are fixed
birdsarah dc1d82b
Make sure widgets have enough room
birdsarah ba9c232
Small improvements to widgets css
birdsarah f941942
Turn None's into spacer, make spacers responsive
birdsarah 3a17d0d
CSS to get tabs rendering properly
birdsarah 7f8a050
Reset should trigger a document resize.
birdsarah 18186a4
Fix gmap plot
birdsarah fbdf785
Add title back to Plot
birdsarah 3f3ce59
Fix responsive box_ar test
birdsarah fa5151c
Remove title prop from chart now we've changed up title
birdsarah 182759c
use synthetic renderers for crosshair spans
bryevdv b9dde92
Clean-up Plot title properties
birdsarah 2b93daa
Finish plot title deprecations, clean-up tests.
birdsarah b71c6b1
Merge branch 'birdsarah/4164_rework_layout' of github.com:bokeh/bokeh…
birdsarah 5e6e56d
Fix crosshair tool test after change to synthetic renderers
birdsarah 7f64b49
Initial implementation of a smarter deprecation for VBoxForm.
birdsarah fdf908f
Add deprecated properties to deprecated attributes list
birdsarah 26b8cfd
Initial fix for tabs
birdsarah 34f198c
Correct title position (shouldn't have changed it)
birdsarah 5f1b68f
Change "" to None title property
birdsarah a2a0cb4
Correct title property deprecation and add better warnings
birdsarah 973ad61
Add tests for tabs fix
birdsarah 1786b2f
Update screenshot test to check outside all axes.
birdsarah 1c3dcab
Try and improve clarity of Responsive property transform
birdsarah f9364b2
Add layout convenience function and two examples
birdsarah ea89c11
Restore chart test for defaults
birdsarah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "ar" stand for or signify?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It signifies that aspect_ratio is preserved during responsiveness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw below, maybe just
width_aspect
is more self-evident in isolation, thoughThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me
width_aspect
sounds like width-aspect. Something likewidth_fixed_aspect_ratio
would be clear but way too long.width_far
orwidth_ar
is a bit cryptic imo.What about just 'width', 'height', 'both' for the fixed ar ones? Then 'fixed' can stay, and for what is now 'box' we can use 'free' or 'full', or keep it 'box'.