Skip to content

Commit d291308

Browse files
committed
feat(audiobookshelf): Implement shared element transitions and improve MiniPlayer UI
This commit introduces `SharedTransitionLayout` to provide a seamless visual transition for audiobook covers between the MiniPlayer and the full Audiobookshelf Player screen. It also refactors the MiniPlayer with a modern design, including swipe-to-dismiss functionality and dynamic background coloring. ### Key Changes: * **`MainNavigation.kt`**: * Wrapped the root `NavHost` and `MiniPlayer` in a `SharedTransitionLayout` to enable shared element transitions. * Updated the `audiobookshelf/player/` route and `MiniPlayer` call sites to pass the required `AnimatedVisibilityScope`. * **`MiniPlayer.kt`**: * **Shared Element**: Added `sharedElement` modifier to the book cover image for smooth transitions. * **UI Redesign**: Replaced the linear progress bar with a dynamic "fill" effect where the background color (derived from the cover) expands behind the content based on playback progress. * **Interactions**: Implemented `SwipeToDismissBox` to allow users to close the mini player by swiping. * **Visuals**: Switched the cover shape to `CircleShape`, added a `basicMarquee` effect to the title when playing, and increased elevation/shadows for better depth. * **`AudiobookshelfPlayerScreen.kt`**: * Updated the screen and its content components (`PortraitPlayerContent`, `LandscapePlayerContent`) to support `SharedTransitionScope`. * Added the matching `sharedElement` modifier to the cover art in both portrait and landscape layouts to complete the transition pair with the MiniPlayer. * **Formatting**: * Performed minor indentation and code style adjustments across modified files.
1 parent b097e04 commit d291308

File tree

3 files changed

+743
-655
lines changed

3 files changed

+743
-655
lines changed

0 commit comments

Comments
 (0)