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

Panel Notifications now show the last notification multiple times for each displayed notification, instead of provided notifications #7504

Open
1 task done
jnareb opened this issue Nov 19, 2024 · 1 comment
Labels
type: bug Something isn't correct or isn't working

Comments

@jnareb
Copy link

jnareb commented Nov 19, 2024

ALL software version info

Software Version Info
panel==1.5.4
Python 3.10.4
Windows 10 Home 22H2 (64-bit)

bokeh==3.6.0
Chrome 130.0.6723.117 (64-bit)

Description of expected behavior and the observed behavior

When sending multiple notifications within the duration time of previous notification, I expect to see all notifications, one below another, vanishing one after the other.

What I get with Panel 1.5.4 is seeing multiple copies of the last notification (type and the message).

This is a regression, because I remember not having this problem before updating Panel. I thing that Panel 1.5.3 did not have this issue.

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

import panel as pn

pn.extension(
    notifications=True,
)
pn.state.notifications.position = 'top-center'


def onload_callback() -> None:
    pn.state.notifications.warning("Warning", duration=0)
    pn.state.notifications.info("Info", duration=0)


pn.state.onload(onload_callback)
pn.pane.Markdown("# Hello world").servable()

Screenshots or screencasts of the bug in action

Screenshot of Panel app, with two notifications reading "Info"

I would expect to see warning notification with the "Warning" message above info notification with "Info" message, instead of seeing info notification with "Info" message twice.

  • I may be interested in making a pull request to address this
@hoxbro
Copy link
Member

hoxbro commented Nov 19, 2024

It happens somewhere between 1.3.8 and 1.4.0.

Running git diff v1.3.8 v1.4.0 panel/io/notifications.py panel/io/state.py panel/config.py and checking the difference, it looks like it is caused by #6533.

@hoxbro hoxbro added the type: bug Something isn't correct or isn't working label Nov 19, 2024
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

No branches or pull requests

2 participants