|
| 1 | +# Contributing Guide |
| 2 | + |
| 3 | +Language: English | [简体中文](CONTRIBUTING.zh-CN.md) |
| 4 | + |
| 5 | +Thank you for your interest in contributing to the GenUI SDK open source project! There are many ways to contribute—you can choose one or more based on your strengths and interests: |
| 6 | + |
| 7 | +- [Report new bugs](https://github.com/opentiny/genui-sdk/issues/new?template=bug-report.yml) |
| 8 | +- Provide more details for [existing bugs](https://github.com/opentiny/genui-sdk/labels/bug), such as screenshots, detailed reproduction steps, or links to minimal reproducible demos |
| 9 | +- Fix typos or improve documentation |
| 10 | +- Fix bugs |
| 11 | +- Implement new features |
| 12 | +- Improve unit tests |
| 13 | +- Participate in code reviews |
| 14 | + |
| 15 | +## Submitting Issues |
| 16 | + |
| 17 | +Use GitHub Issues to report bugs. Please include the following information: |
| 18 | + |
| 19 | +- **Clear problem description**: Describe what issue you encountered |
| 20 | +- **Reproduction steps**: Describe in detail how to reproduce the issue |
| 21 | +- **Expected vs actual behavior**: Explain what you expected and what actually happened |
| 22 | +- **Environment information**: Node version, OS, relevant dependency versions, etc. |
| 23 | + |
| 24 | +## Feature Requests |
| 25 | + |
| 26 | +If you have ideas for new features, please submit them via [Issues](https://github.com/opentiny/genui-sdk/issues). Include: |
| 27 | + |
| 28 | +- What problem the feature would solve |
| 29 | +- Your expected API or usage pattern |
| 30 | + |
| 31 | +## Submitting Pull Requests |
| 32 | + |
| 33 | +1. **Fork this repository**: Click the Fork button on the [GenUI SDK](https://github.com/opentiny/genui-sdk) repository |
| 34 | +2. **Create a new branch**: `git checkout -b feature/amazing-feature` and start your changes |
| 35 | +3. **Follow code style**: Ensure your code adheres to the project's coding standards |
| 36 | +4. **Update documentation**: Update README.md or relevant docs if needed |
| 37 | +5. **Submit Pull Request**: Submit a PR after completing your changes |
| 38 | + |
| 39 | +### Running the Playground Locally |
| 40 | + |
| 41 | +- After forking to your account, clone your fork to your local machine |
| 42 | +- Add the upstream remote to sync with the latest upstream code |
| 43 | +- Run `pnpm i` in the genui-sdk root directory to install dependencies |
| 44 | +- Run `pnpm dev` to start the playground |
| 45 | +- Open your browser to access it |
| 46 | + |
| 47 | +```shell |
| 48 | +# Replace username with your GitHub username |
| 49 | +git clone git@github.com:username/genui-sdk.git |
| 50 | +cd genui-sdk |
| 51 | + |
| 52 | +# Add upstream remote |
| 53 | +git remote add upstream git@github.com:opentiny/genui-sdk.git |
| 54 | + |
| 55 | +# Install dependencies |
| 56 | +pnpm i |
| 57 | + |
| 58 | +# Start Playground development environment |
| 59 | +pnpm dev |
| 60 | +``` |
| 61 | + |
| 62 | +### Running Other Projects Locally |
| 63 | + |
| 64 | +The setup steps for server, docs, etc. are similar to the playground—only the start command differs. See `package.json` for specific commands. |
| 65 | + |
| 66 | +### PR Submission Steps |
| 67 | + |
| 68 | +1. Ensure your local development environment is set up and running correctly |
| 69 | +2. Sync with upstream: `git pull upstream main` |
| 70 | +3. Create a new branch from upstream: `git checkout -b username/feature-name upstream/main` |
| 71 | +4. Develop locally |
| 72 | +5. Follow [Conventional Commits](https://www.conventionalcommits.org/) when committing |
| 73 | +6. Push to your fork: `git push origin branch-name` |
| 74 | +7. Create a PR on the [Pull Requests](https://github.com/opentiny/genui-sdk/pulls) page |
| 75 | +8. Wait for code review and address feedback |
| 76 | + |
| 77 | +## Join the Community |
| 78 | + |
| 79 | +If you're interested in GenUI SDK or the OpenTiny open source project, you're welcome to join via: |
| 80 | + |
| 81 | +- Add WeChat assistant: `opentiny-official` to join the tech discussion group |
| 82 | +- Join the mailing list: <opentiny@googlegroups.com> |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +Thank you for contributing! |
0 commit comments