Skip to content
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

ipywidgets do not work inside templates #5485

Closed
peterlee18 opened this issue Sep 7, 2023 · 3 comments · Fixed by #6100
Closed

ipywidgets do not work inside templates #5485

peterlee18 opened this issue Sep 7, 2023 · 3 comments · Fixed by #6100
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@peterlee18
Copy link

Windows 11
panel 1.2.2
ipywidgets 8.1.0
ipywidgets_bokeh 1.5.0
Microsoft Edge - Version 116.0.1938.62 (Official build) (64-bit)

ipywidgets work fine in basic components (simple_app) but not inside a template (app_screen). Also tried putting inside the main area and that doesn't work either.

import panel as pn
import ipywidgets as ipw

pn.extension("ipywidgets")

date = ipw.DatePicker(description="Date")
slider = ipw.FloatSlider(description="Float")

simple_app = pn.Column(
    pn.pane.Markdown("### Enter Date"),
    date,
    pn.pane.Markdown("### Enter Number"),
    slider,
)
simple_app.show()

app_screen = pn.template.BootstrapTemplate(
    title="Test Template",
    sidebar_width=350,
    sidebar=[
        pn.pane.Markdown("### Enter Date"),
        date,
        pn.pane.Markdown("### Enter Number"),
        slider,
    ],
)

app_screen.main.append(pn.Column("## TBA"))
app_screen.show()

The simple app gives:
image

app_screen gives:

image

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Sep 7, 2023

Can you share a screenshot of the browser console? It probably contains some logs with errors.

@peterlee18
Copy link
Author

image
image

@peterlee18
Copy link
Author

I actually discovered that the Vanilla template works fine so its seems that only certain templates are affected. I haven't done a systematic check of all the templates.

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Sep 11, 2023
@philippjfr philippjfr added this to the v1.2.3 milestone Sep 11, 2023
@philippjfr philippjfr modified the milestones: v1.2.3, v1.2.4 Sep 18, 2023
@philippjfr philippjfr modified the milestones: v1.2.4, v1.3.0 Oct 9, 2023
@philippjfr philippjfr modified the milestones: v1.3.0, v1.3.1 Oct 23, 2023
@philippjfr philippjfr modified the milestones: v1.3.1, v1.3.2 Oct 31, 2023
@philippjfr philippjfr modified the milestones: v1.3.2, v1.4.0 Nov 22, 2023
@philippjfr philippjfr modified the milestones: v1.4.0, v1.3.6 Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants