docs: Make clear that PR diffs should stay small (#35368)

This commit is contained in:
Chris 2025-03-27 12:48:13 +01:00 committed by GitHub
parent 89386628db
commit e82239fcb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,9 +2,14 @@
## Choose an issue
Playwright **requires an issue** for every contribution, except for minor documentation updates. We strongly recommend to pick an issue labeled `open-to-a-pull-request` for your first contribution to the project.
Playwright **requires an issue** for every contribution, except for minor documentation updates. We strongly recommend
to pick an issue
labeled [open-to-a-pull-request](https://github.com/microsoft/playwright/issues?q=is%3Aissue%20state%3Aopen%20label%3Aopen-to-a-pull-request)
for your first contribution to the project.
If you are passionate about a bug/feature, but cannot find an issue describing it, **file an issue first**. This will facilitate the discussion and you might get some early feedback from project maintainers before spending your time on creating a pull request.
If you are passionate about a bug/feature, but cannot find an issue describing it, **file an issue first**. This will
facilitate the discussion, and you might get some early feedback from project maintainers before spending your time on
creating a pull request.
## Make a change
@ -40,7 +45,7 @@ Playwright is a multi-package repository that uses npm workspaces. For browser A
Note that some files are generated by the build, so the watch process might override your changes if done in the wrong file. For example, TypeScript types for the API are generated from the [`docs/src`](https://github.com/microsoft/playwright/blob/main/docs/src).
Coding style is fully defined in [.eslintrc](https://github.com/microsoft/playwright/blob/main/.eslintrc.js). Before creating a pull request, or at any moment during development, run linter to check all kinds of things:
Coding style is fully defined in [eslint.config.mjs](https://github.com/microsoft/playwright/blob/main/eslint.config.mjs). Before creating a pull request, or at any moment during development, run linter to check all kinds of things:
```bash
npm run lint
```
@ -98,10 +103,10 @@ footer
- `test` - test-only changes
- `devops` - changes to the CI or build
- `chore` - everything that doesn't fall under previous categories
1. *namespace* is put in parenthesis after label and is optional. Must be lowercase.
1. *title* is a brief summary of changes.
1. *description* is **optional**, new-line separated from title and is in present tense.
1. *footer* is **optional**, new-line separated from *description* and contains "fixes" / "references" attribution to github issues.
2. *namespace* is put in parentheses after label and is optional. Must be lowercase.
3. *title* is a brief summary of changes.
4. *description* is **optional**, new-line separated from title and is in present tense.
5. *footer* is **optional**, new-line separated from *description* and contains "fixes" / "references" attribution to GitHub issues.
Example:
@ -116,7 +121,9 @@ Fixes #123, references #234.
## Send a pull request
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose.
Make sure to keep your PR (diff) small and readable. If necessary, split your contribution into multiple PRs.
Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests.
After a successful code review, one of the maintainers will merge your pull request. Congratulations!
@ -133,7 +140,7 @@ To run tests with custom browser executable, specify `CRPATH`, `WKPATH` or `FFPA
CRPATH=<path-to-executable> npm run ctest
```
You will also find `DEBUG=pw:browser` useful for debugging custom builds.
You will also find `DEBUG=pw:browser` useful for debugging custom-builds.
**Building documentation site**