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

Content is blinking in the hydrogen-may project #5841

Closed
gbalint opened this issue Jun 5, 2024 · 3 comments
Closed

Content is blinking in the hydrogen-may project #5841

gbalint opened this issue Jun 5, 2024 · 3 comments
Assignees

Comments

@gbalint
Copy link
Contributor

gbalint commented Jun 5, 2024

Some content is blinking/reloading/rerendering (remounting?) on all different kinds of interactions. E.g. see the tote bag here blinking on resizing something next to it:

https://screenshot.click/05-00-j4ybz-2nr75.mp4

Or simply when we switch editor mode:

https://screenshot.click/05-07-nwvug-d7e4g.gif

This may be connected to: #5834
It is suspicious that this is connected to live data coming from the loader. I also experienced that the mutation/resize observer fires in cases when there are no changes (e.g. during scrolling), that may be connected to this issue too.

@seanparsons seanparsons self-assigned this Jun 6, 2024
@seanparsons
Copy link
Contributor

It turns out the the image flickering is a combination of the component re-rendering and the "Disable cache" option being enabled in the developer tools. The "Disable cache" option and images don't particularly interact very well as it's effectively the browser overriding whatever we want to do.

@balazsbajorics
Copy link
Contributor

@seanparsons is it just rerendering, or remounting? because I think a rerender where React doesn't remove-re-add the DOM node should not result in an image being reloaded. I have a feeling (but not verified) that this is a remount happening somewhere, maybe because of a botched key, or something way more abstract, like the React.element.type losing reference because of a re-evaluation of arbitrary js

@gbalint
Copy link
Contributor Author

gbalint commented Jun 10, 2024

Superseded by #5834

@gbalint gbalint closed this as completed Jun 10, 2024
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

No branches or pull requests

3 participants