Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

[C-1195] Fix image loading in image hooks#2025

Merged
dylanjeffers merged 4 commits into
mainfrom
dj-c-1195-fix-image-loading
Sep 29, 2022
Merged

[C-1195] Fix image loading in image hooks#2025
dylanjeffers merged 4 commits into
mainfrom
dj-c-1195-fix-image-loading

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Description

  • Fixes pretty interesting/bad bug where we are dispatching fetch image actions in the render cycle by moving dispatch to useEffect/useCallback depending on onDemand value)
  • Updates types to properly type useImage based on onDemand value
  • Updates usages, particularly onDemand cases (in ArtistPopover) to use special hook rather than overloading useProfileImage and useCoverPhotoImage to match the useImage types in common

if (load && getPreviousId() !== id) {
setPreviousId(id)
// Request the desired size
dispatch(action(id, size))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the issue, since this was technically happening in the render cycle

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooooooouyyydddddffff

i'm sure i wrote this

@audius-infra

Copy link
Copy Markdown
Collaborator

Preview this change https://demo.audius.co/dj-c-1195-fix-image-loading

@raymondjacobson

Copy link
Copy Markdown
Member

gonna wait for demo site and scrutinize behavior a little then approve

Comment thread packages/common/src/hooks/useImageSize.ts
@raymondjacobson

Copy link
Copy Markdown
Member

Screen Shot 2022-09-28 at 6 11 10 PM

Some staleness issue on profile photos. Repro: 1. go to feed 2. click on profile in track tile 3. go back 4. click on profile without a picture in track tile here's an entropy key if that's useful for a user where this happens on their feed: f0766d4f5d92555591b77b076c6cba8a

@raymondjacobson

Copy link
Copy Markdown
Member
Screen Shot 2022-09-28 at 6 11 10 PM

Some staleness issue on profile photos. Repro: 1. go to feed 2. click on profile in track tile 3. go back 4. click on profile without a picture in track tile here's an entropy key if that's useful for a user where this happens on their feed: f0766d4f5d92555591b77b076c6cba8a

OK this bug is on staging already. NVM, will open sep issue

@audius-infra

Copy link
Copy Markdown
Collaborator

Preview this change https://demo.audius.co/dj-c-1195-fix-image-loading

@dylanjeffers

Copy link
Copy Markdown
Contributor Author

Gotcha yeah was gonna say I think we saw this on stage. Kewl thanks for approval

@dylanjeffers dylanjeffers merged commit fcaf65a into main Sep 29, 2022
@dylanjeffers dylanjeffers deleted the dj-c-1195-fix-image-loading branch September 29, 2022 06:23
audius-infra pushed a commit that referenced this pull request Oct 1, 2022
[287f114] [C-1179] Fix edit-profile (#2048) Dylan Jeffers
[65456c9] [C-1207] Fix stem downloads (#2041) Dylan Jeffers
[aa7183c] Fix duplicate playlists once playlist is confirmed  / Await feature flag response in sagas C-1199 (#2044) nicoback2
[2340604] [C-1208] Track playback UID is not consistent when clicking into track (#2046) Sebastian Klingler
[b300cba] Add premium content default fields to track upload (#2042) Saliou Diallo
[e80e0bb] [PAY-655] Refactor challenges config, fix bugs (#2016) Michael Piazza
[86d4741] [C-1206] double check before declaring offline state (#2034) Andrew Mendelsohn
[69ccfac] Upgrade sdk 1.0.8 (#2040) Isaac Solo
[3c8ac81] Fix image uploads in new native (#2019) nicoback2
[e0faae7] Fix tracks/reposts lineups for artist with handles with capitials (#2039) Dylan Jeffers
[32b472b] [C-481] Fix profile header loading jank (#2038) Dylan Jeffers
[7e3a4c6] [C-1128] Add profile screen skeleton (#2037) Dylan Jeffers
[e3390af] Improve navigation perf related to drawer context (#2036) Dylan Jeffers
[9a12d48] Fix profile reposts loading issue (#2035) Dylan Jeffers
[544b01e] [C-1065][C-1066] Primitive download and playback for tracks offline (#2021) Andrew Mendelsohn
[d335a31] User entity manager (#2017) Joseph Lee
[522f044] Disable dominant color on mobile (#2031) Sebastian Klingler
[c3093a6] Add AudioTransactionsIcon component (#2030) Kyle Shanks
[c31d1b2] Fix some tests c-1140 (#1966) nicoback2
[575caad] [C-1197] Custom skeleton for feed tip tile (#2027) Raymond Jacobson
[8399ee1] fix new playlist made from track - invalid date (#2029) nicoback2
[3971aaf] [C-1154] Deep linking (#2023) Sebastian Klingler
[fcaf65a] [C-1195] Fix image loading in image hooks (#2025) Dylan Jeffers
[6f54ba1] [C-1194] Fix desktop profile state (#2022) Dylan Jeffers
[3044ded] Fix navigation context scope and setting (#2026) Dylan Jeffers
[4c8bb56] [C-1092] Implement eager load utils in mobile (#2002) Raymond Jacobson
[37048f6] Fix static server crash (#2024) Sebastian Klingler
[4d7bd27] Add entity manager address to dev (#2013) Isaac Solo
[d77ee2d] Fix feeling lucky typecheck (#2020) Isaac Solo
[e83d105] Update feeling lucky to not rely on latest track (#1954) Isaac Solo
[af72734] Add new table for Artist Dashboard (#2018) Kyle Shanks
[f3f8abb] [C-1177] Move tipping requests to api client (#1995) Raymond Jacobson
[b2b986d] [C-1170] Optimistically add/remove reposted tracks/collections (#2009) Dylan Jeffers
[0fda0b8] [PAY-651][PAY-613] Add Stripe Provider to On Ramps (#1950) Marcus Pasell
[5cb01d0] [C-1181] skip connection check if not in foreground (#2010) Andrew Mendelsohn
[254f42e] [C-1157] Fix remix icon position (#2014) Dylan Jeffers
[33b10ee] [C-1164] Fix collections screen loading issues (#2005) Dylan Jeffers
[9c1c1ce] Cast port to number (#2015) Sebastian Klingler
[d656b0a] Upgrade sdk 1.0.6 (#2012) Isaac Solo
[9e5dfef] Fix static server error (#2011) Sebastian Klingler
[42aa891] Hardcode web-sync static-server port (#2008) Dylan Jeffers
[9a106c3] Remove more webview instructions from readme (#2007) Sebastian Klingler
[d68aa89] Omit creator_node_endpoint when updating metadata via collectible fetch (#2006) Sebastian Klingler
[8b16e7f] Use .env.dev instead of .env.dev.local (#2004) Raymond Jacobson
[82864e0] Fix start:dev command (#2003) Raymond Jacobson
[1661b77] [C-1150, C-1165] Fix app-tab navigation (#2001) Dylan Jeffers
[8235eb0] [INF-180] Update client for new compose local dev (#1577) Raymond Jacobson
[71d1e92] [C-1167,C-1171] Fix missing tip data (#2000) Dylan Jeffers
[1c3d609] [C-1156, C-1055, C-1159] Fix profile follow button (#1999) Dylan Jeffers
[2005467] [C-1174] Fix blank listening history screen (#1998) Dylan Jeffers
[42945e3] Remove tmpl env vars (#1997) Raymond Jacobson
[f637ded] [C-1173] Reintegrate WebAppAccountSync (#1996) Dylan Jeffers
[b11f04d] [C-1176] Improve ExploreScreen performance (#1994) Dylan Jeffers
[f6680c5] [C-536] Cache makeStyles StyleSheets (#1993) Dylan Jeffers
@AudiusProject AudiusProject deleted a comment from linear Bot Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants