JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.99k stars 1.16k forks source link

Support material3-adaptive #3688

Closed igordmn closed 1 week ago

igordmn commented 1 year ago

This library is currently (15-09-2023) under development and haven't reach the stable 1.0 state yet: https://github.com/androidx/androidx/tree/androidx-main/compose/material3/material3-adaptive

It mostly developed in commonMain, so it is possible to port it to Compose Multiplatform

Omico commented 6 months ago

This has been moved to https://github.com/androidx/androidx/tree/androidx-main/compose/material3/adaptive. See also https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive.

Omico commented 3 months ago

We need to modify & publish our own androidx.window:window-core first. I have done some work on this. I’m currently using Compose Multiplatform 1.6.11, and the ported Jetpack Compose Material3 Adaptive libraries are version 1.0.0-alpha08. Newer versions of Jetpack Compose Material3 Adaptive libraries require Compose 1.7.

My project only has a JVM desktop and WASM target.

image

doTTTTT commented 3 months ago

@Omico In Window Manager 1.3.0 they added Kotlin Multiplatform support for Window Size Classes. this will help ? https://developer.android.com/jetpack/androidx/releases/window#1.3.0

And Chris Banes publish a lib for the WindowSizeClass to be available in Kotlin Mutliplatform https://github.com/chrisbanes/material3-windowsizeclass-multiplatform

Omico commented 3 months ago

@Omico In Window Manager 1.3.0 they added Kotlin Multiplatform support for Window Size Classes. this will help ? https://developer.android.com/jetpack/androidx/releases/window#1.3.0

And Chris Banes publish a lib for the WindowSizeClass to be available in Kotlin Mutliplatform https://github.com/chrisbanes/material3-windowsizeclass-multiplatform

These two are not the same.

See the difference between: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:window/window-core/src/commonMain/kotlin/androidx/window/core/layout/WindowSizeClass.kt https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/material3/material3-window-size-class/src/commonMain/kotlin/androidx/compose/material3/windowsizeclass/WindowSizeClass.kt

Jetpack Compose Material3 Adaptive libraries are using androidx.window:window-core.

I decided to open source the project ahead of time so you can check it out for yourself. https://github.com/OmicoDev/wwm

dozy-programmer commented 1 month ago

@Omico Is there a timeline of when this is expected to be available?

Omico commented 1 month ago

@Omico Is there a timeline of when this is expected to be available?

I'm not a member of the JetBrains/Google team, and it's unclear which team should be responsible for publishing this component to Maven. I think you should ask @igordmn for more information. Anyway, you'll be able to copy my work on your project.

MatkovIvan commented 1 month ago

https://github.com/JetBrains/compose-multiplatform-core/pull/1468

okushnikov commented 1 month ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.