Preview with Panel broken with notifications turned on: Notyf is not defined #7518
Open
Description
ALL software version info
Software Version Info
Python 3.12.7
Panel 1.5.4
Bokeh 3.6.1
Description of expected behavior and the observed behavior
Using the "Preview Notebook with Panel"/"Open with Panel in New Browser Tab" feature in combination with pn.extension(notifications=True)
does not work in 1.5.4. Any sidebar or main content is not rendered and an error is printed in the console.
In the 1.5.4 release, a kernel crash was fixed related to the preview feature (#7380) and now the template partially renders (header etc.) instead getting a full-on stack trace.
Complete, minimal, self-contained example code that reproduces the issue
import panel as pn
pn.extension(notifications=True)
template = pn.template.BootstrapTemplate()
template.main.append("Hello main")
template.sidebar.append("Hello sidebar")
template.servable();
Browser JavaScript console output
Error rendering Bokeh items: ReferenceError: Notyf is not defined
anonymous my.website.com/analytics/user/USER/panel-preview/static/extensions/panel/panel.min.js?v=e82745514f06d82c0e99c4d5181ad144322843e663b64143a07c448499354dc9 line 228 > Function:10
run_script my.website.com/analytics/user/USER/panel-preview/static/extensions/panel/panel.min.js?v=e82745514f06d82c0e99c4d5181ad144322843e663b64143a07c448499354dc9:228
render my.website.com/analytics/user/USER/panel-preview/static/extensions/panel/panel.min.js?v=e82745514f06d82c0e99c4d5181ad144322843e663b64143a07c448499354dc9:228
render_to my.website.com/analytics/user/USER/panel-preview/static/js/bokeh.min.js?v=ab343bc1ea96aa3f04b4b7cc078b778826644f535553eabf00ca2afa504963f0a3b97f72c264d666877921765e160c8a5e75723c10651502c44946ae398026aa:223
build my.website.com/analytics/user/USER/panel-preview/static/js/bokeh.min.js?v=ab343bc1ea96aa3f04b4b7cc078b778826644f535553eabf00ca2afa504963f0a3b97f72c264d666877921765e160c8a5e75723c10651502c44946ae398026aa:223
l my.website.com/analytics/user/USER/panel-preview/static/js/bokeh.min.js?v=ab343bc1ea96aa3f04b4b7cc078b778826644f535553eabf00ca2afa504963f0a3b97f72c264d666877921765e160c8a5e75723c10651502c44946ae398026aa:220
[bokeh.min.js:164:1264](my.website.com/analytics/user/USER/panel-preview/static/js/bokeh.min.js?v=ab343bc1ea96aa3f04b4b7cc078b778826644f535553eabf00ca2afa504963f0a3b97f72c264d666877921765e160c8a5e75723c10651502c44946ae398026aa)
- I may be interested in making a pull request to address this
Activity