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

Default Text color inconsistent between Expo Go and bare template on Android #13118

Closed
lilioque opened this issue Jun 1, 2021 · 9 comments
Closed

Comments

@lilioque
Copy link

lilioque commented Jun 1, 2021

Platform: Android
Android version: 10
Expected behavior: Text elements are black
Actual behavior: Text elements get gray (actually, they have some opacity)
I make builds via macOS X + bash

(See screenshot attached: on the left is internal beta downloaded from Google Play Store, on the right is the app launched in Expo Go on the same device).

I have already reported the issue with Text elements in my app (expo/expo-cli#3524), but since it wasn't clear whether the bug is on my side or on the side of EAS build, I decided to check it right after creating a new app with "expo init". I chose the blank template, the only thing I modify was app.json - I had to add my credentials so that I could upload the app to Play Store. I also added my signature file and eas.json.

I tried downloading the internal beta to another device (also Android 10), text is still gray.

Files' content:

App.js

import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

app.json

{
  "expo": {
    "name": "...",
    "version": "...",
    "slug": "...",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": false,
      "bundleIdentifier": "...",
      "buildNumber": "..."
    },
    "android": {
      "package": "...",
      "versionCode": ...,
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "permissions" : []
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}

eas.json

{
  "builds": {
    "android": {
      "release": {
        "workflow": "managed"
      }
    }
  }
}

package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "~41.0.1",
    "expo-status-bar": "~1.0.4",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
    "react-native-web": "~0.13.12"
  },
  "devDependencies": {
    "@babel/core": "^7.9.0"
  },
  "private": true
}

photo5310015987174716186

@lilioque
Copy link
Author

lilioque commented Jun 1, 2021

I have simplified the starter app even further and left only Text element in App.js - there is still the problem. See the screenshot attached: Expo Go on the left (black text is behind the status bar, which is white with black texts and icons), internal beta from Play Store on the right (gray text under the status bar, which is gray either, with white icons).

New App.js:

import React from 'react';
import { Text } from 'react-native';

export default function App() {
  return (
      <Text>Open up App.js to start working on your app!</Text>
  );
}

photo5310015987174716214

@brentvatne brentvatne changed the title EAS build: Text elements get transparent even if you make build right after "expo init" Prebuild: Text elements get transparent even if you make build right after "expo init" Jun 1, 2021
@brentvatne
Copy link
Member

thanks we will investigate

@brentvatne
Copy link
Member

brentvatne commented Jun 1, 2021

what device are you using?

@lilioque
Copy link
Author

lilioque commented Jun 1, 2021

what device and operating system version are you using?

My device: OPPO CPH1941, Android 10
The same issue on Redmi Note 9T, Android 10

I make builds via macOS Catalina (version 10.15.7) + bash (iTerm)

@brentvatne
Copy link
Member

thanks! I can repro this as well. it looks like our default text styles in need to be updated to match Expo Go, thanks for catching that

@brentvatne brentvatne changed the title Prebuild: Text elements get transparent even if you make build right after "expo init" Default Text color inconsistent between Expo Go and bare template Jun 1, 2021
@brentvatne brentvatne transferred this issue from expo/expo-cli Jun 1, 2021
@brentvatne brentvatne changed the title Default Text color inconsistent between Expo Go and bare template Default Text color inconsistent between Expo Go and bare template on Android Jun 1, 2021
@lilioque
Copy link
Author

lilioque commented Jun 1, 2021

thanks! I can repro this as well. it looks like our default text styles in need to be updated to match Expo Go, thanks for catching that

Thank you!
I have also launched the internal beta from Play Store on Lenovo TB2-X30L, Android 6.0.1 - also gray text.

@lilioque
Copy link
Author

lilioque commented Jun 4, 2021

If someone needs a temporary solution - the problem can be fixed by explicitly assigning color property to Text elements.

@github-actions
Copy link
Contributor

This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Jan 26, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2022

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

@github-actions github-actions bot closed this as completed Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants