Add host remix contest page#14151
Merged
Merged
Conversation
Scaffolds a full-page replacement for HostRemixContestModal at
/:handle/:slug/host-contest. First pass matches the Figma layout with
every form section in place; a few integrations are stubbed for a
follow-up pass (called out inline in the code).
What's wired:
- New route HOST_REMIX_CONTEST_PAGE + web helper hostRemixContestPage.
Registered once in WebPlayer (same Route group as CONTEST_PAGE).
- HostRemixContestPage migrates the modal's Description / Prizes /
Deadline (Date + Time + AM/PM) state + validation + submit, plus
the delete ("Turn off contest") action when no submissions exist.
- New form sections per the Figma: Title, Video Link, Cover Photo,
Source Tracks list. Title / Video URL / Cover Photo URL persist as
extra keys on the existing eventData JSON blob — no backend schema
change. sourceTrackIds stored in eventData as well; entity_id still
points at the primary track.
- Cover Photo preview falls back to the primary track's artwork when
no per-contest cover is set.
- Source Tracks list renders each row with artwork + title + display
name + kebab menu. Remove works; Visit/Edit/Manage Stems are the
two Chunk-2 integrations.
- TrackMenu "Host / Edit Remix Contest" and ContestPage's Edit
Contest button both navigate to the new page; they fall back to
the legacy modal if no permalink is available.
What's stubbed (Chunk 2):
- Real Cover Photo upload (mediorum). Today the page exposes a URL
text field as a stop-gap.
- Add Source Track search modal — "+ Add Track" button is a no-op.
- Manage Stems modal opened from the source-track kebab.
- Save Draft — disabled until a draft backend exists.
HostRemixContestModal is intentionally left in place as a fallback
and for the mobile overflow-menu drawer which hasn't migrated yet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fills in the integrations that Chunk 1 stubbed. The page now shipped: - useUploadContestCover: uploads a cover-photo File via sdk.services.storage with the img_backdrop template (same pattern as useUpdateFanClub / useLaunchCoin's banner upload), resolves the CID against the current content-node endpoint, and returns a URL the form persists in eventData.coverPhotoUrl. Drag-and-drop + click-to-browse are wired; the placeholder URL text field is gone. While uploading the drop-zone shows a spinner and the cursor flips to wait. - AddSourceTrackModal: multi-select picker hitting useUserTracksByHandle for the signed-in user's catalog (filterTracks='all', limit=200). Client-side search over the fetched list. "View Selection" toggles a selected-only filter. Done passes the merged ID set back to the page. Cancel / X close without committing. - ManageStemsModal: opened from the source-track kebab. Toggles is_downloadable, surfaces the Public / Followers / Premium availability segmented control, and saves directly against the track via useUpdateTrack — no per-contest override. Additional stem-file upload is called out as coming from the track edit page (separate flow). Seeds state from the track on open so the modal reflects whatever the current is_downloadable / download_conditions are. - SourceTrackRow: kebab items Visit Track and Edit Track navigate to `permalink` and `permalink/edit` respectively. Manage Stems opens the modal for that row's trackId. Remove is unchanged. Chunk 1's "+ Add Track" is now live, the kebab items are all hooked up, and the cover-photo field uploads to the CDN. Save Draft is still disabled (no draft model). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SourceTrackRow was showing "No Stems" / "0 Stems" based purely on the track's is_downloadable flag. Swap to useStems(sourceTrackId) so the badge reflects the actual number of stem tracks: - "5 Stems" when there are stems - "No Stems" when the fetch resolves with an empty list - (blank) while the query is still pending — avoids a flash of "No Stems" on tracks that turn out to have several. useStems is TanQuery-backed so repeated rows reuse the warm slot; the cache also primes individual stem tracks via primeTrackData, which helps downstream screens (e.g. stems detail modals) render without refetching. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14151.audius.workers.dev Unique preview for this PR (deployed from this branch). |
6 tasks
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.
No description provided.