[AND-8] Update compose to v1.7.5. Migrate RippleTheme to RippleConfiguration. #5475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎯 Goal
Linear: https://linear.app/stream/issue/AND-8/update-compose-to-latest-stable-version
This PR updates the
compose
andcompose-material
libraries to their latest stable version:1.7.5
and1.3.1
respectively, and migrates the usage ofRippleTheme
toRippleConfiguration
.There is currently a problem in following scenario:
compose
chat SDK (which hascompose
version1.6.8
)compose
version1.7.+
ChatTheme#rippleTheme
This issue happens because starting from
compose v1.7.0
, theRippleTheme
is deprecated withLevel.ERROR
, and it is not possible to use - therefore for an app usingcompose
version1.7.+
, it is not possible to provide a customRippleTheme
forChatTheme.rippleTheme
.There is now a replacement for
RippleTheme
calledRippleConfiguration
.More details:
Because of this, we need to provide a way for users to customise the ripples, even if they are using
compose 1.7.+
.(and we decided to update the compose versions as well, because this change will eventually be inevitable)
🛠 Implementation details
🚨 BREAKING CHANGE 🚨
ChatTheme rippleTheme: RippleTheme
argument to a compose version-independentStreamRippleConfiguration
(Note: we are not directly exposingRippleConfiguration
fromChatTheme
as it will be experimental until compose version1.8.0
, therefore makingChatTheme
experimental as well. Additionally it gives us flexibility to change the internal implementation in the future, without affecting the public API)StreamRippleConfiguration
is then internally mapped toRippleConfiguration
, keeping the implementation details of the ripple provider internalLocalRippleTheme
with the newLocalRippleConfiguration
rememberRipple()
with the newripple()
, which properly queriesLocalRippleConfiguration