fix(genres): strip Electronic prefix from sub-genre display labels#14501
Merged
Conversation
…es API Replace the hardcoded trending genre list with the top genres ranked by recent activity, fetched from /v1/genres/popular. Adds a `usePopularGenres` tan-query hook (top 25, ~15min staleTime to match the backend cache TTL) that merges the ranked genres with the static list, deduped and popular-first. Trending genre filter (web desktop FilterButton, web mobile genre page, and the native mobile drawer) now shows the top ranked genres by default with a search field that reveals the long-tail static genres. Freeform/community genres are now selectable via `toTrendingGenreValue`, which (unlike `toTrendingGenre`) does not drop values outside the static GENRES list. Also surfaces the ranked genres in the Explore "Trending Genres" section (web + mobile) and powers the edit-track genre suggestions, all from the same hook. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
isValidGenre only validated against the static GENRES list, so a freeform genre in the URL (e.g. /trending?genre=Hyper+Pop) was dropped on load. Make it permissive — accept any non-empty value that isn't the ALL_GENRES sentinel — since canonical validation is now server-side via normalization. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-genre-filter # Conflicts: # packages/common/src/api/index.ts # packages/common/src/api/tan-query/queryKeys.ts # packages/common/src/utils/genres.ts
Electronic sub-genres like Trap, Techno, House were showing as
"Electronic - Trap" in the genre picker suggestion list, trending
genre filters, and quick search presets. The stored value was already
the short SDK form ('Trap'), so this is a display-only change.
- getStaticGenreSuggestions: strip prefix from suggestion label field
- TrendingGenreFilters: use genre value directly (not getCanonicalName)
- TrendingPageContent: use genre value directly (not getCanonicalName)
- QuickSearchGrid: use genre value directly (not getCanonicalName)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Fixes prettier/prettier lint error introduced when getCanonicalName was removed from the import in the genre display fix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14501.audius.workers.dev Unique preview for this PR (deployed from this branch). |
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.
Strip Electronic prefix from genre suggestion labels, trending filter pills, and quick search grid. Stored value unchanged. Display-only fix.