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

Fix ReactImageView sporadic flicker in pop during Shared Element Transition #6708

Merged
merged 5 commits into from
Nov 2, 2020

Conversation

guyca
Copy link
Collaborator

@guyca guyca commented Oct 22, 2020

When animating shared elements in pop, the appearing screen needs a bit of time to settle in and for the React images to be displayed.
Seems like a good old post does the job in this case. This optimization is done only for ReactImages. For FastImage, we continue checking their measured bounds as before.

When animating shared elements in pop, the appearing screen needs a bit of time to be settle in and for the React images to be displayed.
Seems like a good old post does the job in this case. This optimisation is done only for ReactImages. For FastImage we continue checking thier measured bounds as before.
@mrousavy
Copy link
Collaborator

mrousavy commented Oct 25, 2020

Looks a bit weird atm:

Image

https://i.imgur.com/2gf1gj8.mp4

FastImage

https://i.imgur.com/kfIt7o2.mp4

Not sure if that's the fault of this commit tho, I'll check if it also reproduces using master sometime this week.

@guyca
Copy link
Collaborator Author

guyca commented Nov 2, 2020

@mrousavy If you're referring to the border-radius issue observed when <Image> is used then that's unrelated to this PR and is a different issue I'll address in a separate PR.

What other issues do you observe?

@mrousavy
Copy link
Collaborator

mrousavy commented Nov 2, 2020

I don't think there's an issue with the borderRadius, it's just that the image doesn't start from a scaled down state. It does start at correct x and y, but it looks like the parent scale transforms are not applied to the Image, only to FastImage (which is just a View).

Do you want me to create a separate issue for that?

Other than that, everything works perfectly 🎉

@guyca
Copy link
Collaborator Author

guyca commented Nov 2, 2020

Oh gotcha! That's indeed a regression introduced in this PR. It's just hard to decipher gifs and figure out what the bug is. Thanks for the explanation.
No need for a separate issue, I'll fix it in this PR 👍

@guyca guyca changed the title Fix ReactImageView sporadic flicker in pop during SET Fix ReactImageView sporadic flicker in pop during Shared Element Transition Nov 2, 2020
@guyca guyca merged commit 871e976 into master Nov 2, 2020
@guyca guyca deleted the fixReactImageFlicker branch November 2, 2020 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants