Implement expressive fast-scroll labels for the scroll bar across the…#1685
Merged
theovilardo merged 1 commit intoApr 9, 2026
Merged
Conversation
… library and genre detail screens. ### Fast Scroll & Navigation - **ExpressiveScrollBarLabelResolvers**: Introduced a set of utility functions to resolve fast-scroll labels for Songs, Albums, Artists, and Playlists based on the active `SortOption`. - **Label Extraction**: Added `extractFastScrollGlyph` to intelligently pick the first letter or digit from strings, mapping numeric titles to a unified `#` bucket and skipping leading punctuation. - **Visual Feedback**: Enhanced `ExpressiveScrollBar` to display a floating circular label (Surface/Text) during drag operations. The label dynamically tracks the scroll handle position with smooth alpha, scale, and slide animations. - **Index Resolution**: Improved drag-to-index mapping with `resolveDragTargetIndex` to ensure the scroll progress accurately targets the last item in large lists when the handle is at the bottom. ### Integration - **Library Screens**: Integrated `dragLabelProvider` into `LibrarySongsTab`, `LibraryMediaTabs` (Albums/Artists), and `PlaylistContainer`. These providers use memoized lambdas to supply labels based on the current sort criteria (e.g., Artist name vs. Song title). - **Genre Details**: Implemented custom fast-scroll logic for `GenreDetailScreen` that traverses flattened list items (headers and songs) to find the relevant label for the current sort mode (Artist, Album, or Title). - **Grid Support**: Enabled label display for `LazyVerticalGrid` layouts in the Album library tab. ### Testing - **Metrics Testing**: Added unit tests for `resolveDragTargetIndex` and `extractFastScrollGlyph` to verify correct item targeting and glyph normalization.
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.
… library and genre detail screens.
Fast Scroll & Navigation
SortOption.extractFastScrollGlyphto intelligently pick the first letter or digit from strings, mapping numeric titles to a unified#bucket and skipping leading punctuation.ExpressiveScrollBarto display a floating circular label (Surface/Text) during drag operations. The label dynamically tracks the scroll handle position with smooth alpha, scale, and slide animations.resolveDragTargetIndexto ensure the scroll progress accurately targets the last item in large lists when the handle is at the bottom.Integration
dragLabelProviderintoLibrarySongsTab,LibraryMediaTabs(Albums/Artists), andPlaylistContainer. These providers use memoized lambdas to supply labels based on the current sort criteria (e.g., Artist name vs. Song title).GenreDetailScreenthat traverses flattened list items (headers and songs) to find the relevant label for the current sort mode (Artist, Album, or Title).LazyVerticalGridlayouts in the Album library tab.Testing
resolveDragTargetIndexandextractFastScrollGlyphto verify correct item targeting and glyph normalization.