Optimize player sheet animations 2316053300601963138#619
Merged
theovilardo merged 11 commits intobckp/player-sheet-optimfrom Dec 23, 2025
Merged
Conversation
…vider and graphicsLayer
* Refactored `UnifiedPlayerSheet` to use `Modifier.offset` instead of `Modifier.height` for expansion, eliminating layout thrashing. * Updated `FullPlayerContent` to accept expansion fraction as a provider lambda `() -> Float` to prevent expensive recompositions during drag. * Moved staggered animations (alpha, translation) into `Modifier.graphicsLayer`. * Optimized shadow rendering by using `RoundedCornerShape` for the shadow layer while keeping `AbsoluteSmoothCornerShape` for the visible background. * Implemented `zIndex` and off-screen offset logic to ensure correct interactivity of MiniPlayer and underlying content. * Fixed compilation issues related to `TopAppBar` and `Scaffold` parameter usage.
…error * Refactored `UnifiedPlayerSheet` to use `Modifier.offset` instead of `Modifier.height` for expansion, eliminating layout thrashing. * Updated `FullPlayerContent` to accept expansion fraction as a provider lambda `() -> Float` to prevent expensive recompositions during drag. * Moved staggered animations (alpha, translation) into `Modifier.graphicsLayer`. * Optimized shadow rendering by using `RoundedCornerShape` for the shadow layer while keeping `AbsoluteSmoothCornerShape` for the visible background. * Implemented `zIndex` and off-screen offset logic to ensure correct interactivity of MiniPlayer and underlying content. * Fixed `Unresolved reference: expansionFraction` compilation error in `FullPlayerContent.kt` by using `expansionFractionProvider` inside `graphicsLayer`.
…atures * Refactored `UnifiedPlayerSheet` to use `Modifier.offset` instead of `Modifier.height` for expansion, eliminating layout thrashing. * Updated `FullPlayerContent` to accept expansion fraction as a provider lambda `() -> Float` to prevent expensive recompositions during drag. * Moved staggered animations (alpha, translation) into `Modifier.graphicsLayer`. * Optimized shadow rendering by using `RoundedCornerShape` for the shadow layer. * Implemented `zIndex` and off-screen offset logic to ensure correct interactivity of MiniPlayer and underlying content. * Restored "Delay Content" functionality: Updated `FullPlayerContent` to respect `FullPlayerLoadingTweaks` by dynamically adjusting alpha start thresholds (e.g., 0.95f) when delay is enabled. * Fixed `Unresolved reference: expansionFraction` compilation error.
…aceholders * Refactored `UnifiedPlayerSheet` to use `Modifier.offset` instead of `Modifier.height` for expansion, eliminating layout thrashing. * Updated `FullPlayerContent` to accept expansion fraction as a provider lambda `() -> Float` to prevent expensive recompositions during drag. * Moved staggered animations (alpha, translation) into `Modifier.graphicsLayer`. * Optimized shadow rendering by using `RoundedCornerShape` for the shadow layer. * Implemented `zIndex` and off-screen offset logic to ensure correct interactivity of MiniPlayer and underlying content. * Restored "Delay Content" features: Added `DelayedContent` composable wrapper and implemented `ShimmerBox` placeholders for Album, Controls, Metadata, and Progress. * Fixed `Unresolved reference: expansionFraction` compilation error. * Fixed regression where TopAppBar disappeared when "Delay All" was enabled; it now remains visible during transitions.
* Refactored `UnifiedPlayerSheet` to use `Modifier.offset` instead of `Modifier.height` for expansion, eliminating layout thrashing. * Updated `FullPlayerContent` to accept expansion fraction as a provider lambda `() -> Float` to prevent expensive recompositions during drag. * Moved staggered animations (alpha, translation) into `Modifier.graphicsLayer`. * Optimized shadow rendering by using `RoundedCornerShape` for the shadow layer. * Implemented `zIndex` and off-screen offset logic to ensure correct interactivity of MiniPlayer and underlying content. * Restored "Delay Content" features with `DelayedContent` wrapper. * Restored exact dimensions and padding for Placeholders (`ShimmerBox`) to match real content (`AlbumCover`, `Controls`, `Metadata`, `Progress`) precisely, as requested. * Fixed `Unresolved reference: expansionFraction` compilation error.
…roll fix * Refactored `UnifiedPlayerSheet` to use `Modifier.offset` instead of `Modifier.height` for expansion, eliminating layout thrashing. * Updated `FullPlayerContent` to accept expansion fraction as a provider lambda `() -> Float` to prevent expensive recompositions during drag. * Moved staggered animations (alpha, translation) into `Modifier.graphicsLayer`. * Optimized shadow rendering by using `RoundedCornerShape` for the shadow layer. * Implemented `zIndex` and off-screen offset logic to ensure correct interactivity of MiniPlayer and underlying content. * Restored "Delay Content" features with `DelayedContent` wrapper and updated threshold (0.85f -> 1.0f) for smoother, less abrupt transitions. * Restored exact dimensions and padding for Placeholders (`ShimmerBox`) to match real content precisely. * Fixed `AutoScrollingTextOnDemand` broken by the optimization: updated it to accept `expansionFractionProvider` and use `derivedStateOf` to correctly trigger scrolling only when fully expanded (> 0.99f). * Fixed `Unresolved reference: expansionFraction` compilation error.
…holders * Refactored `UnifiedPlayerSheet` to use `Modifier.offset` instead of `Modifier.height` for expansion, eliminating layout thrashing. * Updated `FullPlayerContent` to accept expansion fraction as a provider lambda `() -> Float` to prevent expensive recompositions during drag. * Moved staggered animations (alpha, translation) into `Modifier.graphicsLayer`. * Optimized shadow rendering by using `RoundedCornerShape` for the shadow layer. * Implemented `zIndex` and off-screen offset logic to ensure correct interactivity of MiniPlayer and underlying content. * Restored "Delay Content" features with `DelayedContent` wrapper and updated threshold for smoother transitions. * Replaced `ShimmerBox` placeholders with simpler, static `PlaceholderBox` composables using `Surface` and `RoundedCornerShape`, matching the exact requested design and layout. * Updated `FullPlayerLoadingTweaks` to disable `showPlaceholders` by default. * Fixed `AutoScrollingTextOnDemand` to work with the provider-based state. * Fixed `Unresolved reference: expansionFraction` compilation error.
…eter
Updates the `MarqueeText` composable in `LibraryScreen.kt` to align with a recent API change.
- The `expansionFraction` parameter, which previously accepted a `Float`, is now changed to `expansionFractionProvider`, which accepts a lambda `() -> Float`.
- The implementation is updated from `expansionFraction = 1f` to `expansionFractionProvider = { 1f }` to match the new function signature.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.