Uh oh!
There was an error while loading. Please reload this page.
[C-5180] Comment count polling & cache updates - #10157
Conversation
|
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.
| console.log({ commentCountData }) | ||
| const hasNewComments = useMemo( |
There was a problem hiding this comment.
dont need to memoize this since its a fast compute
There was a problem hiding this comment.
ah good catch, I had this in here when I was debugging some infinite rerender issues
| from src.utils.db_session import get_db_read_replica | ||
| def get_track_comment_count(track_id, current_user_id, db_session=None): |
There was a problem hiding this comment.
nice work on this. i wonder if we can share code at some point
There was a problem hiding this comment.
Yeah I had the same thought but I didn't want to get stuck in a big refactor at this point in the game. Ideally we share the logic between get comments, get counts, and get replies
| user[ | ||
| response_name_constants.current_user_followee_follow_count | ||
| ] = current_user_followee_follow_count_dict.get(user_id, 0) | ||
| user[response_name_constants.does_current_user_follow] = ( |
There was a problem hiding this comment.
cd packages/discovery-provider && ./scripts/lint.sh
| // Check for comment count in tanquery cache first because that value gets polled and updated more often | ||
| const comment_count = | ||
| useCachedTrackCommentCount(track_id, currentUserId)?.data?.currentValue ?? |
There was a problem hiding this comment.
this does make me a little nervous but i suppose it's not a huge perf it as long as usCacheTrackCommentCount not firing a lot
There was a problem hiding this comment.
I ended up changing this. For a few different reasons I decided to not reference tan query cache anywhere but comments and instead just keep dispatching events to the legacy cache to update it.
audius-infra
commented
Oct 23, 2024
Preview this change https://demo.audius.co/jd/comment-count-polling |
audius-infra
commented
Oct 23, 2024
Preview this change https://demo.audius.co/jd/comment-count-polling |
…jd/comment-count-polling # Conflicts: # packages/common/src/api/tan-query/comments.ts # packages/common/src/context/comments/commentsContext.tsx # packages/discovery-provider/src/queries/get_comments.py # packages/mobile/src/components/comments/CommentDrawerHeader.tsx
audius-infra
commented
Oct 23, 2024
Preview this change https://demo.audius.co/jd/comment-count-polling |
audius-infra
commented
Oct 23, 2024
Preview this change https://demo.audius.co/jd/comment-count-polling |
[982eb7f] Fix comment notification tests (#10174) Dylan Jeffers [c7ecd86] Bump chat create rate limit to unblock blasts (#10179) Andrew Mendelsohn [2e3ca0d] [C-5180] Comment count polling & cache updates (#10157) JD Francis [56e346c] [C-5259] Fix comment push notification deep links (#10167) Dylan Jeffers [f7e864e] [C-5144] Disable caching on unclaimed comment ID (#10170) Isaac Solo
* origin/main: (61 commits) Remove comment reaction notifications on web (#10190) Use replaceRecentBlockhash to fix BlockhashNotFound error (#10188) [C-5185, C-5246, C-5250, C-5254] Update web and mobile comments to respect mentions being passed back from the backend (#10185) Update metadata for comment edit to be trackId (#10187) [C-5264] Update comment specifiers (#10180) [C-5260] Add comment reaction notifications (#10175) [C-5263] Blur comment after submitting (#10178) Improve comment count queries, fix tests (#10181) [PAY-3536] Improve $AUDIO VIP Tier UI (#10154) Audius Protocol v0.7.19 Fix comment notification tests (#10174) Bump chat create rate limit to unblock blasts (#10179) [C-5180] Comment count polling & cache updates (#10157) [C-5232] Navigate to comments on comments preview click (#10176) [C-5232] Fix clipped artist popovers on comments section (#10172) new prod chain (#10173) [C-5259] Fix comment push notification deep links (#10167) [C-5144] Disable caching on unclaimed comment ID (#10170) [C-5257] Limit mentions to 10 in ComposerInput (#10171) [C-5226] [C-5225] Allow ComposerInput scrolling with mentions (#10166) ...
[4115060] [C-5276] Fix timestamp stuck on mobile comments (#10206) Sebastian Klingler [f3ab276] [C-5091] web comments analytics (#10202) Sebastian Klingler [fa4f1d7] [C-5200] Fix tombstone comments (#10203) JD Francis [2abd26e] Fix liked by artist logic error (#10195) JD Francis [3a56c51] [C-5273] Add user select to comment text (#10201) Raymond Jacobson [43f7e79] [C-5285] Fix comment notification user list title (#10200) Raymond Jacobson [2491f56] [QA-1766] Update audius careers link (#10198) Andrew Mendelsohn [9c5e3ea] Fix composer input for chats (#10194) Raymond Jacobson [031d171] [C-5277] Fix alignment of comment "artist pick" on mobile (#10197) Raymond Jacobson [a71a46b] [PAY-3553] Show chat button when unauthed (#10196) Andrew Mendelsohn [44540db] [C-5091] Mobile comments analytics (#10192) Sebastian Klingler [e3eeb11] Revert "Remove comment reaction notifications on web (#10190)" (#10191) Dylan Jeffers [b9922c8] Remove comment reaction notifications on web (#10190) Dylan Jeffers [05ab72a] [C-5185, C-5246, C-5250, C-5254] Update web and mobile comments to respect mentions being passed back from the backend (#10185) Kyle Shanks [770020f] Update metadata for comment edit to be trackId (#10187) JD Francis [54c8c64] [C-5264] Update comment specifiers (#10180) Dylan Jeffers [8ef6399] [C-5260] Add comment reaction notifications (#10175) Dylan Jeffers [4cd6d9d] [C-5263] Blur comment after submitting (#10178) Isaac Solo [fbbfd22] [PAY-3536] Improve $AUDIO VIP Tier UI (#10154) Raymond Jacobson [2e3ca0d] [C-5180] Comment count polling & cache updates (#10157) JD Francis [a01d02a] [C-5232] Navigate to comments on comments preview click (#10176) Andrew Mendelsohn [09ba221] [C-5232] Fix clipped artist popovers on comments section (#10172) Andrew Mendelsohn [a620da0] [C-5257] Limit mentions to 10 in ComposerInput (#10171) Sebastian Klingler [0aa79e2] [C-5226] [C-5225] Allow ComposerInput scrolling with mentions (#10166) Sebastian Klingler [24349bd] [C-5053] Rework desktop comment load skeletons (#10168) JD Francis [d589306] [PAY-3542] Fix bad initial data in mobile inbox settings (#10169) Andrew Mendelsohn [eeb0456] Fix issue with mentions for create/reply/edit (#10165) Dylan Jeffers [48b501d] [C-5174] Update disable comments header (#10162) Dylan Jeffers [1fc09c6] [C-5217] Fix view other remixes (#10160) Dylan Jeffers [a3e1ba1] Upgrade mobile to version 1.1.120 (#10164) Dylan Jeffers [64b4c1e] [C-5242] Remove showComments query param after scrolling into view (#10163) Dylan Jeffers [eb13f19] Fix mentions type (#10159) Dylan Jeffers [3172f5d] Remove ENABLE_SPL_AUDIO feature flag (#10153) Reed [e101c1f] Upgrade fastlane to fix update-signing-cert (#10156) Dylan Jeffers [ef74fde] [C-5168] Fix android toasts (#10147) Dylan Jeffers [bc84c1f] [C-5252] Fix external links on mobile (#10152) Andrew Mendelsohn [ca969c8] [QA-1755] Fix toggling on native genre pills (#10145) Andrew Mendelsohn [61907aa] Update dapp-store build artifacts audius-infra [c98755d] [C-5229] Fix comment input focus on android (#10141) Sebastian Klingler [e496d5e] Fix mac prod build, remove warnings (#10130) Dylan Jeffers [bd9a403] [C-5244] Comment UI tweaks (#10131) Dylan Jeffers [d6b78db] [QA-1775] Fix validation error in mobile EditCollection (#10142) Andrew Mendelsohn [d5be322] [C-5075] Fix tan-query not handling tombstone states (#10132) JD Francis [a5a0f70] [C-5218] [C-5154] Restrict mobile comment input length (#10140) Sebastian Klingler [0323673] [C-5240] Close drawer when pressing comment owner in mobile comments (#10126) Sebastian Klingler [d4fc207] [C-5230] Hide 0 react counts (#10133) JD Francis [d20b99a] [C-5215] [C-5206] Fix some issues with compose input on mobile (#10125) Sebastian Klingler [579f17d] [C-5163 Fix commenter name overflowing (#10124) Isaac Solo
[982eb7f] Fix comment notification tests (#10174) Dylan Jeffers [c7ecd86] Bump chat create rate limit to unblock blasts (#10179) Andrew Mendelsohn [2e3ca0d] [C-5180] Comment count polling & cache updates (#10157) JD Francis [56e346c] [C-5259] Fix comment push notification deep links (#10167) Dylan Jeffers [f7e864e] [C-5144] Disable caching on unclaimed comment ID (#10170) Isaac Solo
[4115060] [C-5276] Fix timestamp stuck on mobile comments (#10206) Sebastian Klingler [f3ab276] [C-5091] web comments analytics (#10202) Sebastian Klingler [fa4f1d7] [C-5200] Fix tombstone comments (#10203) JD Francis [2abd26e] Fix liked by artist logic error (#10195) JD Francis [3a56c51] [C-5273] Add user select to comment text (#10201) Raymond Jacobson [43f7e79] [C-5285] Fix comment notification user list title (#10200) Raymond Jacobson [2491f56] [QA-1766] Update audius careers link (#10198) Andrew Mendelsohn [9c5e3ea] Fix composer input for chats (#10194) Raymond Jacobson [031d171] [C-5277] Fix alignment of comment "artist pick" on mobile (#10197) Raymond Jacobson [a71a46b] [PAY-3553] Show chat button when unauthed (#10196) Andrew Mendelsohn [44540db] [C-5091] Mobile comments analytics (#10192) Sebastian Klingler [e3eeb11] Revert "Remove comment reaction notifications on web (#10190)" (#10191) Dylan Jeffers [b9922c8] Remove comment reaction notifications on web (#10190) Dylan Jeffers [05ab72a] [C-5185, C-5246, C-5250, C-5254] Update web and mobile comments to respect mentions being passed back from the backend (#10185) Kyle Shanks [770020f] Update metadata for comment edit to be trackId (#10187) JD Francis [54c8c64] [C-5264] Update comment specifiers (#10180) Dylan Jeffers [8ef6399] [C-5260] Add comment reaction notifications (#10175) Dylan Jeffers [4cd6d9d] [C-5263] Blur comment after submitting (#10178) Isaac Solo [fbbfd22] [PAY-3536] Improve $AUDIO VIP Tier UI (#10154) Raymond Jacobson [2e3ca0d] [C-5180] Comment count polling & cache updates (#10157) JD Francis [a01d02a] [C-5232] Navigate to comments on comments preview click (#10176) Andrew Mendelsohn [09ba221] [C-5232] Fix clipped artist popovers on comments section (#10172) Andrew Mendelsohn [a620da0] [C-5257] Limit mentions to 10 in ComposerInput (#10171) Sebastian Klingler [0aa79e2] [C-5226] [C-5225] Allow ComposerInput scrolling with mentions (#10166) Sebastian Klingler [24349bd] [C-5053] Rework desktop comment load skeletons (#10168) JD Francis [d589306] [PAY-3542] Fix bad initial data in mobile inbox settings (#10169) Andrew Mendelsohn [eeb0456] Fix issue with mentions for create/reply/edit (#10165) Dylan Jeffers [48b501d] [C-5174] Update disable comments header (#10162) Dylan Jeffers [1fc09c6] [C-5217] Fix view other remixes (#10160) Dylan Jeffers [a3e1ba1] Upgrade mobile to version 1.1.120 (#10164) Dylan Jeffers [64b4c1e] [C-5242] Remove showComments query param after scrolling into view (#10163) Dylan Jeffers [eb13f19] Fix mentions type (#10159) Dylan Jeffers [3172f5d] Remove ENABLE_SPL_AUDIO feature flag (#10153) Reed [e101c1f] Upgrade fastlane to fix update-signing-cert (#10156) Dylan Jeffers [ef74fde] [C-5168] Fix android toasts (#10147) Dylan Jeffers [bc84c1f] [C-5252] Fix external links on mobile (#10152) Andrew Mendelsohn [ca969c8] [QA-1755] Fix toggling on native genre pills (#10145) Andrew Mendelsohn [61907aa] Update dapp-store build artifacts audius-infra [c98755d] [C-5229] Fix comment input focus on android (#10141) Sebastian Klingler [e496d5e] Fix mac prod build, remove warnings (#10130) Dylan Jeffers [bd9a403] [C-5244] Comment UI tweaks (#10131) Dylan Jeffers [d6b78db] [QA-1775] Fix validation error in mobile EditCollection (#10142) Andrew Mendelsohn [d5be322] [C-5075] Fix tan-query not handling tombstone states (#10132) JD Francis [a5a0f70] [C-5218] [C-5154] Restrict mobile comment input length (#10140) Sebastian Klingler [0323673] [C-5240] Close drawer when pressing comment owner in mobile comments (#10126) Sebastian Klingler [d4fc207] [C-5230] Hide 0 react counts (#10133) JD Francis [d20b99a] [C-5215] [C-5206] Fix some issues with compose input on mobile (#10125) Sebastian Klingler [579f17d] [C-5163 Fix commenter name overflowing (#10124) Isaac Solo
Description
Various changes
How Has This Been Tested?
web:dev