Repository navigation
feat(deck): search bar to filter cards by artist or title - #36
Merged
Merged
Conversation
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.
Closes #32
Summary
TextInputto the unified deck page (app/deck/[id].tsx) that lives inside theFlatList'sListHeaderComponent, so it scrolls with the list rather than floating.artistORtitle, composed on top of the existing kept/skipped pill filter."No cards match '<query>'"empty-state row, shown only when the query is non-empty.Implementation notes
(filter === 'all' ? rows : rows.filter(r => r.kind === filter)).filter(r => rowMatchesQuery(r, needle)). Existing pill semantics preserved; search composes on top.rowMatchesQuery(row, needle)covers bothkept(Card) anddropped(DroppedTrack) rows since both shareartist/titlefields, so the dropped-tracks list is filtered by the same pass through the unifiedDeckRow[].CardSearchInputatom): only one usage, no reuse value.bg-navy800(Tailwind class wired totokens.colors.navy800),tokens.colors.navy50for input text,Nunito_600SemiBold13px (matches the body weight loaded inapp/_layout.tsx;Nunito_500Mediumis not loaded).editingIsrcis keyed by ISRC, so year-override edits still apply correctly to filtered-out cards. PDF export and drops state are untouched.hasDrops(the existingdroppedCount > 0semantics) — only theListHeaderComponentwrapper is now always rendered (to host the search input).Test plan
npm run typecheckcleannpm run lintcleannpm test— 143/143 passingNo cards match "..."row appears.