KEMBAR78
Rename and deprecate Window/DialogWindow overloads that create a ComposeWindow/ComposeDialog by m-sasha · Pull Request #2141 · JetBrains/compose-multiplatform-core · GitHub
Skip to content

Conversation

@m-sasha
Copy link
Member

@m-sasha m-sasha commented May 28, 2025

Rename Window/DialogWindow overloads that create a ComposeWindow/ComposeDialog to SwingWindow/SwingDialog and deprecate the old names.

This PR is meant to go before #2139, so we can keep consistent naming:

  1. Functions which are meant to be high-level, non specific to Swing are called Window and DialogWindow (yes, they're unfortunately still tied to Swing via e.g. WindowScope.window, but that's not intentional).
  2. Functions which are meant to be more low-level and tied to Swing are called SwingWindow and SwingDialog.

I also cleaned up the AppContent examples file.

Testing

Tested that the ReplaceWith works.

Release Notes

Migration Notes - Desktop

  • Window and DialogWindow overloads that create a ComposeWindow/ComposeDialog have been renamed to SwingWindow/SwingDialog and the old versions have been deprecated.

@m-sasha m-sasha requested review from MatkovIvan and igordmn May 28, 2025 07:26
* limitations under the License.
*/

package androidx.compose.ui.window
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would move it to androidx.compose.ui.awt to be consistent with SwingPanel Composable and ComposeWindow class.

On the other hand, it will be inconsistent with AwtWindow, so we would have to move it too.

What do you think is better?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, makes sense.

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved, and also improved some of the documentation on related functions.

@m-sasha m-sasha force-pushed the m-sasha/rename-window-dialog-swing-overloads branch from a44351f to 7fc722f Compare May 29, 2025 09:45
@m-sasha m-sasha force-pushed the m-sasha/rename-window-dialog-swing-overloads branch from 7fc722f to 796da34 Compare May 29, 2025 10:26
@m-sasha m-sasha requested a review from igordmn June 2, 2025 09:29
@m-sasha
Copy link
Member Author

m-sasha commented Jun 2, 2025

@MatkovIvan Can you look at this too? Needs two reviewers here...

@m-sasha m-sasha merged commit 182d44e into jb-main Jun 3, 2025
10 checks passed
@m-sasha m-sasha deleted the m-sasha/rename-window-dialog-swing-overloads branch June 3, 2025 18:16
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.

3 participants