-
Notifications
You must be signed in to change notification settings - Fork 113
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
[C-5786] Update user comments endpoint and add user CommentHistoryPage #11427
Conversation
|
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.
looking awesome!!
|
||
const UserComment = ({ commentId }: { commentId: number }) => { | ||
const res = useGetCommentById(commentId) | ||
const comment = res.data as 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.
const {data: comment } = useGetCommentById
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.
Causing some type issues. I'm trying to fix bc it looks weird yea
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.
It looks like the Reply
type that can be returned from the hook doesn't include the entityId
/ entityType
fields.
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 an issue here, but this was causing a different issue so good callout
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
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.
Looks great!
Suggested some tan-query adoption opportunities
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM! Avail if you need any assistance wrangling those types!
@@ -3201,6 +3201,8 @@ def get(self, receiving_user_id, grantor_user_id): | |||
{ | |||
"id": fields.String(required=True), | |||
"user_id": fields.String(required=False), | |||
"entity_id": fields.String(required=True), | |||
"entity_type": fields.String(required=True), |
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.
Do you mind splitting the discovery/sdk changes into a separate PR and merging that first?
That way we can make sure it's on all nodes before shipping the SDK change that consumes the new fields.
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.
Also wondering if we should use an enum
for this similar to here
That way, the generated SDK types will show only those literals instead of a generic string
.
We may also want to write an extend_
helper for our response model and use it to lowercase the type when we serialize this model so it's 'track' | 'comment'
since we usually lowercase values like this.
packages/web/src/pages/comment-history/components/desktop/CommentHistoryPage.tsx
Outdated
Show resolved
Hide resolved
1ba7526
to
657161f
Compare
userId, | ||
currentUserId, | ||
export const useUserComments = ( | ||
userId: ID | null, |
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: A lot of the other modern tan-query hooks use an object for params instead of positional ones. Should probably follow that pattern? ({userId, pageSize}
)
[f7023af] [QA-1995] Fix manager mode dropdown rendering off screen (#11442) Randy Schott [b250f91] Re-enable redux cache sync to tan-query (#11441) Andrew Mendelsohn [0868942] Remove hcaptcha from mobile (#11438) Reed [02fc876] [C-5796] Add empty state for comment history (#11436) KJ [ae6a324] [C-5786] Update user comments endpoint and add user CommentHistoryPage (#11427) KJ [1e7469f] [PAY-3953] Use db value for public key (#11391) Farid Salau [13f9ca0] [PAY-3858] Re-do challenge progress status label logic (#11429) Reed [f96aeec] Don't add computeLimit instruction to buyAudio flow swap (#11430) Marcus Pasell [5c595da] Custom component for web oneshot challenge (#11428) Reed [71768b4] [C-5674] Migrate notifications to tan-query (#11425) Dylan Jeffers [d881678] [C-5204] Fix android comment input clipping (#11386) Dylan Jeffers [99f5cd1] Fix batcher context resolver (#11426) Dylan Jeffers [67d4e5e] Refactor web challenge-rewards-modal (#11424) Dylan Jeffers [509c54e] Upgrade elliptic package to 6.6.1 (#11388) Dylan Jeffers [15a6c07] Misc fixes for mobile audio, usdc screens (#11422) Reed [17eef87] [C-5779] Update mobile profile layout (#11421) Randy Schott [bbf1bcf] Deprecate wallet.ts and formatUtils.ts functions in favor of FixedDecimal (#11423) Marcus Pasell [1896f71] [QA-1993] Fix suggested-artists UI overflow (#11420) Dylan Jeffers [2a9c257] Mobile reward notif navs to RewardsScreen, open drawer (#11419) Reed [9e75c9f] Fix reward panel ordering (#11418) Reed [be0c636] Remove one shot and listen streak feature flags (#11416) Reed [52201bf] Fix crash from `useGetTrackCommentNotificationSetting` returning undefined (#11395) Farid Salau [451a173] Fix android line height (#11413) Dylan Jeffers [eba6779] Minor profile page style fixes (#11412) Randy Schott [44b88d3] Update collectibles hook to return null instead of empty objects (#11410) Randy Schott [2b2124e] [QA-1979] Fix now playing UI in collection pages (#11408) Dylan Jeffers [fc3b294] Fix edit playlist nav link when unfetched (#11403) Andrew Mendelsohn [024323e] Fix create playlists for users with capcase handle (#11406) Dylan Jeffers [7ebd72b] Fix text clipping for rewards text (#11400) Dylan Jeffers [01e82df] [PAY-3949] Add fire emoji to notification (#11402) Farid Salau [5427e77] Fix drag n drop playlist reordering (#11401) Andrew Mendelsohn [19bb6ab] Add mobile notification for endless streak (#11398) Farid Salau [9ba62e3] [PAY-3848] Add ListenStreakReminder notification (#11389) Dylan Jeffers [f653e01] [C-5784] Use normalized batch entities in lineup queries (#11376) Andrew Mendelsohn [0f8fe4a] Fix top tracks (#11393) Farid Salau [e68da94] Fix "Complete Upload" crash (#11392) Farid Salau [7d310ef] [PAY-3850][PAY-3849] Add listen streak noti on web (#11379) Farid Salau
Description
How Has This Been Tested?
Lots of manual testing, lots more to do
Notes: