Skip to content

Setting loading to True causes widgets to overwrite notifications #3677

@davep

Description

@davep

Given this code:

from textual.app import App, ComposeResult
from textual.widgets import Label

class LoadingOverlayApp(App[None]):

    CSS = """
    Label {
        width: 90%;
        height: 1fr;
        text-align: center;
        border: solid red;
    }
    """

    def compose(self) -> ComposeResult:
        yield Label("This is a really big label")

    def on_mount(self) -> None:
        self.notify(
            "This is a really big notification. Loading should not overwrite it.",
            timeout=9_999_999
        )
        self.query_one(Label).loading = True

if __name__ == "__main__":
    LoadingOverlayApp().run()

you get this result:

Screenshot 2023-11-14 at 15 32 15

a widget in loading=True state shouldn't appear to overwrite notifications.

Metadata

Metadata

Labels

TaskbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions