heyxyz / hey

Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿
https://hey.xyz
GNU Affero General Public License v3.0
23.36k stars 1.55k forks source link

Don't reload images or any assets on virtuosa items when scrolled and came back #4201

Closed bigint closed 3 weeks ago

bigint commented 10 months ago

https://github.com/heyxyz/hey/assets/69431456/dceccd17-4fd2-44de-98be-51045bae0d45

rajdip-b commented 10 months ago

/attempt #4201 can i be assigned this?

algora-pbc[bot] commented 10 months ago

@rajdip-b: We appreciate your enthusiasm but since you already have 3 active bounty attempts, we're going to keep this open for other contributors to attempt. 🫡

RutamBhagat commented 10 months ago

/attempt #4201

Options
bigint commented 10 months ago

As said earlier FCFS based on PRs and it's quality

rajdip-b commented 10 months ago

As said earlier FCFS based on PRs and it's quality

My attempts are stuck in validation or dependency :(

bigint commented 10 months ago

Feel free to attempt any and create PR for it and claim bounties on PR, we not gonna restrict based on attempts

RutamBhagat commented 10 months ago

@bigint can you please provide a bit more info on how to reach the page that you showed in the screen recording? I went to the /staff/users page but it's giving me a 404 error image

bigint commented 10 months ago

oops the video shows a protected endpoint, you can see any profile followers/following to reproduce it

bigint commented 10 months ago

https://github.com/heyxyz/hey/assets/69431456/ba108351-6547-49a1-abd7-844f5d77817b

RutamBhagat commented 10 months ago

@bigint would this caching solution work?

bigint commented 10 months ago

We never wanna load the images again!

tarunrajput commented 10 months ago

@bigint, Is this not the concept of any virtual list? Elements are removed when not in view and will be re-rendered upon returning to the viewport.

RutamBhagat commented 10 months ago

yeah I think its similar to this thread https://github.com/petyosi/react-virtuoso/issues/298#issuecomment-946874723

kriptonian1 commented 10 months ago

@bigint is this issue still up

kriptonian1 commented 10 months ago

/attempt https://github.com/heyxyz/hey/issues/4201

Options
kriptonian1 commented 10 months ago

We never wanna load the images again!

do you want to store it in cache or something

MrBlackGhostt commented 10 months ago

/attempt #4201

Options
algora-pbc[bot] commented 10 months ago

[!NOTE] The user @kriptonian1 is already attempting to complete issue #4201 and claim the bounty. We recommend checking in on @kriptonian1's progress, and potentially collaborating, before starting a new solution.

chintanpuggalok commented 10 months ago

@bigint is this still open?

abhi12299 commented 9 months ago

@bigint what exactly is the issue? I see that the correct cache control headers are already added. The network requests in the browser are expected, because the virtual scrolling library actually mounts/unmounts react components, so the image requests will be there in the network tab, but as long as the Etag is the same, the request will be cached (provided the browser cache is enabled). Is this issue already fixed?

https://github.com/heyxyz/hey/assets/36722596/3d1ab9ab-70ea-4233-8201-4214a2d9f4a0