Comments (7)
I was calling self.recompose
inside on_resize
inside the Screen I was pushing. This fails if there's a notification on screen as the first resize event arrives too early. I just put a block in to prevent it running on the first resize event and it works as expect.
from textual.
I suspect that is down to the call to self.app._refresh_notifications()
in on_screen_resume
. If that was awaited, it could fix it.
Could you try for an MRE again? I suspect it will be a matter of just repeating things very fast.
from textual.
Press n
and then p
:
from textual.app import App, ComposeResult
from textual.binding import Binding
from textual.screen import ModalScreen
from textual.widgets import Footer, Label
class MyScreen(ModalScreen[None]):
def compose(self) -> ComposeResult:
yield Label("MyScreen")
async def on_resize(self) -> None:
await self.recompose()
class MountCrash(App[None]):
BINDINGS = [
Binding("p", "push", "Push a new screen"),
Binding("n", "notification", "Notification"),
]
def compose(self) -> ComposeResult:
yield Label("App")
yield Footer()
def action_notification(self) -> None:
self.notify("Hello, world!", title="Notification message", timeout=10)
async def action_push(self) -> None:
await self.push_screen(MyScreen(), callback=lambda _: None)
app = MountCrash()
if __name__ == "__main__":
app.run()
from textual.
I think that's related to: #4570 (see the last MRE of my last response - it also happens on screen change, but pop_screen in my case)
from textual.
Don't forget to star the repository!
Follow @textualizeio for Textual updates.
from textual.
Unfortunately, the latest change in locks seems does not fix any of my issues mentioned in the linked (closed) issue #4570.
Could I ask you @darrenburns to take a look at this, please? Maybe you'll notice something right away, and I have some problems shown there (in MREs), like this mounting error and even the application freeze.
from textual.
Please do not comment on closed issues. We need an open issue to track tasks.
There's no need to mention any particular dev.
from textual.
Related Issues (20)
- priority binding order is not respected in the Footer HOT 6
- Method to add content to Content Switcher HOT 5
- Memray's test suite fails due to a deadlock with Textual 0.67.1 HOT 10
- Possible deadlock with the ToastRack and Tooltip that appeared out of nowhere HOT 3
- Clicking off the Select dropdown causes a crash in `update_focus` HOT 10
- v0.68.0 test_deadlock is failing HOT 12
- Some minor documentation additions HOT 3
- Add Image support using imgcat HOT 6
- Callback is not called when Screen is dismissed HOT 13
- `Tree.select_node` doesn't select the node, it highlights it HOT 5
- Using standard python logger HOT 3
- Documentation is not up-to-date HOT 3
- Travel back in time to 1900 HOT 2
- Crash opening and closing dialog really fast HOT 25
- On exit Texual always prints a lonely "<" to console HOT 3
- Workers report RUNNING state twice HOT 4
- Allow mouse-resizable Grid/Vertical/Horizontal with click-hold-drag-release type of resizing HOT 1
- Deadlock when closing app, associated with Footer.recompose and focus events HOT 5
- Right and bottom gets cut from keyline when using auto for width and height HOT 3
- MD links inside a MD table in Markdown Widget do not generate Markdown.LinkClicked when clicked HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textual.