Skip to content
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

Partially fix static images not working in gitpod #9070

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Conversation

cdrini
Copy link
Collaborator

@cdrini cdrini commented Apr 11, 2024

Technical

Testing

Screenshot

Before:
The covers should be the grey default book cover, and there should be up/down arrows next to the headers
image

After:
image

Stakeholders

@cdrini
Copy link
Collaborator Author

cdrini commented Apr 11, 2024

@RayBB would you be willing to take a look at this one and test it on local/gitpod?

@RayBB
Copy link
Collaborator

RayBB commented Apr 11, 2024

@cdrini
I assume this is to fix #5834 ?

On gitpod it doesn't seem to work:
image

@mekarpeles mekarpeles marked this pull request as draft April 15, 2024 20:03
@jimchamp
Copy link
Collaborator

Is this branch causing this?
image

@cdrini
Copy link
Collaborator Author

cdrini commented Jun 18, 2024

^ Yep it was causing that issue! @RayBB 's fixes to the service worker have now also fixed this issue, so I have put it back up on testing and it should be working!

@scottbarnes tested on the local environment and confirmed it didn't break
I tested on testing.openlibrary.org and confirmed it is working.
@rebecca-shoptaw Can you check on gitpod?

(For anyone curious, this was previously failing because the service worker was caching the redirect responses from /images incorrectly; but @RayBB 's fixes have now fixed that issue as well!)

@cdrini cdrini marked this pull request as ready for review June 18, 2024 19:28
@cdrini
Copy link
Collaborator Author

cdrini commented Jun 20, 2024

Ah it only works on a hard refresh, ctrl-shift-r, because the service worker is caching the 303 redirect response incorrectly... darn! Still an improvement though; it at least provides a workaround (press ctrl-shift-r)

@cdrini cdrini changed the title Fix static images not working in gitpod Partially fix static images not working in gitpod Jun 20, 2024
@cdrini
Copy link
Collaborator Author

cdrini commented Jun 20, 2024

Ok I think I fixed the service worker issues issue with that last commit, so it should work! I unfortunately wasn't able to test since gitpod wasn't coming up for me 🥲 But if you can test it @rebecca-shoptaw , that would be awesome!

Note I think you'll need to run make js inside the container before the fix takes affect, but then it should work after a ctrl-shift-r, and after many normal ctrl-r 👍

@rebecca-shoptaw
Copy link
Collaborator

@cdrini It seems to be working for me in gitpod! Confirmed the little triangle error icon and the loading indicator for the cover form now appear as on testing -- and this is without needing to build js or hard refresh!

Copy link
Collaborator

@rebecca-shoptaw rebecca-shoptaw left a comment

Choose a reason for hiding this comment

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

LGTM! This should be SO helpful in gitpod :)

@cdrini cdrini merged commit fc3ae11 into master Jun 21, 2024
5 checks passed
@cdrini cdrini deleted the cdrini-patch-8 branch June 21, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants