Skip to content

RN Docs Templates

Ayush Jain edited this page Aug 14, 2020 · 7 revisions

Issue

Guidelines

  • Create an issue from todo.
  • Add title and the body.
  • Move issue to In progress while working.

Template

Title:

Update Button Component in react-native

Body:

- [x] Copy the title and prop descriptions from react-native-website docs to comments in Button.js.
- [x] Use of default, type and platform annotation in prop documentation.
- [x] Cap all comments to 80 characters.

Commit

This isn't a standard/suggestion but I am using it so I've kept it as a reference.

Update the KeyboardAvoidingView component

* Update the title and prop description from docs.
* Remove asterisks from the comments.
* Add snackplayer example.
* Cap comments to 80 characters.
* Add platform, default and type annotations.

PR

PR Template

Title:

Update the KeyboardAvoidingView component

Body:

Fixes https://github.com/MLH-Fellowship/react-native/issues/43

## Summary
The PR is part of an effort to update the code comments to match the current documentation on the React Native website. The project is a part of MLH fellowship program and involves automatic generation of the website docs from code comments and flow types as the end result.

To learn more about the project you can visit the project wiki: 
- [Project details](https://github.com/MLH-Fellowship/0.4.x-projects/wiki/React-Native-Flowtype-API-Docs-Generator)
- [RN Docs Standards](https://github.com/MLH-Fellowship/react-native/wiki/RN-Docs-standards)

Link to the documentation(the source of truth): 
- [keyboardavoidingview.md](https://github.com/MLH-Fellowship/react-native-website/blob/master/docs/keyboardavoidingview.md)

## Changes
* Update the title and prop description from docs.
* Remove unnecessary * from the code comments.
* Add Snack player example specified in the docs to the code comments.
* Remove default values from description and add it to @default annotation.
* Cap comments to 80 characters.

## Changelog
[Internal]

## Test Plan
All changes are made to the code comments and thus there is no need for testing.

Guidelines

  • Replace the sample links in the template with the actual ones.
  • Include a full link to the issue and not #33 as you would have to add it later while creating a PR on FB.
  • Include a direct link to the Markdown file you used as the source of the information.
  • Don't include anything that doesn't help the reviewers to understand the PR.
  • Squash the commits before sending the PR to the Facebook repo.

Opening PR to facebook/react-native repo:

  1. Copy the PR description to it.
  2. Add a link to the MLH PR in format [Reviewed by @jevakallio](https://github.com/MLH-Fellowship/react-native/pull/33) to the end of the PR description. This will link the PRs and the FB reviewer can see the stamped.
  3. Ping @motiz88 on RN Discord with the link
  4. Close the MLH fork PR