|
| 1 | +# Contributing |
| 2 | + |
| 3 | +We are glad that you are willing to contribute to the Tiny Robot open source project. There are many forms of contribution, and you can choose one or more of them according to your strengths and interests: |
| 4 | + |
| 5 | +- Report [new defect](https://github.com/opentiny/tiny-robot/issues/new?template=bug_report.yml) |
| 6 | +- Provide more detailed information for [existing defects](https://github.com/opentiny/tiny-robot/labels/bug), such as supplementary screenshots, more detailed reproduction steps, minimum reproducible demo links, etc. |
| 7 | +- Submit Pull Requests to fix typos in the document or make the document clearer and better |
| 8 | + |
| 9 | +When you become familiar with Tiny Robot, you can try to do something more challenging, such as: |
| 10 | + |
| 11 | +- Fix defects |
| 12 | +- Implement new features |
| 13 | +- Improve unit testing |
| 14 | +- Translate the document |
| 15 | +- Participate in code review |
| 16 | + |
| 17 | +## Bug Reports |
| 18 | + |
| 19 | +If you encounter problems while using Tiny Robot components, you are welcome to submit an Issue. Before submitting, please read the relevant documentation carefully to confirm whether this is a defect or an unimplemented feature. |
| 20 | + |
| 21 | +If it is a defect, select the [Bug report](https://github.com/opentiny/tiny-robot/issues/new?template=bug_report.yml) template when creating a new Issue. The title should follow the format `[componentName] defect description`. For example: `[bubble] message content is not updated when data changes`. |
| 22 | + |
| 23 | +Issue that reports defects should mainly include: |
| 24 | + |
| 25 | +- Version numbers of `@opentiny/tiny-robot` and `vue`. |
| 26 | +- The performance of the defect can be illustrated by screenshot; if there is an error, the error message can be posted. |
| 27 | +- Defect reproduction steps, preferably with a minimum reproducible demo link. |
| 28 | + |
| 29 | +If it is a new feature, select the [Feature request](https://github.com/opentiny/tiny-robot/issues/new?template=feature_request.yml) template. The title should follow the format `[componentName] new feature description`. For example: `[sender] hope to support custom placeholder`. |
| 30 | + |
| 31 | +The following information is required for a new feature Issue: |
| 32 | + |
| 33 | +- What problems does this feature mainly solve for users? |
| 34 | +- What is the API of this feature? |
| 35 | + |
| 36 | +## Pull Requests |
| 37 | + |
| 38 | +Before submitting a pull request, please make sure that your submission is in line with the overall plan of Tiny Robot. Generally, issues marked as [bug](https://github.com/opentiny/tiny-robot/labels/bug) are encouraged for pull requests. If you are not sure, you can create a [Discussion](https://github.com/opentiny/tiny-robot/discussions) for discussion. |
| 39 | + |
| 40 | +### Pull Request Specification |
| 41 | + |
| 42 | +#### Commit Message |
| 43 | + |
| 44 | +The commit message should be in the form of `type(scope): description`, e.g. `fix(components): [bubble] fix xxx bug`. |
| 45 | + |
| 46 | +1. **type**: must be one of build, chore, ci, docs, feat, fix, perf, refactor, revert, release, style, test, improvement. |
| 47 | + |
| 48 | +2. **scope** (optional): package or component name, e.g. `components`, `kit`, `bubble`, `sender`, `docs`, etc. |
| 49 | + |
| 50 | +#### Pull Request Title |
| 51 | + |
| 52 | +The title should follow the same convention as the commit message, in the form of `type(scope): description`. |
| 53 | + |
| 54 | +#### Pull Request Description |
| 55 | + |
| 56 | +Please fill in the relevant information of the PR, including: |
| 57 | + |
| 58 | +- PR checklist: whether the commit message follows the specifications, whether E2E/test cases are supplemented if needed, and whether documentation is updated if needed |
| 59 | +- PR type: Bugfix / Feature / Code style update / Refactoring / Docs / etc. |
| 60 | +- Related Issue number (if any) |
| 61 | +- Does this PR introduce a breaking change? |
| 62 | + |
| 63 | +### Local Startup Steps |
| 64 | + |
| 65 | +- Fork the [Tiny Robot](https://github.com/opentiny/tiny-robot) repository to your personal account. |
| 66 | +- Clone your fork to local. |
| 67 | +- Add the upstream remote to sync with the latest code from the upstream repository. |
| 68 | +- Run `pnpm i` in the Tiny Robot root directory to install dependencies. |
| 69 | +- Run `pnpm dev` to start the docs and playground. |
| 70 | +- Open the browser to access the docs and playground. |
| 71 | + |
| 72 | +```shell |
| 73 | +# Replace username with your own GitHub username |
| 74 | +git clone git@github.com:username/tiny-robot.git |
| 75 | +cd tiny-robot |
| 76 | + |
| 77 | +# Add upstream remote |
| 78 | +git remote add upstream git@github.com:opentiny/tiny-robot.git |
| 79 | + |
| 80 | +# Install dependencies |
| 81 | +pnpm i |
| 82 | + |
| 83 | +# Start docs and playground |
| 84 | +pnpm dev |
| 85 | +``` |
| 86 | + |
| 87 | +### Submit a PR |
| 88 | + |
| 89 | +- Make sure you have completed the local startup steps and can run the project normally. |
| 90 | +- Sync the latest code from the upstream `develop` branch: `git pull upstream develop`. |
| 91 | +- Create a new branch from the upstream `develop` branch: `git checkout -b username/feat-xxx upstream/develop` (or `username/fix-xxx` for bugfix). Branch name should be `username/feat-xxx` or `username/fix-xxx`. |
| 92 | +- Make your changes locally. |
| 93 | +- Commit following the [Conventional Commits](https://www.conventionalcommits.org/) specification. PRs that do not follow the specification may not be merged. |
| 94 | +- Push to your fork: `git push origin branchName`. |
| 95 | +- Open the [Pull requests](https://github.com/opentiny/tiny-robot/pulls) page of the Tiny Robot repository and click **New pull request** to submit the PR. |
| 96 | +- Fill in the PR description (checklist, type, related Issue, breaking change). |
| 97 | +- After the maintainers review and comment, update the code as needed. New commits on the branch will automatically appear in the same PR. |
| 98 | +- After approval, a maintainer will merge the PR. |
| 99 | + |
| 100 | +Thank you for your contribution! |
0 commit comments