Skip to content

Conversation

karanpratapsingh
Copy link

@karanpratapsingh karanpratapsingh commented May 2, 2019

Summary

Issue: Polish the "new app screen"
This is the pull request for the new intro screen proposal in react native as directed by @cpojer

Changelog

[General][Added] - New Intro screen, Icons

Removed Lottie Integration
100% React Native 💥

Test Plan

npm run ios should build the template app similar to this:

type 1

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@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 May 2, 2019
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

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.

This is fantastic! Thank you so much to everyone who collaborated on this in such a short amount of time. In order to get this into merged, could you get rid of all the template files and extract the code for the intro screen into a single component? To test it, you can include it inside of RNTester within this repository as a new example view.

I recommend putting the component into a folder called “Libraries/NewAppScreen”.

Copy link
Contributor

@eliperkins eliperkins left a comment

Choose a reason for hiding this comment

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

I left some general feedback on the components here. I think it's super important to nail these components, as they'll be the first building blocks that users will see and learn from!

Great work on getting this going 😄

const App = () => {
return (
<Fragment>
<SafeAreaView style={styles.topSafeArea} />
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this SafeAreaView used for? My understanding is that SafeAreaViews should generally have children inside, so is this just a spacer? If so, what is it spacing that the second SafeAreaView is not?

Choose a reason for hiding this comment

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

This SafeAreaView is for change the top Safe area style. This was the only way that I learned to do this.

Copy link
Author

Choose a reason for hiding this comment

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

@eliperkins sure thing, what changes do you suggest?

backgroundColor: '#F3F3F3',
},
backgroundLogo: {
position: 'absolute',
Copy link
Contributor

Choose a reason for hiding this comment

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

This absolute positioning feels like a dangerous best-practice to recommend to first-time React Native users. I wonder if there's a way for us to tuck this away or hide this complexity a bit by having a cropped image instead?

Choose a reason for hiding this comment

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

I think that what we can do is put the logo above te text

Copy link
Author

Choose a reason for hiding this comment

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

@eliperkins what do you suggest?

Copy link
Author

Choose a reason for hiding this comment

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

I'm not sure about this one

opacity: 0.3,
alignItems: 'center',
justifyContent: 'center',
height: 540,
Copy link
Contributor

Choose a reason for hiding this comment

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

Same with these explicit widths and heights. I'd like to see these use flexbox if possible!

paddingVertical: 8,
},
link: {
width: '40%',
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I wonder how this will look on iPad and other tablets? What do you think about making this a maxWidth instead, given that we know the titles will generally be relatively short.

Choose a reason for hiding this comment

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

This was the result with maxWidth:
Screen Shot 2019-05-02 at 9 33 47 PM

So I remake it with the Flex property. This was the result:
Screen Shot 2019-05-02 at 9 35 51 PM

Copy link

@estevaolucas estevaolucas left a comment

Choose a reason for hiding this comment

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

@karanpratapsingh nice work.
I was not able to run locally but would be dupe if this template scales up and down properly with different font sizes (Settings app -> General -> Accessibility -> Larger Text)

@@ -0,0 +1,41 @@
import React from 'react'

Choose a reason for hiding this comment

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

I saw you've added flow config. Do you plan to add type definition for those files?

Copy link
Author

Choose a reason for hiding this comment

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

I'm not entirely familiar with flow sir so I don't have a plan for flow

Copy link

@estevaolucas estevaolucas May 3, 2019

Choose a reason for hiding this comment

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

base on what we have in the current App.js, and since Flow isn't required to run RN, I think it makes sense to not have Flow nor propTypes.

Choose a reason for hiding this comment

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

I agree w/ you @elucaswork

@glauberfc
Copy link

glauberfc commented May 2, 2019

@cpojer what steps do I need to follow to help to solve the requested changes? I need fork the @karanpratapsingh repo or only update the fork of RN that I made? I need to pull some thing?

@cpojer
Copy link
Contributor

cpojer commented May 2, 2019 via email

@glauberfc
Copy link

@cpojer are you using some specific ESLint/Prettier rules on the old welcome screen? If yes, could you share theses configs?

@glauberfc
Copy link

@karanpratapsingh I made the most of changes requested. It is on my fork. We need to decide about 64bits image, the better position of the logo on the screen and the use of Flow.

@karanpratapsingh
Copy link
Author

Sorry guys I took a nap, I'll be working along with @glauberfc for this, it'll be my pleasure :D

@react-native-bot react-native-bot added the Type: Enhancement A new feature or enhancement of an existing feature. label May 3, 2019
@karanpratapsingh
Copy link
Author

@cpojer can you please explain the changes you require us to do before merge?

@cpojer
Copy link
Contributor

cpojer commented May 4, 2019 via email

@karanpratapsingh
Copy link
Author

@cpojer I've removed the unnecessary files and only kept the component necessary for the new app screen...where should I put them next?

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

@cpojer
Copy link
Contributor

cpojer commented May 4, 2019

Nice! Please move it to “Libraries/NewAppScreen” and run “yarn lint --fix”. You can then check out the RNTester app in this repo and make an example that includes the component.

Please also add the copyright header that’s present in the other files :)

Thank you!

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.
  • flow found some issues.

@karanpratapsingh
Copy link
Author

@cpojer I've moved it to Libraries/NewAppScreen, what is RNTester? how to use it? Sorry this is my first time contributing to this repo :D

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.
  • flow found some issues.

'use strict';

export default {
primary: '#1292B4',

Choose a reason for hiding this comment

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

prettier/prettier: Delete ··

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • flow found some issues.

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

const Section = ({children}) => (

Choose a reason for hiding this comment

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

Missing type annotation for destructuring.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe put it in Same file

const renderSectionHeader = ({section}) => (
<View style={styles.header}>
<Text style={styles.headerText}>SECTION HEADER: {section.key}</Text>
<SeparatorComponent />
</View>
);

@cpojer
Copy link
Contributor

cpojer commented May 4, 2019 via email

@karanpratapsingh
Copy link
Author

@cpojer got it sir

Copy link
Contributor

@gengjiawen gengjiawen left a comment

Choose a reason for hiding this comment

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

Can you highlight App.js, Cmd + R, Cmd + D ?

Update: I see the change already made in code, Can you update the picture in PR description.

@karanpratapsingh
Copy link
Author

Hey, guys, I'll be away for a couple of days, feel free to take a fork and update this PR..sorry

@cpojer
Copy link
Contributor

cpojer commented May 6, 2019

Thanks @karanpratapsingh!

Is there anybody who can take this over for now? :)

@glauberfc
Copy link

Thanks @karanpratapsingh!

Is there anybody who can take this over for now? :)

I can @cpojer

@karanpratapsingh
Copy link
Author

Thanks @karanpratapsingh!
Is there anybody who can take this over for now? :)

I can @cpojer

Sure, @glauberfc please feel free to extend this...tho I'll be available for a short duration

@cpojer
Copy link
Contributor

cpojer commented May 7, 2019

Created a follow-up PR here: #24737

Let's take it from there.

@cpojer cpojer closed this May 7, 2019
facebook-github-bot pushed a commit that referenced this pull request May 8, 2019
Summary:
Continuation of #24687

> Issue: [Polish the "new app screen"](react-native-community/discussions-and-proposals#122)
> This is the pull request for the new intro screen proposal in react native as directed by cpojer

This PR was created because the previous one could not be pushed to for some reason. I cleaned up a few small things and added the component as an example to RNTester so we can keep iterating. My plan is to land this, and then polish it and make it the default in a follow-up.

[General][Added] - New Intro screen, Icons

Removed Lottie Integration
100% React Native 💥
Pull Request resolved: #24737

Differential Revision: D15259092

Pulled By: cpojer

fbshipit-source-id: bc141fb1425cf354f29deffd907c37f83fd92c75
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. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.