Skip to content

fix(genres): strip Electronic prefix from sub-genre display labels#14501

Merged
dylanjeffers merged 5 commits into
mainfrom
fix/genre-electronic-prefix-display
Jun 23, 2026
Merged

fix(genres): strip Electronic prefix from sub-genre display labels#14501
dylanjeffers merged 5 commits into
mainfrom
fix/genre-electronic-prefix-display

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Strip Electronic prefix from genre suggestion labels, trending filter pills, and quick search grid. Stored value unchanged. Display-only fix.

dylanjeffers and others added 4 commits June 18, 2026 11:33
…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>
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7182f3b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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>
@github-actions

Copy link
Copy Markdown
Contributor

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14501.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

@dylanjeffers dylanjeffers merged commit 2f97666 into main Jun 23, 2026
13 checks passed
@dylanjeffers dylanjeffers deleted the fix/genre-electronic-prefix-display branch June 23, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant