Skip to content

Implement expressive fast-scroll labels for the scroll bar across the…#1685

Merged
theovilardo merged 1 commit into
masterfrom
fix/scrollbar-end-position-and-alphabet-indicator
Apr 9, 2026
Merged

Implement expressive fast-scroll labels for the scroll bar across the…#1685
theovilardo merged 1 commit into
masterfrom
fix/scrollbar-end-position-and-alphabet-indicator

Conversation

@theovilardo

Copy link
Copy Markdown
Collaborator

… 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.

… 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.
@theovilardo theovilardo merged commit 84167ad into master Apr 9, 2026
3 checks passed
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