Arkadii Ivanov
11/25/2023, 7:54 PM2.2.0-beta02
is released!
- Added materialPredictiveBackAnimatable
as a default animation
- LTR/RTL support in PredictiveBackGestureOverlay
- Fixed PredictiveBackGestureOverlay
swipe edges not changing
Release notes: https://github.com/arkivanov/Decompose/releases/tag/2.2.0-beta02s3rius
11/26/2023, 12:30 PMBackHandlerOwner
interface in your component" but BackHandlerOwner is already part of ComponentContext. The description makes it sound like there's actual work to do, but it's only a technicality because of the interface/implementation structure you're using.
2. The animated image in the docs is probably now wrong because the new MaterialPredictiveAnimatable doesn't modify the alpha of the component anymore.
3. Perhaps you could detail what the animation
param of predictiveBackAnimation
is used for. My initial intuition was that it defines the animation of the component during the predictive animation. It took a little longer to understand that it defines the non-predictive animation. The phase "regular animation" didn't really click for me. Maybe calling the parameter fallbackAnimation
or nonPredictiveAnimation
might help?
Finally, I copied the MaterialPredictiveBackAnimatable
to create a variant that also performs fading (like the image from 2.) That worked well except for Modifier.withLayoutCorners
which is internal and not trivial to just copy-over. Perhaps it would be useful to expose it as some form of defaultMaterialPredictiveLayoutCorners()
that library consumers can make use of.Arkadii Ivanov
11/26/2023, 1:12 PMThe description makes it sound like there's actual work to doThe documentation contains a code snippet saying:
// ComponentContext already implements BackHandlerOwner, no need to implement it separately
I agree that it might be confusing, perhaps we could replace "implement" with "add", or something similar.
The animated image in the docs is probably now wrongCorrect. I was a bit lazy to update those GIFs 🙂 Though, the docs now explicitly mentions and refers to the actual animation design. Contributions are welcome! https://arkivanov.github.io/Decompose/getting-started/contributing/
Perhaps you could detail what theI also thought about it. I thinkparam ofanimation
is used for.predictiveBackAnimation
fallbackAnimation
would be better here. It's too late to id in v2.2, as it has just reached Beta. But I've filed an issue for v3.0 - https://github.com/arkivanov/Decompose/issues/541.s3rius
11/26/2023, 2:19 PMThe documentation contains a code snippet saying:Wow, not sure how I missed that!
Dennis
11/27/2023, 6:42 AM