Skip to content

[BUG] Toasts are broken #776

@comhar

Description

@comhar

Describe the bug
Toasts are not displaying. The bug appears to have been introduced in this commit.

Minimal Reproducible Example
The app below should display a toast on load but it doesn't. If the inline dep is downgraded to the previous version python-fasthtml==0.12.24 then the toast displays as expected.

# /// script
# dependencies = ["python-fasthtml==0.12.25"]
# ///
from fasthtml.common import *

app, rt = fast_app()
setup_toasts(app)

@rt
def index(session):
    add_toast(session, "Successful Page Load!", "success")
    return P("I love toast!")

serve(port=5111)

Expected behavior
Toast should display.

Environment Information
Please provide the following version information:

  • fastlite version: 0.2.1
  • fastcore version: 1.8.8
  • fasthtml version: 0.12.25

Confirmation
Please confirm the following:

  • I have read the FAQ (https://docs.fastht.ml/explains/faq.html)
  • I have provided a minimal reproducible example
  • I have included the versions of fastlite, fastcore, and fasthtml
  • I understand that this is a volunteer open source project with no commercial support.

Additional context
N/A

Screenshots
N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions