Skip to content

Impl/expressive scrollbar#951

Merged
theovilardo merged 4 commits intomasterfrom
impl/expressive-scrollbar
Jan 30, 2026
Merged

Impl/expressive scrollbar#951
theovilardo merged 4 commits intomasterfrom
impl/expressive-scrollbar

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

No description provided.

…ry screens

- **Components**:
    - Introduces `ExpressiveScrollBar`, a custom-drawn scrollbar component that supports both `LazyListState` and `LazyGridState` with smooth animations and interactive drag/tap gestures.
    - Features a dynamic handle that expands upon interaction and includes a scroll icon (`Icons.Rounded.UnfoldMore`).
- **UI & Navigation**:
    - Integrates the new `ExpressiveScrollBar` into `PlaylistContainer`, `LibraryScreen` (Folders, Liked Songs, Albums, Artists tabs), and `LibrarySongsTab`.
    - Implements dynamic right padding for scrollable lists to accommodate the scrollbar only when content is scrollable.
    - Adjusts scrollbar bottom padding based on the visibility of the mini-player and bottom navigation bar to prevent overlap.
- **Refactoring**:
    - Wraps various `LazyColumn` and `LazyVerticalGrid` instances in `Box` containers to support the scrollbar overlay.
    - Improves list item stability by utilizing `stablePlayerState` and `remember`ed click handlers in `PlaylistContainer`.
…le components and screens.

- **UI Components**:
    - **QueueBottomSheet**: Wraps the `LazyColumn` in a `Box` to accommodate the new `ExpressiveScrollBar`. Adjusted content padding dynamically based on scroll state and reduced start/end offsets for a tighter layout.
    - **FileExplorerBottomSheet**: Moved horizontal padding to the parent container and integrated the `ExpressiveScrollBar` with custom padding to account for the Floating Action Button.
    - **SongPickerBottomSheet**: Implemented `rememberLazyListState` and added the `ExpressiveScrollBar`. Updated `PaddingValues` to handle right-side spacing conditionally when scrolling is active.
- **Screens**:
    - **PlaylistDetailScreen**: Refactored the song list into a `Box` layout to support the `ExpressiveScrollBar`. Added haptic feedback logic to reorderable items and tuned the scrollbar's vertical padding to clear the MiniPlayer.
    - **GenreDetailScreen**: Added the `ExpressiveScrollBar`, configuring it to only appear when the top bar is mostly collapsed (>95%) to prevent visual overlap with the header. Optimized list end-padding to prevent text from being obscured by the scrollbar.
- **General**:
    - Consistent adoption of dynamic end-padding in `LazyColumn` instances across the app to improve visual balance when scrollbars are visible.
…I component structure.

- **GenreDetailScreen**:
    - Converts the monolithic `displaySections` loop into a flat `LazyColumn` structure using `LazyListScope` extensions, improving scroll performance and memory usage.
    - Refactors `ArtistSectionItem` and `AlbumSectionItem` into `ArtistSection` and `AlbumSection` `LazyListScope` extensions to avoid nested scrolling and better handle item animations.
    - Updates section layouts to use `AbsoluteSmoothCornerShape` and `Surface` for more consistent card-like appearances with rounded corners that respect section boundaries.
    - Improves `FlatList` section rendering by utilizing `animateItem()` and consistent vertical spacing.
- **UI Components**:
    - Introduces `AlbumSectionItems` as a shared logic handler for both standalone album sections and albums embedded within artist sections.
    - Implements dynamic shape calculation for song items within albums, ensuring smooth transitions and rounded corners for the first and last items in a group.
    - Refines background color consistency for containers, ensuring the `surfaceContainerLow` theme is applied correctly throughout the scrollable list.
- **Miscellaneous**:
    - Adds `StablePlayerState` imports and updates method signatures to ensure state stability during re-compositions.
    - Optimizes image loading in artist headers by pre-finding artist metadata before rendering list items.
- **Data Models**:
    - Moves `SortOption`, `SectionData`, and `AlbumData` to the top of the file for better visibility and organization.
    - Changes `SortOption` visibility to `private`.
- **UI & Styling**:
    - Cleans up `GenreHeader` by removing redundant comments and simplifying local variable usage.
    - Updates `AlbumSection` and `AlbumSectionItems` to use the imported `StablePlayerState` instead of its fully qualified name.
    - Refines internal spacing and removes hardcoded color comments in favor of standard `MaterialTheme` references.
- **Code Health**:
    - Removes unnecessary boilerplate comments and simplifies logic within `LazyListScope` extensions.
    - Optimizes `GenreHeader` alpha and color interpolation logic for smoother transitions.
@theovilardo theovilardo merged commit 3360246 into master Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant