|
1 |
| -# Contributing |
| 1 | +# Contributing to NativeBase Formik UI |
2 | 2 |
|
3 |
| -We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. |
| 3 | +We'd love for you to contribute to our source code and to make NativeBase Formik UI even better than it is |
| 4 | +today! Here are some guidelines we'd like you to follow: |
4 | 5 |
|
5 |
| -## Development workflow |
| 6 | +* [Code of Conduct](#coc) |
| 7 | +* [Ways to Contribute](#wtc) |
| 8 | +* [Questions and Problems](#question) |
| 9 | +* [Issues and Bugs](#issue) |
| 10 | +* [Feature Requests](#feature) |
| 11 | +* [Issue Submission Guidelines](#submit) |
| 12 | +* [Setting Up Development Environment ](#dev-env) |
| 13 | +* [Pull Request Submission Guidelines](#submit-pr) |
| 14 | +* [Improving Documentation](#docs) |
6 | 15 |
|
7 |
| -To get started with the project, run `yarn` in the root directory to install the required dependencies for each package: |
| 16 | +## <a name="coc"></a> Code of Conduct |
8 | 17 |
|
9 |
| -```sh |
10 |
| -yarn |
11 |
| -``` |
| 18 | +Help us keep NativeBase Formik UI open and inclusive. Please read and follow our [Code of Conduct](CODE_OF_CONDUCT.md). |
12 | 19 |
|
13 |
| -While developing, you can run the [example app](/example/) to test your changes. |
| 20 | +## <a name="wtc"></a> Ways to Contribute |
14 | 21 |
|
15 |
| -To start the packager: |
| 22 | +If you are eager to start contributing code right away, you can go through [NativeBase Formik UI Bugs](https://github.com/nativebase/nativebase-formik-ui/issues?q=is%3Aopen+is%3Aissue+label%3Abug) that contain bugs. |
16 | 23 |
|
17 |
| -```sh |
18 |
| -yarn example start |
19 |
| -``` |
| 24 | +There are other ways you can contribute without writing a single line of code. Here are a few things you can do to help out: |
20 | 25 |
|
21 |
| -To run the example app on Android: |
| 26 | +1. **Replying and handling open issues.** We get a lot of issues every day, and some of them may lack necessary information. You can help out by guiding people through the process of filling out the issue template, asking for clarifying information, or pointing them to existing issues that match their description of the problem. |
| 27 | +2. **Reviewing pull requests for the docs.** Reviewing [documentation updates](https://github.com/nativebase/website/pulls?q=is%3Aopen+is%3Apr+label%3Anativebase-formik-ui) can be as simple as checking for spelling and grammar. If you encounter situations that can be explained better in the docs, click **Edit** at the bottom left of most docs pages to get started with your own contribution. |
| 28 | +3. **Help people write test plans.** Some pull requests sent to the main repository may lack a proper test plan. These help reviewers understand how the change was tested, and can speed up the time it takes for a contribution to be accepted. |
22 | 29 |
|
23 |
| -```sh |
24 |
| -yarn example android |
25 |
| -``` |
| 30 | +Each of these tasks is highly impactful, and maintainers will greatly appreciate your help. |
26 | 31 |
|
27 |
| -To run the example app on iOS: |
| 32 | +## <a name="requests"></a> Questions, Bugs, Features |
28 | 33 |
|
29 |
| -```sh |
30 |
| -yarn example ios |
31 |
| -``` |
| 34 | +### <a name="question"></a> Got a Question or Problem? |
32 | 35 |
|
33 |
| -Make sure your code passes TypeScript and ESLint. Run the following to verify: |
| 36 | +Do not open issues for general support questions as we want to keep GitHub issues for bug reports |
| 37 | +and feature requests. You've got much better chances of getting your question answered on dedicated |
| 38 | +support platforms, the best being [Stack Overflow](http://stackoverflow.com/questions/tagged/native-base). |
34 | 39 |
|
35 |
| -```sh |
36 |
| -yarn typescript |
37 |
| -yarn lint |
38 |
| -``` |
| 40 | +Stack Overflow is a much better place to ask questions since: |
39 | 41 |
|
40 |
| -To fix formatting errors, run the following: |
| 42 | +- there are thousands of people willing to help on Stack Overflow |
| 43 | +- questions and answers stay available for public viewing so your question / answer might help |
| 44 | + someone else |
| 45 | +- Stack Overflow's voting system assures that the best answers are prominently visible. |
41 | 46 |
|
42 |
| -```sh |
43 |
| -yarn lint --fix |
44 |
| -``` |
| 47 | +To save your and our time, we will systematically close all issues that are requests for general |
| 48 | +support and redirect people to the section you are reading right now. |
45 | 49 |
|
46 |
| -Remember to add tests for your change if possible. Run the unit tests by: |
| 50 | +### <a name="issue"></a> Found an Issue or Bug? |
47 | 51 |
|
48 |
| -```sh |
49 |
| -yarn test |
50 |
| -``` |
| 52 | +If you find a bug in the source code, you can help us by submitting an issue to our |
| 53 | +[GitHub Repository](https://github.com/nativebase/nativebase-formik-ui/issues). Even better, you can submit a Pull Request with a fix. |
51 | 54 |
|
52 |
| -To edit the Objective-C files, open `example/ios/NativebaseFormikUiExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > nativebase-formik-ui`. |
| 55 | +**Please see the [Submission Guidelines](#submit) below.** |
53 | 56 |
|
54 |
| -To edit the Kotlin files, open `example/android` in Android studio and find the source files at `nativebaseformikui` under `Android`. |
| 57 | +### <a name="feature"></a> Missing a Feature? |
55 | 58 |
|
56 |
| -### Commit message convention |
| 59 | +You can request a new feature by submitting an issue to our [GitHub Repository](https://github.com/nativebase/nativebase-formik-ui/issues). |
57 | 60 |
|
58 |
| -We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages: |
| 61 | +If you would like to implement a new feature then consider what kind of change it is: |
59 | 62 |
|
60 |
| -- `fix`: bug fixes, e.g. fix crash due to deprecated method. |
61 |
| -- `feat`: new features, e.g. add new method to the module. |
62 |
| -- `refactor`: code refactor, e.g. migrate from class components to hooks. |
63 |
| -- `docs`: changes into documentation, e.g. add usage example for the module.. |
64 |
| -- `test`: adding or updating tests, e.g. add integration tests using detox. |
65 |
| -- `chore`: tooling changes, e.g. change CI config. |
| 63 | +* **Major Changes** that you wish to contribute to the project should be discussed first in an |
| 64 | + [GitHub issue](https://github.com/nativebase/nativebase-formik-ui/issues) that clearly outlines the changes and benefits of the feature. |
| 65 | +* **Small Changes** can directly be crafted and submitted to the [GitHub Repository](https://github.com/nativebase/nativebase-formik-ui) |
| 66 | + as a Pull Request. See the section about [Contributing Code](#submit-pr). |
66 | 67 |
|
67 |
| -Our pre-commit hooks verify that your commit message matches this format when committing. |
| 68 | +## <a name="submit"></a> Issue Submission Guidelines |
| 69 | +Before you submit your issue search the archive, maybe your question was already answered. |
68 | 70 |
|
69 |
| -### Linting and tests |
| 71 | +If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize |
| 72 | +the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. |
70 | 73 |
|
71 |
| -[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/) |
| 74 | +The "[new issue](https://github.com/nativebase/nativebase-formik-ui/issues/new)" form contains a number of prompts that you should fill out to |
| 75 | +make it easier to understand and categorize the issue. |
72 | 76 |
|
73 |
| -We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing. |
| 77 | +In general, providing the following information will increase the chances of your issue being dealt |
| 78 | +with quickly: |
74 | 79 |
|
75 |
| -Our pre-commit hooks verify that the linter and tests pass when committing. |
| 80 | +* **Issue Description** - if an error is being thrown a non-minified stack trace helps |
| 81 | +* **Motivation for or Use Case** - explain why this is a bug for you |
| 82 | +* **NativeBase Formik UI Version(s)** - is it a regression? |
| 83 | +* **Browsers and Operating System** - is this a problem with all browsers or only specific ones? |
| 84 | +* **Reproduce the Error** - provide a live example (using [expo snack](https://snack.expo.io/) or an unambiguous set of steps. |
| 85 | +* **Related Issues** - has a similar issue been reported before? |
| 86 | +* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be |
| 87 | + causing the problem (line of code or commit) |
76 | 88 |
|
77 |
| -### Scripts |
| 89 | +## <a name="dev-env"></a> Setting Up your Development Environment |
78 | 90 |
|
79 |
| -The `package.json` file contains various scripts for common tasks: |
| 91 | +- Fork this repository. |
80 | 92 |
|
81 |
| -- `yarn bootstrap`: setup project by installing all dependencies and pods. |
82 |
| -- `yarn typescript`: type-check files with TypeScript. |
83 |
| -- `yarn lint`: lint files with ESLint. |
84 |
| -- `yarn test`: run unit tests with Jest. |
85 |
| -- `yarn example start`: start the Metro server for the example app. |
86 |
| -- `yarn example android`: run the example app on Android. |
87 |
| -- `yarn example ios`: run the example app on iOS. |
| 93 | +- Clone your fork of NativeBase: |
88 | 94 |
|
89 |
| -### Sending a pull request |
| 95 | + ```git |
| 96 | + git clone git@github.com:${YOUR_USERNAME}/nativebase-formik-ui.git |
| 97 | + ``` |
90 | 98 |
|
91 |
| -> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). |
| 99 | +- Navigate to NativeBase Formik UI |
92 | 100 |
|
93 |
| -When you're sending a pull request: |
| 101 | + ``` |
| 102 | + cd nativebase-formik-ui/ |
| 103 | + ``` |
94 | 104 |
|
95 |
| -- Prefer small pull requests focused on one change. |
96 |
| -- Verify that linters and tests are passing. |
97 |
| -- Review the documentation to make sure it looks good. |
98 |
| -- Follow the pull request template when opening a pull request. |
99 |
| -- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue. |
| 105 | +- Install dependencies: |
100 | 106 |
|
101 |
| -## Code of Conduct |
| 107 | + ```bash |
| 108 | + yarn |
| 109 | + ``` |
102 | 110 |
|
103 |
| -### Our Pledge |
| 111 | +- Move over to the TestBed Example App and install the dependencies : |
104 | 112 |
|
105 |
| -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. |
| 113 | + ```bash |
| 114 | + cd example |
| 115 | + yarn |
| 116 | + ``` |
106 | 117 |
|
107 |
| -We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. |
| 118 | +- Navigate back to your app: |
108 | 119 |
|
109 |
| -### Our Standards |
| 120 | + ```bash |
| 121 | + cd .. |
| 122 | + ``` |
110 | 123 |
|
111 |
| -Examples of behavior that contributes to a positive environment for our community include: |
| 124 | +- Start the Example App: |
112 | 125 |
|
113 |
| -- Demonstrating empathy and kindness toward other people |
114 |
| -- Being respectful of differing opinions, viewpoints, and experiences |
115 |
| -- Giving and gracefully accepting constructive feedback |
116 |
| -- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience |
117 |
| -- Focusing on what is best not just for us as individuals, but for the overall community |
| 126 | + ```bash |
| 127 | + yarn example start |
| 128 | + ``` |
118 | 129 |
|
119 |
| -Examples of unacceptable behavior include: |
| 130 | + - To start app directly on Web |
| 131 | + ```bash |
| 132 | + yarn example web |
| 133 | + ``` |
| 134 | + - To start app directly on IOS |
| 135 | + ```bash |
| 136 | + yarn example ios |
| 137 | + ``` |
| 138 | + - To start app directly on Android |
| 139 | + ```bash |
| 140 | + yarn example android |
| 141 | + ``` |
120 | 142 |
|
121 |
| -- The use of sexualized language or imagery, and sexual attention or |
122 |
| - advances of any kind |
123 |
| -- Trolling, insulting or derogatory comments, and personal or political attacks |
124 |
| -- Public or private harassment |
125 |
| -- Publishing others' private information, such as a physical or email |
126 |
| - address, without their explicit permission |
127 |
| -- Other conduct which could reasonably be considered inappropriate in a |
128 |
| - professional setting |
| 143 | +and start making the changes. |
129 | 144 |
|
130 |
| -### Enforcement Responsibilities |
| 145 | +## <a name="submit-pr"></a> Contributing Code |
131 | 146 |
|
132 |
| -Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. |
| 147 | +Code-level contributions to NativeBase Formik UI come in the form of [pull requests](https://help.github.com/en/articles/about-pull-requests). These are done by forking the repo and making changes locally. Directly in the repo, there is the [`Storybook Testbed` app](/example) that you can run on your device (or simulators) and use to test the changes you're making to NativeBase Formik UI source. |
133 | 148 |
|
134 |
| -Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. |
| 149 | +The process of proposing a change to NativeBase can be summarized as follows: |
135 | 150 |
|
136 |
| -### Scope |
| 151 | +1. Fork the NativeBase Formik UI repository and create your branch from `master`. |
| 152 | +2. Make the desired changes to the source. Use the `Storybook Testbed` app to test them out. |
| 153 | +3. If you've added code that should be tested, add tests. |
| 154 | +4. If you've changed APIs, update the documentation, which is available [here](https://github.com/nativebase/website/). |
| 155 | +5. Ensure the test suite passes, either locally or on CI once you opened a pull request. |
| 156 | +6. Make sure your code lints. To keep project away from disputes we make use of **ESLint**, which is really a handy linting tool that enforces strict coding styles and makes sure your files are free from dead code. Each module of NativeBase has bundled ESLint as a dev dependency and checks your code everytime you commit. |
| 157 | +7. Push the changes to your fork. |
| 158 | +8. Create a pull request to the NativeBase repository. |
| 159 | +9. Review and address comments on your pull request. |
137 | 160 |
|
138 |
| -This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. |
| 161 | +If all goes well, your pull request will be merged. If it is not merged, maintainers will do their best to explain the reason why. |
139 | 162 |
|
140 |
| -### Enforcement |
141 | 163 |
|
142 |
| -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly. |
143 |
| - |
144 |
| -All community leaders are obligated to respect the privacy and security of the reporter of any incident. |
145 |
| - |
146 |
| -### Enforcement Guidelines |
147 |
| - |
148 |
| -Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: |
149 |
| - |
150 |
| -#### 1. Correction |
151 |
| - |
152 |
| -**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. |
153 |
| - |
154 |
| -**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. |
155 |
| - |
156 |
| -#### 2. Warning |
157 |
| - |
158 |
| -**Community Impact**: A violation through a single incident or series of actions. |
159 |
| - |
160 |
| -**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. |
161 |
| - |
162 |
| -#### 3. Temporary Ban |
163 |
| - |
164 |
| -**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. |
165 |
| - |
166 |
| -**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. |
167 |
| - |
168 |
| -#### 4. Permanent Ban |
169 |
| - |
170 |
| -**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. |
171 |
| - |
172 |
| -**Consequence**: A permanent ban from any sort of public interaction within the community. |
173 |
| - |
174 |
| -### Attribution |
175 |
| - |
176 |
| -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, |
177 |
| -available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. |
178 |
| - |
179 |
| -Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). |
180 |
| - |
181 |
| -[homepage]: https://www.contributor-covenant.org |
182 |
| - |
183 |
| -For answers to common questions about this code of conduct, see the FAQ at |
184 |
| -https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. |
0 commit comments