-
Notifications
You must be signed in to change notification settings - Fork 118
singleWindowApplication content now receives ApplicationScope too
#2703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
singleWindowApplication content now receives ApplicationScope too
#2703
Conversation
singleWindowApplication content now receives ApplicationScope too.singleWindowApplication content now receives ApplicationScope too
compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/window/Window.desktop.kt
Show resolved
Hide resolved
igordmn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs 2 approvals
| @Deprecated( | ||
| level = DeprecationLevel.HIDDEN, | ||
| message = "Replaced by override that takes a `SingleWindowApplicationScope`" | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, we don't need to keep compatibility for experimental, but let's keep it for one version.
Please add YT tasks for:
- Remove ExperimentalComposeUiApi/Deprecated override in 1.12
- Stabilize ExperimentalComposeUiApi overrides
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need to remove the deprecated version? It's marked as HIDDEN, but provides binary backwards compatibility, so I don't see any harm to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The experimental annotation is added to be able to remove/change it in the next version without deprecation/keeping it in the codebase forever. There is no reason to keep it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question was about the removal of the non-experimental overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although, actually it applies to the experimental one too.
The reason to keep it is to continue providing binary backwards compatibility. I don't see a reason to not do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question was about the removal of the non-experimental overload.
We should keep it compatibility/deprecated version for non-experimental variant
The reason to keep it is to continue providing binary backwards compatibility.
It's not an argument for experimental API
I don't see a reason to not do that.
To keep semantics of experimental, to keep our codebase clean.
Also, I don't really see the use case where it might be useful for anybody – the entry point isn't used in libraries anyway
singleWindowApplicationcontent now receivesSingleWindowApplicationScope, which is a subtype of bothApplicationScopeandFrameWindowScopeFixes Cannot exitApplication() in singleWindowApplication
Testing
Tested with
making sure "Application exited" is printed after pressing the "Close App" button.
Release Notes
Features - Desktop
singleWindowApplicationcontent's receiver now subclassesApplicationScopetoo, allowing to programmatically exit the app.