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 textColor of #000000 on Android #24540

Closed
wants to merge 2 commits into from

Conversation

JonnyBurger
Copy link
Contributor

@JonnyBurger JonnyBurger commented Apr 20, 2019

Summary

By default, the text color is #000000 on iOS and different on Android, e.g. #808080, depending on the manufactorer.

This PR changes it so that newly created projects all have the text color #000000 by default on both iOS and Android.

The argument for this is to make the app by default be more consistent between platforms.

Expo also does this: https://github.com/expo/expo/blob/master/android/expoview/src/main/res/values/styles.xml#L31


For context and for your consideration, I have started a discussion here with the topic of whether React Native should try to use OS defaults or be consistent between platforms:

react-native-community/discussions-and-proposals#121

Changelog

[Android] [Changed] - New projects have a #000000 by default.

Test Plan

I have added this line to my project and it would set the default color to black.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 20, 2019
@pull-bot
Copy link

Messages
📖 📋 Missing Test Plan - Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.

Generated by 🚫 dangerJS against 958bf7a

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I agree with the current conversation in discussions-and-proposals: things should be consistent with the platform, not across platforms with React Native. However, at the same time there are basic UX behaviors that we should make sure are as consistent as possible by default.

That being said, it is unlikely that an app will use the default text color on Android – at least I haven't seen any of the top apps use it. In a case like this it makes sense to share the default across platforms. In general my advice would be to always use the platform defaults unless:

  • We can set a more sensible default for things that almost all users commonly would want to change, or if users forget to set a sensible default themselves. This is most common with user experience and behavior rather than looks.
  • There is no proper platform default or every app will want to change the default.

Again, we must be mindful here to not make React Native apps look like they do not belong on the platform they are built for. We want React Native apps to look and feel native to the platform.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @JonnyBurger in 0851d5f.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants