Skip to content

feat(playlist): add search bar to local playlists (#2120)#2165

Open
Phoenix1808 wants to merge 1 commit into
maxrave-dev:devfrom
Phoenix1808:feat/local-playlist-search
Open

feat(playlist): add search bar to local playlists (#2120)#2165
Phoenix1808 wants to merge 1 commit into
maxrave-dev:devfrom
Phoenix1808:feat/local-playlist-search

Conversation

@Phoenix1808

Copy link
Copy Markdown

What

Adds a search/filter bar to the local playlist screen, matching the
one that YouTube playlists already have.

Closes #2120

Why

YouTube playlists have an integrated search bar, but local playlists did
not — finding a song in a large local playlist meant scrolling the whole
list manually. This brings the two screens to parity.

How

  • LocalPlaylistViewModel: added a searchQuery flow and folded a
    PagingData.filter { … } into the existing paging chain, so filtering
    happens on the already-loaded paging stream with no extra database
    queries
    . Matches against song title or artist name
    (case-insensitive).
  • LocalPlaylistScreen: added a 🔍 toggle in the sort row and a
    floating SearchBar, mirroring the existing implementation in
    PlaylistScreen for visual/behavioral consistency. Reuses the existing
    search string resource (no new translations needed).

Scope is limited to composeApp/commonMain — works on both Android and Desktop.

Testing

  • ✅ Compiles cleanly (:composeApp:compileKotlinJvm)
  • ✅ Verified on Desktop: filtering by title ("Tera Hua") and by artist ("Arijit") both narrow the list correctly.

Screenshots

1. Search icon added to the sort row (entry point)

Search icon in sort row

2. Filtering by song title — "Tera Hua"

Filter by title

3. Filtering by artist — "Arijit"

Filter by artist

Local playlists now have the same search/filter bar that YouTube
playlists already have. Tapping the search icon in the action row
reveals a search bar that filters the track list by song title or
artist name (case-insensitive).

Filtering is applied to the existing Paging flow via PagingData.filter
in LocalPlaylistViewModel, so no extra database queries are needed.
The SearchBar UI mirrors the existing implementation in PlaylistScreen
for visual and behavioral consistency.
@Phoenix1808 Phoenix1808 force-pushed the feat/local-playlist-search branch from f76b90d to a81c6a6 Compare June 15, 2026 21:25
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