Uh oh!
There was an error while loading. Please reload this page.
[C-4600] Update tile action buttons for owners - #9063
Conversation
|
| } | ||
| // Publish track | ||
| if (contentId && contentType === 'track') { | ||
| dispatch(makeTrackPublic(contentId)) |
There was a problem hiding this comment.
Copied the action that we use on web
| setDismissToastKey(dismissToastKey) | ||
| if (contentId && contentType === 'playlist') { | ||
| dispatch(publishPlaylist(contentId, dismissToastKey)) |
There was a problem hiding this comment.
Pre-existing logic in native. It already handled dismissing the toast inside the saga
| useEffect(() => { | ||
| if ( | ||
| dismissToastKey && | ||
| contentType === 'track' && | ||
| previousIsPublishingTrack === true && | ||
| currentTrack?._is_publishing === false | ||
| ) { | ||
| dispatch(manualClearToast({ key: dismissToastKey })) | ||
| } | ||
| }, [ | ||
| contentType, | ||
| currentTrack, | ||
| currentTrack?._is_publishing, | ||
| dismissToastKey, | ||
| dispatch, | ||
| previousIsPublishingTrack | ||
| ]) |
There was a problem hiding this comment.
Rather than create a new saga to manage the side effect of dismissing the toast, I decided to just borrow the logic on web that checks _is_publishing and manage it here
audius-infra
commented
Jul 8, 2024
Preview this change https://demo.audius.co/rt-owner-actions |
dylanjeffers
left a comment
There was a problem hiding this comment.
Wow so many changes, good refactor!
| onClickShare={onClickShare} | ||
| /> | ||
| ) : ( | ||
| <ViewerActionButtons |
There was a problem hiding this comment.
One day we can prevent the prop drilling
| export type PublishContentModalState = { | ||
| contentId: Nullable<ID> | ||
| contentType: Nullable<'playlist' | 'album' | 'track'> |
There was a problem hiding this comment.
we should pull out this type somewhere eventually huh? feel like we've been using this a lot. but no need for this PR.
| const previousIsPublishingTrack = usePrevious(currentTrack?._is_publishing) | ||
| // (Tracks only) - Check for changes to is_publishing to dismiss the toast |
There was a problem hiding this comment.
Yea still relevant, I explained it in the comment I posted; the playlist saga dismisses the toast, whereas for tracks I did it in-component
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dharit-tan
left a comment
There was a problem hiding this comment.
awesome work, thanks for carrying this to the finish line!
audius-infra
commented
Jul 9, 2024
Preview this change https://demo.audius.co/rt-owner-actions |
[1f9aa7a] Allow gated content to be added to playlist (#9120) Reed [4e71814] [C-4646] Fix stream_conditions optimistic update on track edit (#9119) Reed [b1acbe6] Fix Track more results page in search v1 (#9117) Sebastian Klingler [c3b4cfc] [C-4714] Disallow share/add to playlist for hidden tracks (#9113) Reed [339a157] Nav to edit page instead of edit modal from track tile (#9114) Reed [d188ceb] [C-4725] Edit Collection Page QA (#9106) Dylan Jeffers [99b665f] [C-4658] Add filter-button clear (#9112) Dylan Jeffers [775163f] [C-4711] Hide play/repost stats for hidden content (#9102) Reed [ce4b844] [PAY-3130] Update most of LeftNav styling to match current conventions (#9058) Randy Schott [16aeec1] [C-4743] Update recent searches to display contextual items on web and mobile (#9099) Kyle Shanks [db6df4e] [C-4733, C-4738] Update mobile profile, album, and playlist search results to have consistent background and scroll padding (#9105) Kyle Shanks [cc38110] [C-4747] Update track edit form to only display key and bpm field in the edit flow (#9104) Kyle Shanks [552f617] [C-4595] Fix addEntries call in asCache reducers (#9101) Andrew Mendelsohn [cca8b42] Fixes issue where audius-query force was not respected (#9084) Dylan Jeffers [b2b7a35] [C-4735, C-4678] Add popover and fix close icon for recent searches (#9100) Kyle Shanks [f01fc40] [C-4666] Update skeleton counts for new search results (#9097) Kyle Shanks [8272335] [C-4751, C-4746, C-4663] Add better validation for bpm inputs (#9096) Kyle Shanks [3d7f0e3] [PAY-3140] Allow freely editing track/album access gate (#9079) Saliou Diallo [8cab62a] [C-4669] Update new search page to maintain common filters between categories (#9092) Kyle Shanks [f522fa7] [C-4697] Add loading states for the mobile search results (#9088) Kyle Shanks [a9c446b] [C-4726] Fix recent searches (#9087) Sebastian Klingler [f2b38d3] Lint fixes (#9085) Sebastian Klingler [1e15f91] [C-4722[ Put Profiles category before Tracks (#9080) Sebastian Klingler [93ff986] [C-4696] Mobile button QA (#9082) Dylan Jeffers [04f0ed4] [QA-1430] Fix duplicate trending playlist (#9083) Raymond Jacobson [a92c94d] [C-4724] Fix signup/in with metamask (#9081) Andrew Mendelsohn [fc28d90] [C-4700] Mobile tag search (#9075) Sebastian Klingler [5c066ea] [C-4600] Update tile action buttons for owners (#9063) JD Francis [b9c54d4] Make view content button large on mobile purchase success (#9076) Reed [39307ed] Fix web tag search for search v1 and v2 (#9069) Sebastian Klingler [b32a27f] [C-4591] Edit key/bpm on mobile (#9062) Sebastian Klingler [5793b2d] [PAY-3132] Manager Mode Modal Movement Mending (#9074) Randy Schott [df17bd3] [C-4703] Update FilterButton to remove controlled value (#9073) Kyle Shanks [b42e40a] [C-4589] Add links from track tile screen to search screen (#9071) Kyle Shanks [fdaeeb5] [PAY-3154] Fix accidental refresh on removing managers (#9066) Randy Schott [1b8449f] Fix unlocked premium content label color (#9070) Reed [5fd06d6] [PAY-3090] Add priority fees to SDK transactions (opt in) (#8718) Marcus Pasell [0341cfc] [C-4702] Add empty states for mobile search results and fix track search request (#9061) Kyle Shanks [7d47c6f] [PAY-3150][PAY-3158] Exclude playlists with only hidden tracks from feed/explore/trending and update library (#9034) Saliou Diallo [032ee43] Respect schema key arrays (#9064) Andrew Mendelsohn [92d4d81] [PAY-3156] Fix Rewards Claiming Analytics (#9024) Marcus Pasell [8d6881e] [C-4630] Update Confirm Modal copy (#9041) Andrew Mendelsohn [7d09a42] [C-4651] Fix stems upload refetch bug (#9055) Dylan Jeffers [f8ea43a] [C-4684] Fix edit-collection width (#9053) Dylan Jeffers [054a384] Fix libs track validation (#9059) Dylan Jeffers [9df3b75] [QA-1426] Fix audius-query array normalization (#9060) Andrew Mendelsohn [d54806b] [QA-1419] Fix twitter/instagram oauth exiting early (#9057) Andrew Mendelsohn [c1f7e7e] Fix mobile single-OTP signup (#9056) Reed [3392371] Hide 0 stats on mobile collection screens (#9054) Reed [d84e2f7] [C-4695] Fix remix field visibility (#9049) Dylan Jeffers [81b47cf] [C-4647] Fix license type (#9048) Dylan Jeffers [7fff6ef] [C-4594] Fix user-generated-text links (#9050) Dylan Jeffers [bad088a] PROTO-1866: merge change email and post auth into one route (#9028) alecsavvy [f41874e] Bump mobile versions to 106 (#9047) Dylan Jeffers [e5c4ec3] [C-46916] Fix Block API Streaming (#9044) Dylan Jeffers [390c13d] [C-4650] Fix visibility field when released scheduled release (#9043) Dylan Jeffers [03f9dc0] Patch paginated query bug (#9046) Raymond Jacobson [760165e] Fix condition for adding hidden track to playlist (#9045) Isaac Solo
NOTE: This work was tag-teamed between myself and Reed. There is a bit of PR history in: #9003
Description
Owners now see "edit" and "publish" buttons on tiles of tracks & collections (on both web & native)
Changes:
BottomRowcomponent on web in favor of two componentsViewerActionButtonsandOwnerActionButtonsPublishPlaylistModalinto a more genericPublishContentModalfor both tracks & collections.ReleaseNowConfirmationDrawerto consolidate into this new oneHow Has This Been Tested?
web:stage & ios:stage