Skip to content

Conversation

@kaascevich
Copy link
Contributor

AlertScene is a scene that presents a whole-app modal alert (or the backend's closest approximation thereof). It behaves similarly to View.alert(_:isPresented:actions:), but isn't attached to any one window.

An empty block returns the default "OK" action. `AlertScene` and `presentAlert` now require the `actions` parameter; an empty closure provides the previous behavior.
Copy link
Owner

@stackotter stackotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be handy to have around. I've requested a few changes, but for the most part you've implemented it very well 🙏

stackotter
stackotter previously approved these changes Jan 5, 2026
@stackotter
Copy link
Owner

Just did some local testing.

It works with AppKitBackend, and GtkBackend.

It crashes with UIKitBackend;

UIKitBackend/UIKitBackend+Alert.swift:42: Fatal error: Could not find window in which to display alert

WindowingExample crashes with Gtk3Backend for an unrelated reason (#308); now resolved by your #309 PR.

WindowingExample crashes with WinUIBackend as soon as the windows appear, but I'm not sure why. I'm currently looking into whether it's related or not, but I'm having issues with my Windows VM.

@kaascevich kaascevich requested a review from stackotter January 7, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants