Skip to content
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

Revert material3 to 1.3.1 #1868

Merged
merged 12 commits into from
Feb 25, 2025
Merged

Conversation

igordmn
Copy link
Collaborator

@igordmn igordmn commented Feb 21, 2025

CMP 1.8.0 will contain Material 1.3.1, not Material 1.4

Fixes https://youtrack.jetbrains.com/issue/CMP-7633/Revert-material3-to-1.3.1-state-for-CMP-1.8.x-release

Better to review commit by commit.

  1. Revert to the CMP 1.7.3 state (2nd commit):
git checkout --no-overlay v1.7.3 -- compose/material3/material3
  1. Find all commits with features:
git log origin/jb-main --not v1.7.3 --not origin/integration --not aosp/androidx-main --oneline -- compose/material3/material3

From:

df37665bbaf Restore Slider onValueChangeFinished init
a4995ca19d1 Merge branch 'jb-main' into integration-copy/compose-material3/e545e49a25b/to-jb-main
4818376704b Copy compose-material3 from e545e49a25b
9f4a03e528d Restore TODO that was wiped during 1.4.0-alpha06 merge (#1813)
6fd7ac43945 Update Desktop API dump
3da7f06baf7 Merge branch 'jb-main' into integration-copy/compose-material3/146938232f0/to-jb-main
9bd116a3d7f Use the new multiplatform BackHandler in material3 and navigation-compose modules.
de5792abed6 Copy compose-material3 from 146938232f0
edf1a19e4d8 Restore commonMain to AOSP state (small fixes) (#1756)
5a1da1fedfb Restore commonMain to AOSP state (material3 formatting) (#1760)
f56f6e79ae1 Update kotlin version to 2.1.0 (#1778)
7adc6b46678 Commonize BasicTooltip in foundation and BasicTooltip/Tooltip in material3.
bbbaae3ce13 Fix missed implementation for `DrawerPredictiveBackHandler` (#1763)
f1e03d07846 Restore commonMain to AOSP state (remove getter compilation fix) (#1757)
551007f6d14 Reimplement js and was identityHashCode family of implementations with WeakMap (#1752)
3c7ecdeeb35 Fix missing locale arg in KotlinxDatetimeCalendarModelTest
330c557cecd Copy compose-material3 from fccc3e0d9d6
e443fc1dbee unpin annotation dependency (version conflict)
b6eba028329 Set the default version to 9999.0.0-SNAPSHOT, pin all dependencies (#1696)
33496e505a1 Update DatePickerDialog to the latest AOSP version (#1666)
2a766f01369 Make formatWithSkeleton internal (#1609)
38bd05f09fa Copy compose-material3 from 0c5014aaf13
dc61c9d90a5 Revert 'compose/material3' to jb-main state
f6614f4dc6b Merge branch 'jb-main' into integration
986fa245379 Change `runOnIdle` to execute on the UI thread, and to not `waitForIdle` afterward (#1601)
5c4c100d8a8 Apply changes required by K2 verification rules
8c9e9ec021d Update API dumps
f3616a887ae Merge tag 'androidx/compose-ui/1.8.0-alpha02' into integration
ed22cea4735 Regenerate material3 translations for 1.7.0 (#1553)
6746f1f67f7 Merge tag 'androidx/compose-ui/1.8.0-alpha01' into integration
8ed8b796ba0 Merge commit '7ad56ead707b242bc3b85e654189edf6e3bbe8ad' into integration
13004b87247 Merge tag 'androidx/navigation/2.8.0-beta06' into integration
597a4970f31 Merge branch 'jb-main' into integration
b09b20f2d9a Merge branch 'jb-main' into integration
8b09c1c950a Merge empty integration-snap/612689d2322/to-jb-main

I chose:

9bd116a3d7f Use the new multiplatform BackHandler in material3 and navigation-compose modules.
bbbaae3ce13 Fix missed implementation for `DrawerPredictiveBackHandler` (#1763)
551007f6d14 Reimplement js and was identityHashCode family of implementations with WeakMap (#1752)
f56f6e79ae1 Update kotlin version to 2.1.0 (#1778)
e443fc1dbee unpin annotation dependency (version conflict)
b6eba028329 Set the default version to 9999.0.0-SNAPSHOT, pin all dependencies (#1696)
986fa245379 Change `runOnIdle` to execute on the UI thread, and to not `waitForIdle` afterward (#1601)
5c4c100d8a8 Apply changes required by K2 verification rules
  1. Cherry-pick them discarding all changes outside of compose/material3/material3.

Testing

  • CI
  • mpp/demo

Release Notes

Breaking Changes - Multiple Platforms

  • (prerelease fix) Material3 is reverted from Jetpack Compose Material3 1.4.0-alpha07 to 1.3.1 because 1.4.0 Stable will be released only after CMP 1.8.0. As a workaround to continue using the new API, replace:
    implementation(compose.material3)
    
    by:
    implementation("org.jetbrains.compose.material3:material3:1.8.0-alpha03")
    
    Jetpack Compose Material3 1.4.0 will be merged again sometime after the CMP 1.8.0 release.

@igordmn igordmn changed the title Igor.demin/revert material3 to stable Revert material3 to 1.3.1 Feb 21, 2025
@igordmn igordmn marked this pull request as draft February 21, 2025 21:22
@ApoloApps
Copy link

Could we get the reason behind this change? I already had some implementations of some of the new components and this will break my app (which will be a pain to get around it, although its was dev versions and its understandable)

@MatkovIvan
Copy link
Member

It's due to difference in release cycles. Google won't release stable material3 1.4 together/before with Compose 1.8, but on multiplatform it shares the same version. Due to stability expectations we cannot release beta/stable version based on Google's alpha version.

We're thinking how to gracefully separate this in future versions, but for 1.8 we have to revert it to 1.3.x state.

You can continue using alpha03 version for material3 if you want to experiment with new APIs from there

igordmn and others added 5 commits February 25, 2025 01:24
…le` afterward (#1601)

# Conflicts:
#	compose/ui/ui-test/src/skikoTest/kotlin/androidx/compose/ui/test/TestBasicsTest.kt
#	navigation/navigation-compose/src/commonTest/kotlin/androidx/navigation/compose/NavHostTest.kt
…1696)

These are preparation to build Compose 1.8.0-alpha01 from `jb-main`
branch.

1. Set the default version to 9999.0.0-SNAPSHOT. It is needed for
pinning, more in the code comment.

**Alternative**
Move versioning from CI to `libraryversions.toml`. It will contain all
next versions we need to publish, and they are always greater than the
pinned versions. This requires some work and I didn't plan it in the
short term.

**Disadvantage**
We can accidentally publish it to the dev repo. But users won't see it
in the suggestions because it is `-SNAPSHOT`.

This is also true for the alternative, so we have this disadvantage
anyway.

2. Pin all dependencies to be able to not release them.

Not pinned dependencies:
- collection (new API needed)
- core (new lib core-uri)
- shapes (no stable version)

## Testing
1. Build
```
./gradlew publishComposeJbToMavenLocal
```
2. Check module files
3. Sync and run the version on the desktop template
4. run1, runDemo
# Conflicts:
#	compose/animation/animation-core/build.gradle
#	compose/foundation/foundation-layout/build.gradle
#	compose/foundation/foundation/build.gradle
#	compose/material/material/build.gradle
#	compose/runtime/runtime/build.gradle
#	compose/ui/ui-graphics/build.gradle
#	compose/ui/ui-test-junit4/build.gradle
#	compose/ui/ui-test/build.gradle
#	compose/ui/ui-text/build.gradle
#	compose/ui/ui-unit/build.gradle
#	compose/ui/ui/build.gradle
#	lifecycle/lifecycle-viewmodel-savedstate/build.gradle
#	navigation/navigation-common/build.gradle
#	navigation/navigation-compose/build.gradle
#	navigation/navigation-runtime/build.gradle
#	savedstate/savedstate/build.gradle
# Conflicts:
#	compose/runtime/runtime/build.gradle
#	compose/ui/ui/build.gradle
@igordmn igordmn force-pushed the igor.demin/revert-material3-to-stable branch 2 times, most recently from 53e5c1f to 1df3651 Compare February 25, 2025 01:01
eymar and others added 5 commits February 25, 2025 02:34
# Conflicts:
#	buildSrc/private/src/main/kotlin/androidx/build/AndroidXMultiplatformExtension.kt
#	compose/material3/material3/api/desktop/material3.api
#	compose/runtime/runtime/src/nonEmulatorCommonTest/kotlin/androidx/compose/runtime/snapshots/SnapshotStateMapTests.kt
#	gradle/libs.versions.toml
#	navigation/navigation-compose/build.gradle
#	navigation/navigation-compose/src/commonMain/kotlin/androidx/navigation/compose/DialogNavigator.kt
#	navigation/navigation-runtime/src/commonMain/kotlin/androidx/navigation/NavControllerViewModel.kt
#	navigation/navigation-runtime/src/jbMain/kotlin/androidx/navigation/NavControllerViewModel.jb.kt
…h WeakMap (#1752)

# Conflicts:
#	lifecycle/lifecycle-viewmodel-savedstate/src/jvmMain/kotlin/androidx/lifecycle/serialization/SavedStateHandleDelegates.jvm.kt
#	navigation/navigation-runtime/src/jsMain/kotlin/androidx/navigation/internal/Utils.js.kt
Since `PredictiveBackHandler` were previously commonized (without actual
implementation yet), it's no longer necessary to wrap usages of it into
expect/actual. It fixes missing implementation of
`DrawerPredictiveBackHandler` on non-Android platforms.

Fixes https://youtrack.jetbrains.com/issue/CMP-1301 and
https://youtrack.jetbrains.com/issue/CMP-7309

## Release Notes
### Fixes - Multiple Platforms
- Fix missing implementation on non-Android platforms for
`ModalDrawerSheet` overload with `DrawerState` argument
…pose modules.

# Conflicts:
#	navigation/navigation-compose/build.gradle
#	navigation/navigation-compose/src/commonMain/kotlin/androidx/navigation/compose/NavHost.kt
@igordmn igordmn force-pushed the igor.demin/revert-material3-to-stable branch from 1df3651 to c50e615 Compare February 25, 2025 01:35
@igordmn igordmn marked this pull request as ready for review February 25, 2025 13:25
@igordmn igordmn requested a review from kropp February 25, 2025 13:36
@igordmn igordmn merged commit dedd291 into jb-main Feb 25, 2025
7 checks passed
@igordmn igordmn deleted the igor.demin/revert-material3-to-stable branch February 25, 2025 16:37
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.

8 participants