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

[iOS] applying LayoutAnimation to resize a View with shadow will result in artifacts #6151

Closed
seph14 opened this issue Feb 25, 2016 · 6 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@seph14
Copy link

seph14 commented Feb 25, 2016

I noticed this after the shadow implementation being switched to native stuff.
The artifacts is pretty obvious on the bottom side,

simulator screen shot feb 25 2016 11 51 57 pm
This one shows when the panel is animating, notice the bottom shadowing is being exaggerated.

simulator screen shot feb 25 2016 11 52 00 pm
This one shows how the shadow should look like (after the animation is done).

The shadow property used is
shadowColor: '#666',
shadowOpacity: 0.6,
shadowOffset: {width:0,height:0},
shadowRadius: 1

@jaredly
Copy link
Contributor

jaredly commented Mar 1, 2016

What react native version are you using?
If this is using native shadows, does LayoutAnimation w/ shadow work normally in iOS?

@seph14
Copy link
Author

seph14 commented Mar 2, 2016

I'm on 0.19 and yes the shadow is using the native implementation.
So as the screenshots above showed, shadows doesn't show correctly bounds when the view moves (and resizes) with LayoutAnimation.

I haven't tested if shadow breaks while view is only resizing and not moving,
but I can confirm that if a view is both resizing and moving, shadow attached to the view is rendering in wrong dimensions.

@seph14
Copy link
Author

seph14 commented Mar 18, 2016

@jaredly sorry but will this receive any fix?
I think the root is pretty clear that the
shadow property is assigned directly with the value after transition and so it doesn't move along with View's size changes.

@jaredly
Copy link
Contributor

jaredly commented Mar 18, 2016

GIven that there are 830 open issues, the best way to get progress on this is to try and fix it yourself ;) it's possible that someone from the core team will decide to investigate this, but there are more far-reaching bugs & deficiencies with react native that will probably take priority.

@mkonicek
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/ios-applying-layoutanimation-to-resize-a-view-with-shadow-will-result-in-artifacts

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub. GitHub issues have voting too, nevertheless
Product Pains has been very useful in highlighting the top bugs and feature requests:
https://productpains.com/product/react-native?tab=top

Also, if this issue is a bug, please consider sending a pull request with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

@yasir-netlinks
Copy link

yasir-netlinks commented Jun 21, 2018

Hi @seph14 were you able to solve this issue ?
screenrecord

@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants