-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
Location component #1150
Location component #1150
Conversation
Was hoping to get this into 0.9.0 after all but it touches too many internals for me to safely include it. |
4fd980b
to
98b6fe2
Compare
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.
Looks good to me. I wonder if the panel/viewable.py changes ought to be in a separate PR that explains the class hierarchy changes on their own, to be merged before this one.
a57e11b
to
d3833cc
Compare
ff8f4b2
to
87f4f96
Compare
Codecov Report
@@ Coverage Diff @@
## master #1150 +/- ##
==========================================
+ Coverage 87.53% 87.59% +0.06%
==========================================
Files 117 124 +7
Lines 12952 13192 +240
==========================================
+ Hits 11337 11555 +218
- Misses 1615 1637 +22
Continue to review full report at Codecov.
|
Massive redesign of the original Location component written by @MarcSkovMadsen. The problem is that it's not really a Viewable component and therefore should not be a widget. It's also weird adding it to a layout if it doesn't actually display anything. Therefore I introduced non-viewable baseclasses for Panel components and the location is automatically added as a Document root and then made accessible via
pn.state.location
.In order to make the Location component work without also being a Viewable objects the baseclasses are now organized as such:
Layoutable(Parameterized)
: Defines parameters concerned with layout and styleServableMixin()
: Mixin class that defines methods to serve object on a serverRenderable(Parameterized)
: Defines methods that allow the object to rendered to a bokeh modelViewable(Renderable, Layoutable, ServableMixin)
: Defines methods that make the object viewable in a notebook, save it and serve itSyncable(Renderable)
: Defines methods that allow parameters to be synced with bokeh model propertiesReactive(Viewable, Syncable)
: A syncable viewable that defines various methods to link it to other objects.Supersedes #1101