Skip to content

[STUD-576][Enhancement]: Disable Create New Release button, implement tooltip and block routes#950

Merged
ITurres merged 4 commits intomasterfrom
STUD-576-Disable-Create-New-Release-button-and-implement-tooltip-2
Feb 13, 2026
Merged

[STUD-576][Enhancement]: Disable Create New Release button, implement tooltip and block routes#950
ITurres merged 4 commits intomasterfrom
STUD-576-Disable-Create-New-Release-button-and-implement-tooltip-2

Conversation

@ITurres
Copy link
Member

@ITurres ITurres commented Feb 12, 2026

Pull Request — Issue STUD-576

Overview

This PR disables the "Create New Release" action and all related "new" flows (new release, new track) when distribution and Stream Token sales are disabled, and shows an official statement CTA in a tooltip on the disabled button.
Context: When webStudioDisableDistributionAndSales is enabled, users must not start new releases or add new tracks. The button stays visible but is non-clickable, and a tooltip explains the change and links to the official statement. Direct navigation to /home/upload-song, /home/releases/new, and new-track routes is redirected to /home/releases. Create Profile gets conditional margin-top on desktop so content clears the fixed banner when the flag is on.


Files Summary

Total Changes: 4 files
(Counts of added, modified, and deleted files can be seen in the PR diff view.)

Modified (4)
  • apps/studio/src/pages/createProfile/CreateProfile.tsx

    • — Conditional margin-top when the service disruption banner is shown on desktop: mt: webStudioDisableDistributionAndSales && isDesktop ? 4 : 0 on the root Box so the create-profile wizard content clears the fixed banner. Uses useFlags() for webStudioDisableDistributionAndSales and useBreakpoint() for isDesktop.
  • apps/studio/src/pages/home/releases/Discography.tsx

    • — When webStudioDisableDistributionAndSales is on, the "Create New Release" control is no longer a link: it is rendered as a non-clickable Box (span) with cursor: not-allowed, wrapped in a MUI Tooltip whose title is the existing OfficialStatementCTA component (message + link to official statement). When the flag is off, behavior is unchanged (link to /home/releases/new or /home/upload-song depending on webStudioAlbumPhaseTwo). Added webStudioDisableDistributionAndSales from useFlags() and OfficialStatementCTA import.
  • apps/studio/src/pages/home/releases/Releases.tsx

    • — Route guards for distribution-related flows: when webStudioDisableDistributionAndSales is on, new/*, new/track/new, and :releaseId/track/new render <Navigate to="/home/releases" replace /> instead of ReleaseDetails or NewTrack. This blocks creating new releases and adding new tracks via URL. Added Navigate import and webStudioDisableDistributionAndSales from useFlags(). TODO comment added for flag retirement.
  • apps/studio/src/pages/home/Home.tsx

    • — The upload-song/* route is gated: when webStudioDisableDistributionAndSales is on, users are redirected to /home/releases instead of the UploadSong page. When the flag is off, the route behaves as before.

Impact

  • Releases / Discography: When distribution is disabled, "Create New Release" is visible but disabled and shows the official statement CTA in a tooltip, so users understand why and where to read more.
  • Routing: Direct access to upload-song, new release, and new track routes is blocked when the flag is on; users are sent to /home/releases so they cannot start new distribution flows.
  • Layout: Create Profile page uses conditional marginTop (4 theme units) on desktop when the banner is shown so the wizard is not hidden under the fixed banner.
  • Feature flag: All behavior is behind webStudioDisableDistributionAndSales. No change when the flag is off.
  • Dependencies: Uses existing OfficialStatementCTA component and LaunchDarkly flags; no new dependencies.

Testing

  • With webStudioDisableDistributionAndSales on: "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/new redirects to /home/releases; Create Profile page has extra top margin on desktop so content clears the banner.
  • With the flag off: "Create New Release" works as before; all above routes render their normal content; Create Profile has no extra margin.
  • Manual check: tooltip opens on hover; link in tooltip opens in new tab; redirects use replace so back button is not stuck in a loop; Create Profile layout on desktop with banner on looks correct.

Demo

STUD-576-demo STUD-576-demo-2

Related Issues


Dependencies

No new dependencies.


Additional Notes

  • TODOs in code reference retiring webStudioDisableDistributionAndSales and webStudioAlbumPhaseTwo once flags are removed.
  • OfficialStatementCTA is reused from the studio app (e.g. STUD-575); no new CTA component in this PR.

--END--

@ITurres ITurres self-assigned this Feb 12, 2026
@ITurres ITurres requested a review from a team as a code owner February 12, 2026 21:14
@ITurres ITurres requested a review from Copilot February 12, 2026 21:17
@github-actions
Copy link

Visit the studio preview URL for this PR 🚀 : https://950.artist.preview.newm.io/

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 44 to 56
<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>
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outdated.

@ITurres ITurres changed the title [STUD-576][Enhancement]: Disable Create New Release button and implement tooltip [STUD-576][Enhancement]: Disable Create New Release button, implement tooltip and block routes Feb 13, 2026
Copy link
Contributor

@dmkirshon dmkirshon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ITurres ITurres merged commit 4a76cd8 into master Feb 13, 2026
2 checks passed
@ITurres ITurres deleted the STUD-576-Disable-Create-New-Release-button-and-implement-tooltip-2 branch February 13, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants