Skip to content

Refactor Input Component #497

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

Merged
merged 3 commits into from
Jul 18, 2017
Merged

Refactor Input Component #497

merged 3 commits into from
Jul 18, 2017

Conversation

Monte9
Copy link
Collaborator

@Monte9 Monte9 commented Jul 16, 2017

Major Breaking changes

Please see the /example app for the above implementation.

Really simple and useful API:

Input.propTypes = {
  containerStyle: ViewPropTypes.style,

  icon: PropTypes.object,
  iconContainerStyle: ViewPropTypes.style,

  inputStyle: PropTypes.object,

  displayError: PropTypes.bool,
  errorStyle: PropTypes.object,
  errorMessage: PropTypes.string,
};

Also handles 3 TextInput functions:

this.input.focus();
this.input.blur();
this.input.clear();

@Monte9 Monte9 changed the title Refactor Input component - v1 Refactor Input Component Jul 16, 2017
@Monte9
Copy link
Collaborator Author

Monte9 commented Jul 16, 2017

/cc @binoy14 @iRoachie @nonotest

@@ -0,0 +1,117 @@
import PropTypes from 'prop-types';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the file that needs to be reviewed.

@Monte9
Copy link
Collaborator Author

Monte9 commented Jul 16, 2017

Also here are some cool UI designs to port over using RNE: https://www.pinterest.com/timoa/mobile-ui-logins/

$50 🤑 for anyone wanting to contribute and create an entire screen

@iRoachie
Copy link
Collaborator

@Monte9 Maybe select some, out of the bunch?

@Monte9
Copy link
Collaborator Author

Monte9 commented Jul 16, 2017

@iRoachie
Copy link
Collaborator

@Monte9 Is it only the text fields you're interested in?

@Monte9
Copy link
Collaborator Author

Monte9 commented Jul 16, 2017

Ideally, the whole view. Any of those can easily be recreated with the refactored Button component, Input component, bg image, and flex.

For instance, here's one I created:

@iRoachie
Copy link
Collaborator

@Monte9 Oh so screens to put in the showcase? I can make them, just wondering what was reasoning behind it.

@Monte9
Copy link
Collaborator Author

Monte9 commented Jul 16, 2017

@iRoachie exactly. The idea is to help developers bootstrap their RN app can by giving them an "unfair" advance as they can literally copy a screen from our showcase app and built on top of it.

And on the flip side, any dev that creates these screens and contributes back to RNE, will be getting paid $50/screen for it. So it's a win-win.

It would be awesome if you can create the first screen and kick this idea off. 😉

@iRoachie
Copy link
Collaborator

Will take a jab after release 0.14

@Monte9
Copy link
Collaborator Author

Monte9 commented Jul 17, 2017

@xavier-villelegier @martinezguillaume is this something you guys would be interested in? ^^

@xavier-villelegier
Copy link
Collaborator

xavier-villelegier commented Jul 17, 2017

@Monte9 Sure, we'll try to look into it this week. It can be a good showcase of what can be done with RNE. On which branch should we be based to have those new components (input_v1/button_v1) ? The idea is to put these screens in the new example app ?

@Monte9 Monte9 changed the base branch from button_v1 to v1 July 17, 2017 21:59
@Monte9
Copy link
Collaborator Author

Monte9 commented Jul 18, 2017

Alright, the Input v1 API looks pretty solid to me. I was able to create a pretty nice looking input field with it for login. (see updated image above)

Also there are lots of opportunities to help out with this if anyone is interested. Please see this: https://github.com/react-native-training/react-native-elements/projects/4

Merging this PR into v1

@Monte9 Monte9 merged commit af09e20 into v1 Jul 18, 2017
@Monte9
Copy link
Collaborator Author

Monte9 commented Jul 18, 2017

@xavier-villelegier all the latest changes are on the v1 branch. You can branch off of that as it has the new Button & Input components.

Also the idea is to basically create entire screens for the app (login view/sign up view/feed view/profile view) using RNE v1 so that anyone looking for UI ideas with RN can literally copy and paste the code to get started. Plus it will show them how useful the RNE library is and help them leverage the library the right way.

You can see all the available tasks here: https://github.com/react-native-training/react-native-elements/projects/4

/cc @iRoachie @martinezguillaume ^^

@iRoachie
Copy link
Collaborator

@Monte9 Gotcha will chip in after the release. Release notes are fun :D

@iRoachie iRoachie deleted the input_v1 branch January 12, 2018 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants