-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New Intro Screen Proposal #24687
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
New Intro Screen Proposal #24687
Conversation
…gh/react-native into polish-app-screen
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! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
There was a problem hiding this 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”.
There was a problem hiding this 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 😄
Libraries/Template/App.js
Outdated
const App = () => { | ||
return ( | ||
<Fragment> | ||
<SafeAreaView style={styles.topSafeArea} /> |
There was a problem hiding this comment.
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 SafeAreaView
s should generally have children inside, so is this just a spacer? If so, what is it spacing that the second SafeAreaView
is not?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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%', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this 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' |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
@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? |
You can take the code from this PR and send another pull request if Karan is ok with it :) ideally you can give Karan rights to push to your fork so you can keep working on it togetherY
…________________________________
From: Glauber Castro <notifications@github.com>
Sent: Thursday, May 2, 2019 10:29:09 PM
To: facebook/react-native
Cc: Christoph Nakazawa; Mention
Subject: Re: [facebook/react-native] New Intro Screen Proposal (#24687)
@cpojer<https://github.com/cpojer> what steps do I need to follow to help to solve the requested changes? I need fork the @karanpratapsingh<https://github.com/karanpratapsingh> repo or only update the fork of RN that I made?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#24687 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAADIKFNTS22RZCP5W3BOJTPTNMKLANCNFSM4HJ6UTQQ>.
|
@cpojer are you using some specific ESLint/Prettier rules on the old welcome screen? If yes, could you share theses configs? |
@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. |
Sorry guys I took a nap, I'll be working along with @glauberfc for this, it'll be my pleasure :D |
@cpojer can you please explain the changes you require us to do before merge? |
Karan: remove all the template files and only commit the components needed to show the new app screen. We can then include it in RNTester and the app template and iterate on it.
…________________________________
From: Karan Pratap Singh <notifications@github.com>
Sent: Saturday, May 4, 2019 10:33:32 AM
To: facebook/react-native
Cc: Christoph Nakazawa; Mention
Subject: Re: [facebook/react-native] New Intro Screen Proposal (#24687)
@cpojer<https://github.com/cpojer> can you please explain the changes you require us to do before merge?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#24687 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAADIKF3KF77DOSY43KFWFLPTVJ6ZANCNFSM4HJ6UTQQ>.
|
@cpojer I've removed the unnecessary files and only kept the component necessary for the new app screen...where should I put them next? |
There was a problem hiding this 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. Runyarn lint --fix
to automatically fix problems.
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! |
There was a problem hiding this 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. Runyarn lint --fix
to automatically fix problems.
There was a problem hiding this 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. Runyarn lint --fix
to automatically fix problems.flow
found some issues.
@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 |
There was a problem hiding this 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. Runyarn lint --fix
to automatically fix problems.flow
found some issues.
'use strict'; | ||
|
||
export default { | ||
primary: '#1292B4', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier/prettier: Delete ··
There was a problem hiding this 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}) => ( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
react-native/RNTester/js/SectionListExample.js
Lines 46 to 51 in 38483d4
const renderSectionHeader = ({section}) => ( | |
<View style={styles.header}> | |
<Text style={styles.headerText}>SECTION HEADER: {section.key}</Text> | |
<SeparatorComponent /> | |
</View> | |
); |
Check out the RNTester folder, it contains lots of examples of RN components, and you can copy one of them to integrate the new app screen. You can run it on iOS or Android and the website has I instructions for it (sorry on mobile right now).
|
@cpojer got it sir |
There was a problem hiding this 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.
Hey, guys, I'll be away for a couple of days, feel free to take a fork and update this PR..sorry |
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 |
Created a follow-up PR here: #24737 Let's take it from there. |
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
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: