-
Notifications
You must be signed in to change notification settings - Fork 942
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
Styling Options for Accordion? #2415
Comments
I think it would be relatively easy to introduce new Accordion We've discussed having a
You can always throw CSS on the page to override existing page CSS (either directly if you have control of the page, or through code using the ipython html display). That would be, as you say, "minimally-horrific" ;). On the other hand, perhaps you can just use an HTML widget with the HTML |
Since you don't really need the interactivity - you're just displaying information to the user, not getting feedback from them - you could also just use an HTML widget with the HTML |
In general, if you don't need interactivity, i.e., data back from a user, I'd suggest exploring using display or update_display to give information to the user, as it is a much simpler push-only model. If you need to fit the information into a widgets-based interface, like a panel showing information, you could use an output widget, or for HTML content you could use an HTML widget. If that isn't flexible enough, or if you need to tie things into the widgets look-and-feel, of course there is the progress bar widget, etc. |
@jasongrout thanks for the detailed reply!
This sounded initially promising to me, but after trying an implementation that just uses |
Assuming there's no way around the above, I think I'm going to stick with |
You can give the |
However, you're right that you wouldn't be able to maintain whatever the user did very easily, because there isn't the feedback of whether the tag is open or not when you refresh. |
I think a minimal Collapse widget in core that just maps to an HTML details tag makes a lot of sense. It can have an |
@jasongrout I thought I had replied to this, but apparently I never hit send. Any pointers on where to start looking around for adding a new |
Perhaps as a container widget, like the box widgets? |
I have this exact issue. Has there been update on this ? It might also be related to : #1926 |
Hi All,
I'm working on a progress display for an API that's part of Quantopian/Zipline (WIP Code: https://github.com/quantopian/zipline/pull/2467/files#diff-b2c6946e6ea0a4a071d04a4d0643c413R125).
My basic layout is that I've got a header, a progress bar with a percent complete indicator, and a collapsable "details" tab that provides extra information about what's currently being computed.
The result currently looks like this:
Overall, I'm pretty happy with how much I've been able to get out of just using built-in widgets with VBox and HBox. The one area I'm struggling with a bit is styling of the
Accordion
widget, which I'm using for the details tab.Accordion
's default styling is pretty heavy relative to the other elements of my progress setup, so I'd like to simplify it by removing some padding, setting the background color back to white, and maybe removing the border. Ideally I'd end up with something like this:Unfortunately, it doesn't look like it's possible to change the styling of the
Accordion
widget from Python (apologies if that's not the case; I've spent a couple hours digging through the source and docs, so at the very least if it's possible it's not particularly obvious how to do it). I can setpadding
in the accordion'slayout
dict, but that only sets the padding of the outermost container; what I want is to set the padding of one of the container's inner elements.Assuming I'm correct in thinking that there's currently no supported way to restyle
Accordion
, a few questions:HTML
that mimics the HTML generated by renderingAccordion
?The text was updated successfully, but these errors were encountered: