Skip to content

Commit

Permalink
Remove legacy edit track (#9323)
Browse files Browse the repository at this point in the history
  • Loading branch information
amendelsohn authored Jul 31, 2024
1 parent 11f0ed5 commit f404f01
Show file tree
Hide file tree
Showing 26 changed files with 16 additions and 3,040 deletions.
2 changes: 0 additions & 2 deletions packages/common/src/services/remote-config/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export enum FeatureFlags {
MANAGER_MODE = 'manager_mode',
SEARCH_V2 = 'search_v2',
PAYOUT_WALLET_ENABLED = 'payout_wallet_enabled',
EDIT_TRACK_REDESIGN = 'edit_track_redesign',
SKIP_STREAM_CHECK = 'skip_stream_check',
PREFETCH_STREAM_URLS = 'prefetch_stream_urls',
HIDDEN_PAID_SCHEDULED = 'hidden_paid_scheduled',
Expand Down Expand Up @@ -129,7 +128,6 @@ export const flagDefaults: FlagDefaults = {
[FeatureFlags.MANAGER_MODE]: false,
[FeatureFlags.SEARCH_V2]: false,
[FeatureFlags.PAYOUT_WALLET_ENABLED]: false,
[FeatureFlags.EDIT_TRACK_REDESIGN]: false,
[FeatureFlags.SKIP_STREAM_CHECK]: false,
[FeatureFlags.PREFETCH_STREAM_URLS]: false,
[FeatureFlags.HIDDEN_PAID_SCHEDULED]: false,
Expand Down
25 changes: 0 additions & 25 deletions packages/common/src/store/ui/modals/edit-track-modal/index.ts

This file was deleted.

33 changes: 0 additions & 33 deletions packages/common/src/store/ui/modals/edit-track-modal/selectors.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/common/src/store/ui/modals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export * from './inbox-unavailable-modal'
export * from './usdc-purchase-details-modal'
export * from './usdc-transaction-details-modal'
export * from './withdraw-usdc-modal'
export * from './edit-track-modal'
export * from './premium-content-purchase-modal'
export * from './usdc-manual-transfer-modal'
export * from './add-funds-modal'
Expand Down
2 changes: 0 additions & 2 deletions packages/common/src/store/ui/modals/reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { artistPickModalReducer } from './artist-pick-modal'
import { coinflowOnrampModalReducer } from './coinflow-onramp-modal'
import { coinflowWithdrawModalReducer } from './coinflow-withdraw-modal'
import { createChatModalReducer } from './create-chat-modal'
import { editTrackModalReducer } from './edit-track-modal'
import { inboxUnavailableModalReducer } from './inbox-unavailable-modal'
import { leavingAudiusModalReducer } from './leaving-audius-modal'
import parentReducer, { initialState } from './parentSlice'
Expand Down Expand Up @@ -34,7 +33,6 @@ const noOpReducers = Object.keys(initialState).reduce((prev, curr) => {
*/
const combinedReducers = combineReducers({
...noOpReducers,
EditTrack: editTrackModalReducer,
CreateChatModal: createChatModalReducer,
InboxUnavailableModal: inboxUnavailableModalReducer,
LeavingAudiusModal: leavingAudiusModalReducer,
Expand Down
2 changes: 0 additions & 2 deletions packages/common/src/store/ui/modals/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { AlbumTrackRemoveConfirmationModalState } from './album-track-remove-con
import { ArtistPickModalState } from './artist-pick-modal'
import { CoinflowOnrampModalState } from './coinflow-onramp-modal'
import { CoinflowWithdrawModalState } from './coinflow-withdraw-modal'
import { EditTrackModalState } from './edit-track-modal'
import { InboxUnavailableModalState } from './inbox-unavailable-modal'
import { LeavingAudiusModalState } from './leaving-audius-modal'
import { PremiumContentPurchaseModalState } from './premium-content-purchase-modal'
Expand Down Expand Up @@ -96,7 +95,6 @@ export type BasicModalsState = {
export type StatefulModalsState = {
CoinflowOnramp: CoinflowOnrampModalState
CreateChatModal: CreateChatModalState
EditTrack: EditTrackModalState
InboxUnavailableModal: InboxUnavailableModalState
LeavingAudiusModal: LeavingAudiusModalState
WithdrawUSDCModal: WithdrawUSDCModalState
Expand Down
46 changes: 10 additions & 36 deletions packages/web/src/app/web-player/WebPlayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,8 @@ class WebPlayer extends Component {
}

render() {
const {
incrementScroll,
decrementScroll,
userHandle,
isSearchV2Enabled,
isEditTrackRedesignEnabled
} = this.props
const { incrementScroll, decrementScroll, userHandle, isSearchV2Enabled } =
this.props

const {
showWebUpdateBanner,
Expand Down Expand Up @@ -503,7 +498,6 @@ class WebPlayer extends Component {
to={{ pathname: getPathname({ pathname: '' }) }}
/>
))}

<Route
exact
path={'/fb/share'}
Expand Down Expand Up @@ -710,7 +704,6 @@ class WebPlayer extends Component {
)
}}
/>

<DesktopRoute
path={UPLOAD_ALBUM_PAGE}
isMobile={isMobile}
Expand All @@ -728,7 +721,6 @@ class WebPlayer extends Component {
<UploadPage {...props} scrollToTop={this.scrollToTop} />
)}
/>

<Route
exact
path={[SAVED_PAGE, LIBRARY_PAGE]}
Expand Down Expand Up @@ -853,10 +845,8 @@ class WebPlayer extends Component {
isMobile={isMobile}
render={() => <SettingsPage subPage={SubPage.ABOUT} />}
/>

<Route path={APP_REDIRECT} component={AppRedirectListener} />
<Route exact path={NOT_FOUND_PAGE} component={NotFoundPage} />

<Route
exact
path={PLAYLIST_PAGE}
Expand All @@ -866,21 +856,18 @@ class WebPlayer extends Component {
)
}}
/>

<Route
exact
path={[EDIT_PLAYLIST_PAGE, EDIT_ALBUM_PAGE]}
component={EditCollectionPage}
/>

<Route
exact
path={ALBUM_PAGE}
render={({ location }) => (
<CollectionPage key={location.pathname} type='album' />
)}
/>

{/* Hash id routes */}
<Route
exact
Expand All @@ -898,7 +885,6 @@ class WebPlayer extends Component {
path={PLAYLIST_ID_PAGE}
component={CollectionPage}
/>

{/*
Define profile page sub-routes before profile page itself.
The rules for sub-routes would lose in a precedence fight with
Expand Down Expand Up @@ -926,21 +912,14 @@ class WebPlayer extends Component {
path={PROFILE_PAGE_AI_ATTRIBUTED_TRACKS}
component={AiAttributedTracksPage}
/>

<Route exact path={TRACK_PAGE} component={TrackPage} />

{isEditTrackRedesignEnabled ? (
<DesktopRoute
path={TRACK_EDIT_PAGE}
isMobile={isMobile}
render={(props) => (
<EditTrackPage
{...props}
scrollToTop={this.scrollToTop}
/>
)}
/>
) : null}
<DesktopRoute
path={TRACK_EDIT_PAGE}
isMobile={isMobile}
render={(props) => (
<EditTrackPage {...props} scrollToTop={this.scrollToTop} />
)}
/>

<Route
exact
Expand All @@ -952,7 +931,6 @@ class WebPlayer extends Component {
/>
)}
/>

<MobileRoute
exact
path={REPOSTING_USERS_ROUTE}
Expand Down Expand Up @@ -1005,7 +983,6 @@ class WebPlayer extends Component {
/>
)}
/>

<Redirect
from={HOME_PAGE}
to={{
Expand Down Expand Up @@ -1057,10 +1034,7 @@ const mapStateToProps = (state) => ({
accountStatus: getAccountStatus(state),
signOnStatus: getSignOnStatus(state),
showCookieBanner: getShowCookieBanner(state),
isSearchV2Enabled: getFeatureEnabled(FeatureFlags.SEARCH_V2),
isEditTrackRedesignEnabled: getFeatureEnabled(
FeatureFlags.EDIT_TRACK_REDESIGN
)
isSearchV2Enabled: getFeatureEnabled(FeatureFlags.SEARCH_V2)
})

const mapDispatchToProps = (dispatch) => ({
Expand Down
7 changes: 1 addition & 6 deletions packages/web/src/common/store/cache/tracks/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,7 @@ function* editTrackAsync(action: ReturnType<typeof trackActions.editTrack>) {
}
}

const getFeatureEnabled = yield* getContext('getFeatureEnabled')
const isEditTrackRedesignEnabled = yield* call(
getFeatureEnabled,
FeatureFlags.EDIT_TRACK_REDESIGN
)
if (isEditTrackRedesignEnabled && track.stems) {
if (track.stems) {
const inProgressStemUploads = yield* select(
getCurrentUploads,
track.track_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type AiAttributionModalProps = Omit<ModalProps, 'children'> & {
onChange: (aiAttributedUserId: ID) => void
}

// TODO: this is not being used anymore. Should we add it to edit page or remove it?
export const AiAttributionModal = (props: AiAttributionModalProps) => {
const { isOpen, onClose, onChange } = props
const [isAttributable, toggleIsAttributable] = useToggle(false)
Expand Down
Loading

0 comments on commit f404f01

Please sign in to comment.