feat(genre-tree): add genre search with select-to-highlight - #97
Merged
Merged
Conversation
Adds a search box to GenreTreeView for finding a genre by name and selecting it, which fetches its detail and highlights the matching node across all tree renderers (per-root, wheel, radial pop-core). Also bumps the @behindthemusictree/genre-tree-view catalog pin to 1.7.0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
GenreTreeViewso users can find a genre by name and select it directly, instead of only navigating the tree/wheel by hand.@behindthemusictree/genre-tree-viewcatalog pin to 1.7.0.Changes
GenreSearchcomponent (packages/app-kit/src/genre-tree/GenreSearch.tsx) — a search input with a results dropdown, exported fromgenre-tree's barrel.searchGenrePlaylistsByNamehelper (packages/app-kit/src/genre-tree/lib/genre-search.ts) — case-insensitive substring match on genre name.GenreTreeViewwires the search box in, tracking aselectedNodeIdalongside the existingselectedGenreUuidso a search selection highlights the matching node the same way a tree click does.TreePerRoot,TreeWheel, andTreeWheelRadialPopCoreeach gained aselectedNodeIdprop, passed through to the underlyinggenre-tree-viewrenderer for highlighting.pnpm-workspace.yaml:@behindthemusictree/genre-tree-viewcatalog pin 1.6.1 → 1.7.0 (lockfile updated accordingly).CHANGELOG.md: added entries under[Unreleased]for the search feature and the catalog bump.Test plan
GenreSearch.test.tsx: renders no results before typing, filters as the user types, callsonSelecton a result click, clears the query after selection.lib/genre-search.test.ts: empty/whitespace query, case-insensitive match, substring match, no-match case.GenreTreeView.test.tsx: selecting a search result updates the info panel the same way a node click does, andselectedNodeIdis passed through to the active tree renderer for highlighting.pnpm --filter @behindthemusictree/app-kit testpasses.🤖 Generated with Claude Code