Conversation
|
Visit the studio preview URL for this PR 🚀 : https://950.artist.preview.newm.io/ |
There was a problem hiding this comment.
Pull request overview
This PR implements feature-flagged blocking of new release and track creation flows when distribution and Stream Token sales are disabled. It disables the "Create New Release" button with a tooltip explanation, blocks direct URL navigation to creation routes via redirects, and adjusts the Create Profile page layout to accommodate a fixed banner on desktop.
Changes:
- Disabled "Create New Release" button with tooltip showing official statement CTA when flag is enabled
- Added route guards to redirect users from upload-song, new release, and new track routes to /home/releases
- Added conditional top margin to Create Profile page on desktop to clear fixed banner
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/studio/src/pages/home/releases/Discography.tsx | Replaces "Create New Release" link with disabled Box wrapped in Tooltip when flag is on; reorganizes imports |
| apps/studio/src/pages/home/releases/Releases.tsx | Adds route guards to block new release and new track routes, redirecting to /home/releases when flag is enabled |
| apps/studio/src/pages/home/Home.tsx | Adds route guard to block upload-song route, redirecting to /home/releases when flag is enabled |
| apps/studio/src/pages/createProfile/CreateProfile.tsx | Adds conditional marginTop on desktop when banner is shown to prevent content overlap; reorganizes imports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <Tooltip title={ <OfficialStatementCTA /> }> | ||
| <Box | ||
| aria-label="Create New Release" | ||
| component="span" | ||
| sx={ { | ||
| cursor: "not-allowed", | ||
| textDecoration: "none", | ||
| } } | ||
| > | ||
| <GradientDashedOutline sx={ { padding: 3 } }> | ||
| <IconMessage icon={ <AddSong /> } message="Create New Release" /> | ||
| </GradientDashedOutline> | ||
| </Box> |
There was a problem hiding this comment.
The disabled "Create New Release" button implementation may have an accessibility issue. When using a Box with cursor: not-allowed instead of a disabled button, screen readers may not announce that the element is disabled. Consider using an aria-disabled="true" attribute on the Box, or adding role="button" along with aria-disabled="true" to ensure assistive technologies properly communicate the disabled state to users. Also note that MUI Tooltip may not show on keyboard focus for non-interactive elements, so keyboard users might not see the explanation.
Pull Request — Issue STUD-576
Overview
Files Summary
Modified (4)
apps/studio/src/pages/createProfile/CreateProfile.tsxmt: webStudioDisableDistributionAndSales && isDesktop ? 4 : 0on the rootBoxso the create-profile wizard content clears the fixed banner. UsesuseFlags()forwebStudioDisableDistributionAndSalesanduseBreakpoint()forisDesktop.apps/studio/src/pages/home/releases/Discography.tsxwebStudioDisableDistributionAndSalesis on, the "Create New Release" control is no longer a link: it is rendered as a non-clickableBox(span) withcursor: not-allowed, wrapped in a MUITooltipwhose title is the existingOfficialStatementCTAcomponent (message + link to official statement). When the flag is off, behavior is unchanged (link to/home/releases/newor/home/upload-songdepending onwebStudioAlbumPhaseTwo). AddedwebStudioDisableDistributionAndSalesfromuseFlags()andOfficialStatementCTAimport.apps/studio/src/pages/home/releases/Releases.tsxwebStudioDisableDistributionAndSalesis on,new/*,new/track/new, and:releaseId/track/newrender<Navigate to="/home/releases" replace />instead ofReleaseDetailsorNewTrack. This blocks creating new releases and adding new tracks via URL. AddedNavigateimport andwebStudioDisableDistributionAndSalesfromuseFlags(). TODO comment added for flag retirement.apps/studio/src/pages/home/Home.tsxupload-song/*route is gated: whenwebStudioDisableDistributionAndSalesis on, users are redirected to/home/releasesinstead of theUploadSongpage. When the flag is off, the route behaves as before.Impact
/home/releasesso they cannot start new distribution flows.marginTop(4 theme units) on desktop when the banner is shown so the wizard is not hidden under the fixed banner.webStudioDisableDistributionAndSales. No change when the flag is off.OfficialStatementCTAcomponent and LaunchDarkly flags; no new dependencies.Testing
webStudioDisableDistributionAndSaleson: "Create New Release" is disabled and shows tooltip with official statement CTA; visiting/home/upload-song,/home/releases/new,/home/releases/new/track/new, or/:releaseId/track/newredirects to/home/releases; Create Profile page has extra top margin on desktop so content clears the banner.replaceso back button is not stuck in a loop; Create Profile layout on desktop with banner on looks correct.Demo
Related Issues
Dependencies
No new dependencies.
Additional Notes
webStudioDisableDistributionAndSalesandwebStudioAlbumPhaseTwoonce flags are removed.OfficialStatementCTAis reused from the studio app (e.g. STUD-575); no new CTA component in this PR.--END--