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

Notification toaster does not handle throttled triggers #7688

Open
paoloalba opened this issue Feb 6, 2025 · 0 comments
Open

Notification toaster does not handle throttled triggers #7688

paoloalba opened this issue Feb 6, 2025 · 0 comments

Comments

@paoloalba
Copy link

Software Version Info
python 3.12
bokeh 3.6.3
panel 1.6.0

Description of expected behavior and the observed behavior

toaster notification should work, but if a notification is triggered while another one is still showing, then they pile up, and are shown all at once after a new notification-trigger. After this, no notification is shown anymore.

Complete, minimal, self-contained example code that reproduces the issue

import panel as pn

print(pn.__version__)

pn.extension(notifications=True)

tmpl = pn.template.BootstrapTemplate(title="Test App")

def create_button(notificator):
    button = pn.widgets.Button(
        button_type="primary",
        icon="plus",
        name=f"{notificator}"
    )
    def create_notification(_):
        notificator("this is a notification!", duration=3*1000)
    button.on_click(create_notification)
    return button

tmpl.sidebar.append(create_button(pn.state.notifications.info))
tmpl.sidebar.append(create_button(pn.state.notifications.error))

tmpl.main.append(pn.pane.Markdown("# Test Text"))

tmpl.servable()

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

Registrazione.schermo.2025-02-06.alle.17.51.20.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant