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

Some Panel widgets are blocked from updating #410

Open
kcpevey opened this issue Jul 24, 2024 · 1 comment
Open

Some Panel widgets are blocked from updating #410

kcpevey opened this issue Jul 24, 2024 · 1 comment
Labels
area: user experience 👩🏻‍💻 needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug type: bug 🐛 Something isn't working

Comments

@kcpevey
Copy link
Contributor

kcpevey commented Jul 24, 2024

Context

I have a text status bar that I’d like to update during a long compute. If I view the app in JupyterLab, the updates to the status bar happen as python progresses through the code. If I deploy that app, the updates are blocked and are not visible until the python process is complete.

I originally thought this was a bug in Panel so opened it up for discussion here. After discussion, it looks like this has something to do with the way that jhub-apps is deploying the app.

Value and/or benefit

Being able to have a dynamically updated status bar is very useful for long running processes on apps.

Additionally, this may be only one side effect of the root cause and there may be other Panel limitations that we are not yet aware of.

Anything else?

Reproducer:

import panel as pn
import param
import time

pn.extension()

class TestPanel(param.Parameterized):

    def __init__(self, **params):
        self.status_text = pn.widgets.StaticText(name='Status', value='Click "Evaluate"')
        self.evaluate_button = pn.widgets.Button(name='Evaluate', button_type='warning')
        self.evaluate_button.on_click(self.run_evaluate)
        super().__init__(**params)

    def run_evaluate(self, event=None):
        self.status_text.value = 'start'
        time.sleep(3)
        self.status_text.value = 'continuing'
        time.sleep(3)
        self.status_text.value = 'end'

    def panel(self):
        return pn.Column(self.status_text, self.evaluate_button)

app = TestPanel()
app.panel().servable()
@kcpevey kcpevey added area: user experience 👩🏻‍💻 needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug type: bug 🐛 Something isn't working labels Jul 24, 2024
@kcpevey
Copy link
Contributor Author

kcpevey commented Sep 9, 2024

The same blocking behavior was also seen in Panel Preview. @krassowski pushed updates to bokeh and pyviz_comms to resolve this. We should recheck this once those are released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: user experience 👩🏻‍💻 needs: investigation 🔍 Someone in the team needs to find the root cause and replicate this bug type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant