-
Notifications
You must be signed in to change notification settings - Fork 140
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
VBox widget not scrollable #790
Comments
Hi @lopezvoliver! This is a good catch, and seems to directly come from some CSS that we use. I'll look into if this is a version difference, or where we get the CSS from. In the meantime, if you set For reference the relevant CSS is here |
So, there are a couple of possible solutions to this:
{{ pre_rendered_css | safe }}
- {% if vue3 == True %}
- <link href="{{cdn}}/@widgetti/[email protected]/dist/main{{ipywidget_major_version}}.css" rel="stylesheet" class="solara-template-css"></link>
- {% else %}
- <link href="{{cdn}}/@widgetti/[email protected]/dist/main{{ipywidget_major_version}}.css" rel="stylesheet" class="solara-template-css"></link>
- {% endif %}
{% if assets.fontawesome_enabled == True %}
<link rel="stylesheet" href="{{cdn}}{{assets.fontawesome_path}}" type="text/css">
{% endif %}
{{ resources.include_css("/static/highlight.css") }}
{{ resources.include_css("/static/highlight-dark.css") }}
{{ resources.include_css("/static/assets/style.css") }}
+ {% if vue3 == True %}
+ <link href="{{cdn}}/@widgetti/[email protected]/dist/main{{ipywidget_major_version}}.css" rel="stylesheet" class="solara-template-css"></link>
+ {% else %}
+ <link href="{{cdn}}/@widgetti/[email protected]/dist/main{{ipywidget_major_version}}.css" rel="stylesheet" class="solara-template-css"></link>
+ {% endif %} This should then match jupyter lab, notebook, and nbconvert in terms of load order.
+ /* <DEPRECATED> */
+ .widget-box, /* </DEPRECATED> */
+ .jupyter-widget-box {
+ box-sizing: border-box;
+ display: flex;
+ margin: 0;
+ overflow: auto;
+ } to solara/server/assets/style.css. Our concern is that the first solution could be unexpectedly breaking for some edge cases (similar to this issue). On the plus side, it would align us closer to jupyter, which would make future breakage less likely. I think it might also fix some similar (yet undiscovered) issues. However, as it would be potentially breaking for current users we would probably be inclined to only release that fix in Solara 2.0. The second solution would introduce some duplicate CSS, and while it fixes this issue, would be more of a bandaid over the underlying cause. We'll have a more in depth discussion about the potential solutions among the maintainers in the beginning of next week, so we'll provide a more concrete plan then. Hopefully the workaround I mentioned in my previous comment is sufficient until then! |
Setting I don't have a lot of experience with css but I get the feeling that I prepared a pycafe example here where I set the Here is what happens when using Each Here's the result using But using |
You're correct, I made a mistake in my post. On Edit: |
I am trying to build a custom widget class that I want to use for popups in a couple of ipyleaflet Markers. The custom widget consists of a main HBox, which itself contains two VBoxes.. something like this:
So far so good.. the smaller VBox on the left is meant to be scrollable. This screenshot was taken from a Jupyter notebook with the ipyleaflet Map as a solara component (see code below).
However, when I test the same code using solara, the left VBox is not scrollable and its elements are incomplete (e.g., you can't see the "C" item):
Here's the code:
The text was updated successfully, but these errors were encountered: