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

random spacing between borders #19512

Closed
5 tasks done
burabure opened this issue May 30, 2018 · 6 comments
Closed
5 tasks done

random spacing between borders #19512

burabure opened this issue May 30, 2018 · 6 comments
Labels
Bug Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@burabure
Copy link

Environment

Environment:
  OS: Linux 4.13
  Node: 9.3.0
  Yarn: 1.6.0
  npm: 5.5.1
  Watchman: Not Found
  Xcode: N/A
  Android Studio: Not Found

Packages: (wanted => installed)
  react: ^16.3.1 => 16.3.1
  react-native: ^0.55.4 => 0.55.4

Description

items on a flex container have random spacing between them

Steps to Reproduce

Bug example border

screenshot from 2018-05-30 15-12-28

import React from 'react'
import { StyleSheet, Text, View } from 'react-native'

export default () => {
  return (
    <View style={styles.wrapper}>
      <View style={styles.tabs}>
        <View style={styles.tab}>
          <Text>1</Text>
        </View>
        <View style={styles.tab}>
          <Text>2</Text>
        </View>
        <View style={styles.tab}>
          <Text>3</Text>
        </View>
        <View style={styles.tab}>
          <Text>4</Text>
        </View>
      </View>
      <View style={styles.tabContent}>
        <Text>TAB CONTENT</Text>
      </View>
    </View>
  )
}

const BORDER_COLOR = '#333'
const styles = StyleSheet.create({
  tab: {
    borderColor: BORDER_COLOR,
    borderStyle: 'solid',
    borderWidth: 1,
    padding: 10,
  },
  tabContent: {
    borderColor: BORDER_COLOR,
    borderStyle: 'solid',
    borderWidth: 1,
    flex: 1,
    padding: 20,
  },
  tabs: {
    flex: 1,
    flexDirection: 'column',
  },
  wrapper: {
    flexDirection: 'row',
    padding: 20,
  },
})

Bug example background

screenshot from 2018-05-30 15-14-24

import React from 'react'
import { StyleSheet, Text, View } from 'react-native'

export default () => {
  return (
    <View style={styles.wrapper}>
      <View style={styles.tabs}>
        <View style={styles.tab}>
          <Text>1</Text>
        </View>
        <View style={styles.tab}>
          <Text>2</Text>
        </View>
        <View style={styles.tab}>
          <Text>3</Text>
        </View>
        <View style={styles.tab}>
          <Text>4</Text>
        </View>
      </View>
      <View style={styles.tabContent}>
        <Text>TAB CONTENT</Text>
      </View>
    </View>
  )
}

const BORDER_COLOR = '#333'
const styles = StyleSheet.create({
  tab: {
    backgroundColor: 'red',
    padding: 10,
  },
  tabContent: {
    backgroundColor: 'blue',
    flex: 1,
    padding: 20,
  },
  tabs: {
    flex: 1,
    flexDirection: 'column',
  },
  wrapper: {
    flexDirection: 'row',
    padding: 20,
  },
})

Workaround example

screenshot from 2018-05-30 15-17-28

import React from 'react'
import { StyleSheet, Text, View } from 'react-native'

export default () => {
  return (
    <View style={styles.wrapper}>
      <View style={styles.tabs}>
        <View style={[styles.tab, styles.tabTop]}>
          <Text>1</Text>
        </View>
        <View style={styles.tab}>
          <Text>2</Text>
        </View>
        <View style={styles.tab}>
          <Text>3</Text>
        </View>
        <View style={styles.tab}>
          <Text>4</Text>
        </View>
      </View>
      <View style={styles.tabContent}>
        <Text>TAB CONTENT</Text>
      </View>
    </View>
  )
}

const BORDER_COLOR = '#333'
const styles = StyleSheet.create({
  tab: {
    borderBottomWidth: 0,
    borderColor: BORDER_COLOR,
    borderLeftWidth: 0,
    borderRightWidth: 1,
    borderStyle: 'solid',
    borderTopWidth: 1,
    padding: 10,
  },
  tabContent: {
    borderBottomWidth: 1,
    borderColor: BORDER_COLOR,
    borderLeftWidth: 0,
    borderRightWidth: 1,
    borderStyle: 'solid',
    borderTopWidth: 1,
    flex: 1,
    padding: 20,
  },
  tabTop: {
    borderTopWidth: 0,
  },
  tabs: {
    borderBottomWidth: 1,
    borderColor: BORDER_COLOR,
    borderLeftWidth: 1,
    borderRightWidth: 0,
    borderStyle: 'solid',
    borderTopWidth: 1,
    flex: 1,
    flexDirection: 'column',
  },
  wrapper: {
    flexDirection: 'row',
    padding: 20,
  },
})

Expected Behavior

no random spacing between items

Actual Behavior

random spacing between items

@react-native-bot react-native-bot added the Platform: Linux Building on Linux. label May 30, 2018
@stale
Copy link

stale bot commented Aug 28, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 28, 2018
@burabure
Copy link
Author

this is still happening!

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 28, 2018
@stale
Copy link

stale bot commented Nov 27, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 27, 2018
@burabure
Copy link
Author

that moment when you spend a couple hours investigating an issue/bug and submit a good detailed report and all you get is a bot asking if this issue magically solved itself...

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 27, 2018
@hramos hramos removed the Bug Report label Feb 6, 2019
@stale
Copy link

stale bot commented Aug 2, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 2, 2019
@stale
Copy link

stale bot commented Aug 9, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 9, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Linux Building on Linux. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants