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

In list of cards, the shadow grows ever longer #2150

Closed
paour opened this issue Jul 18, 2018 · 8 comments
Closed

In list of cards, the shadow grows ever longer #2150

paour opened this issue Jul 18, 2018 · 8 comments

Comments

@paour
Copy link

paour commented Jul 18, 2018

node, npm, react-native, react and native-base version

    "native-base": "^2.7.1",
    "react": "16.4.1",
    "react-native": "0.56.0",

Expected behaviour

In a list of cards, all cards have the same shadow thickness, unless otherwise specified

Actual behaviour

The shadow grows for each subsequent card in a list.

screenshot-2018-07-18_16_27_47_641

Steps to reproduce should include code snippet and screenshot

{_.map(props.content, c => (
  <NB.Card key={c.id} style={styles.menu}>
    <NB.CardItem cardBody button onPress={() => props.open(c)} style={styles.cardItem}>
      <NB.Text style={styles.menuText}>{c.title}</NB.Text>
    </NB.CardItem>
  </NB.Card>
  )}

Is the bug present in both iOS and Android or in any one of them?

This happens in Android. I can't test on iOS on the latest version of NB because the RN 0.56 dependency causes issues with other libs (rn-firebase).

Any other additional info which would help us debug the issue quicker.

@SupriyaKalghatgi
Copy link
Contributor

@paour

The shadow grows for each subsequent card in a list.

This can be more clear if you share GIF

@paour
Copy link
Author

paour commented Jul 19, 2018

This effect does not happen only during scroll, all you need is a list of cards. I've annotated the screenshot to clarify.

@SupriyaKalghatgi
Copy link
Contributor

@paour Can you check this on device?
Simulator / Emulator sometimes render these glitches

@paour
Copy link
Author

paour commented Jul 19, 2018

Yes, it's the same on-device. Here, in another app on my phone.

screenshot_20180719-155944

@SupriyaKalghatgi
Copy link
Contributor

Checked this with React Native View, behaves same

          <View style={{elevation: 3, marginBottom: 15, borderWidth: 0.5, borderColor: '#ccc' }}><Text>Text</Text></View>
          <View style={{elevation: 3, marginBottom: 15, borderWidth: 0.5, borderColor: '#ccc' }}><Text>Text</Text></View>
          <View style={{elevation: 3, marginBottom: 15, borderWidth: 0.5, borderColor: '#ccc' }}><Text>Text</Text></View>
          <View style={{elevation: 3, marginBottom: 15, borderWidth: 0.5, borderColor: '#ccc' }}><Text>Text</Text></View>
          <View style={{elevation: 3, marginBottom: 15, borderWidth: 0.5, borderColor: '#ccc' }}><Text>Text</Text></View>
          <View style={{elevation: 3, marginBottom: 15, borderWidth: 0.5, borderColor: '#ccc' }}><Text>Text</Text></View>
          <View style={{elevation: 3, marginBottom: 15, borderWidth: 0.5, borderColor: '#ccc' }}><Text>Text</Text></View>

@paour
Copy link
Author

paour commented Aug 2, 2018

So it's a RN bug? Sorry I didn't think to check that first!

@SupriyaKalghatgi
Copy link
Contributor

yes, it is
I will link in the RN issue in a minute

@SupriyaKalghatgi
Copy link
Contributor

facebook/react-native#20501

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

2 participants