-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Added AnimatedVisibilityScope to ChildPanels content composables #835
Conversation
WalkthroughThe pull request modifies the Changes
Assessment against linked issues
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
extensions-compose-experimental/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/experimental/panels/ChildPanels.kt (1)
297-298
: DetailsPanel adds AnimatedVisibilityScope to content and placeholder.This upgrade fosters more dynamic animation logic for both details panels and placeholders. Verify that placeholder animations do not unintentionally override main animations.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
extensions-compose-experimental/api/android/extensions-compose-experimental.api
(2 hunks)extensions-compose-experimental/api/extensions-compose-experimental.klib.api
(1 hunks)extensions-compose-experimental/api/jvm/extensions-compose-experimental.api
(2 hunks)extensions-compose-experimental/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/experimental/panels/ChildPanels.kt
(8 hunks)
🔇 Additional comments (12)
extensions-compose-experimental/api/jvm/extensions-compose-experimental.api (2)
12-15
: Expanded ChildPanels function signatures to function4-based lambdas.By adding the
AnimatedVisibilityScope
receiver parameter, theseChildPanels
overloads now enable composable content to directly leverage animation scopes. The change is well-structured and beneficial for advanced animation scenarios. Please validate any dependent calls in your project for proper parameter updates.
25-32
: Lambda getters updated from Function2/Function3 to Function3/Function4.These updated accessor signatures align with the new
AnimatedVisibilityScope
usage. Ensure your usage of these lambdas reflects the added parameter, as older function references may need refactoring.extensions-compose-experimental/api/android/extensions-compose-experimental.api (2)
12-15
: ChildPanels function signatures now accept an extra parameter for AnimatedVisibilityScope.Switching from
Function3
toFunction4
is a breaking change for any direct references to these methods. Validate all references to confirm they match the newly introduced parameter.
25-32
: Lambda getters refactored for composables requiring AnimatedVisibilityScope.The shift to
Function4
makes sense for advanced animation features. Make sure references are updated in any calling code that depended on the older function signatures.extensions-compose-experimental/src/commonMain/kotlin/com/arkivanov/decompose/extensions/compose/experimental/panels/ChildPanels.kt (7)
3-3
: New import for AnimatedVisibilityScope.This import unlocks advanced animation features within child composables, ensuring seamless integration with Compose’s animation APIs.
51-54
: Additional AnimatedVisibilityScope parameters in ChildPanels for two-child setups.This enhancement helps incorporate more dynamic animations for conditional visibility. Make sure the caller lambdas correctly handle the new scope parameter.
97-100
: ChildPanels overload with direct ChildPanels object also enhanced to use AnimatedVisibilityScope.Encourages uniform usage of animation scope in both reactive (
Value
) and direct ChildPanels usage. Confirm that any local usage also properly accommodates the new scope param.
146-151
: Introduced AnimatedVisibilityScope to three-child variant for main/detail/extra.This addition ensures consistent handling of animations across all panels. The placeholders for the second and third panels can now also leverage animations.
200-205
: Three-child variant for ChildPanels object now supports AnimatedVisibilityScope-based composables.Aligns with the approach in the reactive variant. Verify new lambdas are tested to avoid runtime mismatches.
264-264
: MainPanel content param upgraded to AnimatedVisibilityScope receiver.Allows inline and container-based animations for the main child. This consistent approach simplifies performing component animations under a single scope.
341-342
: ExtraPanel updated to AnimatedVisibilityScope for content and placeholder.Ensures consistent animation handling across all optional panels. Verify the layering of placeholders remains correct when all three panels are displayed.
extensions-compose-experimental/api/extensions-compose-experimental.klib.api (1)
65-68
: Added fourth parameter to ChildPanels function signatures for the AnimatedVisibilityScope.These additions enable composable animators to operate within the child content more declaratively. Ensure you modify your function references accordingly, as older references using
Function3
might break at compile-time.
Closes #834.
Summary by CodeRabbit
Based on the comprehensive changes, here are the release notes:
New Features
ChildPanels
functionality with improved animation capabilitiesAnimatedVisibilityScope
for more dynamic UI componentsImprovements
Technical Updates
Function3
toFunction4
parameter types