-
Notifications
You must be signed in to change notification settings - Fork 123
[PE-6063] Deprecate audius-query collection.ts #11976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
| > | ||
| > | ||
| | undefined | ||
| content: Nullable<PartialTrack> | Nullable<PartialCollection> | undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
|
|
||
| const isTrack = isContentTrack(content) | ||
| const isCollection = isContentCollection(content) | ||
| const isTrack = isContentPartialTrack<PartialTrack>(content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why we couldn't just typeguard content to a full track? but this is the old code so nbd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm intentionally only selecting whatever args are needed for the track to avoid unnecessary rerenders from the query hook.
I re-did this because typecasting to a full Track is incorrect here since only parts of the track metadata exist here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its an optimization pattern with tan-query that we're going to be doing a lot more of so this isPartialXYZ is something I'll likely use a lot more 😄
| pauseTrack | ||
| ]) | ||
|
|
||
| const collectionExists = !!collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe don't need this var
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can add a comment - I added this so that the only arg in the deps array is a boolean instead of the full collection (since we're just checking for truthy anyways)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oic that's cool
| const numTracks = collection.playlist_contents?.track_ids?.length ?? 0 | ||
| created_at: createdAt, | ||
| playlist_contents: playlistContents | ||
| } = collectionMetadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't fully understand where createdAt, playlistContents were initialized.. but ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initialized? not sure I follow - these are on the metadata of the collection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my b plz ignore
dharit-tan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great stuff
…jd/dep-aquery-collections
[3d7d0d6] [PE-6085] Remix contest started notification (#12021) Reed [3d11415] Update to use pin icon (#12025) Farid Salau [bb4b6e5] [PE-6059] Deprecate audius-query purchases.ts (#12007) JD Francis [aa9ba24] Add global sentry error logging for tan-query (#11998) JD Francis [45ce478] Add merged search / explore page (#12016) Isaac Solo [7c6979e] Fallback to null instead of 0 (#12014) Farid Salau [e5be565] Update UserLinks to correctly contain and center text (#12013) KJ [984be7a] Misc upload improvements (#12008) Ray Jacobson [e67d435] [PE-6118] Fix view all submissions sometimes showing wrong parent track (#12006) Reed [a2e7b7f] [PE-6115] Fix submissions label wrap on mobile remix contest section (#12002) Reed [e0cfb31] [PE-6119] Mobile remix submission navigation.push (#12005) Reed [e57b460] [PE-6116] Fix TextInput placeholder text too light (#12003) Reed [ef7a9f3] [QA-2084] Small fixes for UserLinks and bedges (#12001) KJ [aed1e89] Revert "Add react-devtools to mobile (#11996)" (#12004) Dylan Jeffers [6066cda] Mobile remix section submission artwork pressable (#12000) Reed [7fb503d] Don't show PlayBarChin in mobile remix parent lineup (#11997) Reed [12e8505] [PE-6052] Deprecate user hooks from audius-query (#11992) JD Francis [68af6dc] Add react-devtools to mobile (#11996) Dylan Jeffers [fc0f6e8] Fix tooltip on cash wallet component (#11995) Farid Salau [53b2a10] [PE-6107][PE-6104][PE-6102][PE-6101][PE-6100][PE-6099] Fix bugs found in QA for m1 wallet UI (#11987) Farid Salau [7685ca3] Allow off curve accounts in USDC withdrawal (#11993) Marcus Pasell [70c8c20] [PE-6103] Add colorSecondary option to icons, Fix verified and flair (#11990) Dylan Jeffers [1b0f161] Change submissions tab formatting (#11988) KJ [6acff10] Fix earn 5 purchase flow message on mobile (#11986) Reed [36bef84] [PE-6063] Deprecate audius-query collection.ts (#11976) JD Francis [18be409] Fix mobile remix contest prizes tab sometimes not appearing (#11984) Reed [a4b8cd9] Horizontal margins for mobile remix contest info header (#11983) Reed [b3b8fe0] [PE-5943] Tan query retry only on 400s (#11774) JD Francis [1c1371b] [PE-6076] Deprecate useGetUserTracksByHandle (a-query) (#11971) JD Francis [43fef98] Small fixes to submission tab styling (#11982) KJ [ae6f9f7] Fix main (#11981) Farid Salau [1035fe1] Use isPending instead of isLoading for balance loading state (#11978) Farid Salau [f24bb7f] Small mobile tweaks for m1 wallet page (#11975) Farid Salau [6c33a68] [PE-6075] Remove useGetTracksByIds from a-query (#11969) JD Francis [993773b] [PE-6094] Drop bitcode from pods (#11979) Dylan Jeffers [0979612] Add batching for events by entity ID (#11972) Isaac Solo [64de118] [PE-6090] Add upload warning to unsaved-changes-dialog (#11973) Dylan Jeffers [1341e31] Fix shadow on pay and earn page (#11942) Farid Salau [6b2a059] [PE-6051] Fix scrolling inside remix contest info (#11964) Dylan Jeffers [c64a609] Remove setUserId as email & stop calling identify on handle page (#11960) JD Francis [2b59cf1] Fix mobile-web track description (#11965) Reed [a7866ce] [PE-6074] Deprecate useGetTrackByPermalink from a-query (#11968) JD Francis [7787431] Add gap back to the submissions tab (#11967) KJ [1d52dfa] [PE-6077] Conditionally hide prizes tab in remix contest section (#11966) KJ [0fd51f5] [PE-6073] Migrate useTrackByTrackId to useTrack (#11950) JD Francis [aae9c9b] Reorganize query hooks (#11799) JD Francis [4964258] [PE-6069] Fix remix submissions names overflow (#11963) Reed [1c8446c] [PE-6078] Add borders to remix contest info and comment sections (#11959) KJ [67ea24b] Redux batch entity selector optimizations (#11941) JD Francis [adc2421] Fix contest sign center fill (#11962) Isaac Solo [11b6dd9] [PE-6071] Overflow: hidden on remix contest info section (#11961) Reed [8404bf8] [PE-6072] CollapsibleContent conditionally shows expand button (#11957) Reed [dc50104] [PE-6067] Update submission artwork to go to track page (#11956) KJ [6aeb767] [QA-2078] Fix mobile notification count (#11947) Dylan Jeffers [4e84849] Fix flair positioning on mobile (#11952) Isaac Solo [f8b90e7] [PE-5930, PE-6066] Upgrade react-native to 0.76.9 (#11955) Dylan Jeffers
Description
collection.tswith tan-query equivalentscollection.tsentirelyHow Has This Been Tested?
cursory web:stage - have plan to do heavier QA before this goes live