3.9 KiB
Contributing to React Native Paper
React Native Paper was started by satya164 and ahmedlhanafy. Right now, is one of Callstack's open source projects that is currently under active development.
Code of Conduct
We want this community to be friendly and respectful to each other. Please read the full text so that you can understand what actions will and will not be tolerated.
Our Development Process
The core team works directly on GitHub and all work is public.
Workflow and Pull Requests
Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub
Before submitting a pull request, please make sure the following is done:
-
Fork the repo and create your branch from
master(a guide on how to fork a repository) -
We have a commit message convention, messages should start by one of the following:
fix: : for bug fixes, e.g. fix Button color on DarkThemefeat: for new features, e.g. add Snackbar componentrefactor: for code/structure refactor, e.g. new structure folder for componentsBREAKING: for changes that break current versiong usage, e.g. remove withThemedocs: changes into documentation, e.g. add usage example for Buttonchore: tooling changes, e.g. change circle ci configtest: for testcases, eg unit, snapshot testing
-
We use
flow,eslintandprettier. Be sure thatnpm run flowandnpm run lint -- --fixgive no errors. -
If you work on a component:
- Be sure to follow the specifics (design, name convention, etc) described in the official material docs
- For any Text usage, use our components provided in the Typography folder
- If your app depends on the theme always wrap you component with
withThemeto get the theme as a prop instead of the context - Default colors will be provided by the theme, if you find that there's something missing from the theme that might be beneficial for other components don't hesitate to add it
- Make sure to write a brief description of every prop when defining
type Props - Make sure to provide an example usage for the component (check how others do it)
-
In case of doubts, check out the current code. For example, we use the prop
iconnoticonName. -
You can run
yarn run bootstrapwhich will install all the dependencies in example & docs folder respectively.
Running the example
The example app uses Expo. You will need to install the Expo app for Android and iOS to start developing.
After you're done, you can run yarn && yarn start in the example/ folder and scan the QR code to launch it on your device.
Working on documentation
The documentation is automatically generated from the flowtype annotation in the components. You can add comments above the type annotations to add descriptions. To preview the generated documentation, run yarn && yarn start in the docs/ folder.
When your pull request is merged to master, the documentation updates are automatically deployed to the website.
Reporting New Issues
The best way to get your bug fixed is to provide a reduced test case. Please provide a public repository with a runnable example.
How to Get in Touch
- Callstack Open Source Slack - #react-native-paper.
Code Conventions
We use eslint-config-callstack.
License
By contributing to React Native Paper, you agree that your contributions will be licensed under its MIT license.