feat(playlist): add search bar to local playlists (#2120)#2165
Open
Phoenix1808 wants to merge 1 commit into
Open
feat(playlist): add search bar to local playlists (#2120)#2165Phoenix1808 wants to merge 1 commit into
Phoenix1808 wants to merge 1 commit into
Conversation
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.
f76b90d to
a81c6a6
Compare
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.
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
searchQueryflow and folded aPagingData.filter { … }into the existing paging chain, so filteringhappens on the already-loaded paging stream with no extra database
queries. Matches against song title or artist name
(case-insensitive).
floating
SearchBar, mirroring the existing implementation inPlaylistScreenfor visual/behavioral consistency. Reuses the existingsearchstring resource (no new translations needed).Scope is limited to
composeApp/commonMain— works on both Android and Desktop.Testing
:composeApp:compileKotlinJvm)Screenshots
1. Search icon added to the sort row (entry point)
2. Filtering by song title — "Tera Hua"
3. Filtering by artist — "Arijit"