KEMBAR78
Make ComposeViewport API common between k/js and k/wasm by eymar · Pull Request #2226 · JetBrains/compose-multiplatform-core · GitHub
Skip to content

Conversation

@eymar
Copy link
Member

@eymar eymar commented Jul 9, 2025

It's about this API:

fun ComposeViewport(
    viewportContainerId: String? = null,
    configure: ComposeViewportConfiguration.() -> Unit = {},
    content: @Composable () -> Unit = { }
)

Previously, they were not common - it was not possible to call this API from a shared webMain-like source set.

One of the overloads has no w3c types, and therefore it can be web-common for free.

Also, updated our demo: fun main is common now.

Required for https://youtrack.jetbrains.com/issue/CMP-7674

Testing

This should be tested by QA

Release Notes

Migration Notes - Web

  • fun ComposeViewport with viewportContainerId: String? parameter now can be called from a web-common fun main (k/js and k/wasm)

Previously, they were not common - it was not possible to call this API from a shared webMain-like source set.

One of the overloads has no w3c types, and therefore it can be web-common for free.

Also, updated our demo: fun main is common now.
@eymar eymar requested a review from Schahen July 9, 2025 09:45
Copy link

@Schahen Schahen left a comment

Choose a reason for hiding this comment

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

This is important per se but apart from that this immensely helps with what we are trying to achieve in skiko

@eymar eymar merged commit 2a2c1b1 into jb-main Jul 9, 2025
10 checks passed
@eymar eymar deleted the ok/make_cfw_compose_view_port_shared branch July 9, 2025 16:02
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