-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
Add fancy_layout option to HoloViews pane #543
Conversation
85ac815
to
31a3678
Compare
acff765
to
a58efd6
Compare
I se this is merged already, but I'm wondering whether |
Happy to change it, about to open another PR to improve the scrubber layout anyway, but -1 on shaded. Open to other suggestions. |
The differences are:
|
Also for context, the "fancy" bit is borrowed from matplotlib's |
I don't think it shares much in common with the mpl fancybox option, which isn't grey or offset like that. Maybe |
Cc: @jsignell @jlstevens @jonmmease Any opinions or suggestions? |
What about |
I like |
|
We do plan to support it forever, it's the default layout HoloViews will use to render its widgets. Panel users should generally use the default layout so they can compose it themselves more easily. |
I don't have strong feeling on the name itself, but should we consider this to be an enumeration rather than a boolean? Something like |
Not a bad idea either. |
Currently the options would be 'simple' and 'classic' or 'holoviews'. |
As a disclaimer, I haven't looked at it closely enough to have an opinion on whether we would want to have more options like this in the future. I just know I've often come to regret boolean arguments 🙂 |
I would certainly have to refactor the code and come up with some better representation to express custom layouts because the code is already getting unwieldy with two options but I think more flexibility would be a good thing. People certainly have asked for more flexibility in HoloViews and while they can already achieve that if they use Panel directly and lay things out themselves I don't think it would hurt to include a few more canned layouts they can pick from. |
If no one objects I'm going with: layout_style = param.ObjectSelector(default='simple', objects=['simple', 'classic'], doc="""
The default layout of the plot and widgets. The default is a 'simple' layout to make
it easy to compose the plot and the widgets manually.""") |
The last suggestion above looks good to me in terms of a I am not a fan of 'holoviews' as a value and 'adjoint' is probably confusing given holoviews uses that word as well. I'm wouldn't let 'classic' block this PR but I would like to try and think of something else if possible (tricky!). |
Could call it centered I guess but there could be a number of centered arrangements. One problem is that it also interacts with the widget_type parameter. Maybe we could add center_right, center_left, center_bottom, center_top, left, right, bottom and top options instead. HoloViews would use center_right for regular widget and center_bottom for the scrubber. |
Those options make sense to me and generalize panel nicely. Of course it is also more work to do but this would be my preferred approach in terms of offering a general and intuitive API... |
I was reading the recent discussion starting from the top and independently thought of |
The current HoloViews pane generates a simple layout of the plot and the set of widgets generated from that plot. This makes it easy to compose these two components in different ways but it doesn't match the look that the old-style HoloViews widgets use. Since we want to swap out the widgets in HoloViews with as little disruption as possible this PR adds a
fancy_layout
option which tries to match the look and feel of the original widget implementation.As a simple example here is the output of a HoloMap with this option enabled: