-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:adobe/react-spectrum into clean-up-…
…lint-warnings
- Loading branch information
Showing
882 changed files
with
17,258 additions
and
2,956 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,132 @@ | ||
# Contributing | ||
# Contribute | ||
|
||
Thanks for choosing to contribute! | ||
We are currently in pre-release mode and are actively working on getting to a stable version. Please talk to us or file an issue before contributing. | ||
Thanks for choosing to contribute! We look forward to improving web applications together. Here you will find information on how to propose bug fixes, suggest improvements, and develop locally. | ||
|
||
The following is a set of guidelines to follow when contributing to this project. | ||
## Better together | ||
We believe that the best way to build a better web is together as a community. The React Spectrum project aims to make it easier to build design systems and component libraries with high quality interactions and accessibility for all. The core team and all external contributors follow the same process in order maintain a high quality codebase. | ||
|
||
## Code Of Conduct | ||
## Code of conduct | ||
We adhere to the Adobe [code of conduct](https://github.com/adobe/react-spectrum/blob/main/CODE_OF_CONDUCT.md) and by participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected]. | ||
|
||
This project adheres to the Adobe [code of conduct](./CODE_OF_CONDUCT.md). By participating, | ||
you are expected to uphold this code. Please report unacceptable behavior to | ||
[[email protected]](mailto:Grp-opensourceoffice@adobe.com). | ||
## Reporting issues | ||
### Bugs | ||
We use [GitHub issues](https://github.com/adobe/react-spectrum/issues) to track work and log bugs. Please check existing issues before filing anything new. We do our best to respond to issues within a few days. If you would like to contribute a fix, please let us know by leaving a comment on the issue. | ||
|
||
## Have A Question? | ||
The best way to reduce back and forth on a bug is provide a small code example exhibiting the issue along with steps to reproduce it. If you would like to work on a bugfix yourself, make sure an issue exists first. | ||
|
||
Start by filing an issue. The existing committers on this project work to reach | ||
consensus around project direction and issue solutions within issue threads | ||
(when appropriate). | ||
Please follow the issue templates when filing new ones and add as much information as possible. | ||
|
||
## Contributor License Agreement | ||
### Feature requests | ||
Our components can always be improved upon. If you have a feature request, you can use our Feature Request issue template. For larger scopes of work, it is a good idea to open a Request For Comments (RFC) first to gather feedback from the team. Please follow our RFC [template](https://github.com/adobe/react-spectrum/blob/main/rfcs/template.md). Make a PR to add your RFC to the [rfcs folder](https://github.com/adobe/react-spectrum/tree/main/rfcs) to give the team and the community a chance to discuss the proposal. | ||
|
||
All third-party contributions to this project must be accompanied by a signed contributor | ||
license agreement. This gives Adobe permission to redistribute your contributions | ||
as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You | ||
only need to submit an Adobe CLA one time, so if you have submitted one previously, | ||
you are good to go! | ||
### Security issues | ||
Security issues shouldn't be reported on this issue tracker. Instead, please follow the directions [here](https://helpx.adobe.com/security/alertus.html) to contact our security team. | ||
|
||
## Code Reviews | ||
## Pull Requests | ||
For significant changes, it is recommended that you first propose your solution in [an RFC](#feature-requests) and gather feedback. | ||
|
||
All submissions should come in the form of pull requests and need to be reviewed | ||
by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/) | ||
for more information on sending pull requests. | ||
A few things to keep in mind before submitting a pull request: | ||
|
||
Lastly, please follow the [pull request template](.github/PULL_REQUEST_TEMPLATE.md) when | ||
submitting a pull request! | ||
- Add a clear description covering your changes | ||
- Reference the issue in the description | ||
- Make sure linting and tests pass | ||
- Include relevant unit tests | ||
- Add/update stories in storybook for your changes | ||
- Update documentation | ||
- Remember that all submissions require review, please be patient. | ||
|
||
## From Contributor To Committer | ||
The team will review all pull requests and do one of the following: | ||
- request changes to it (most common) | ||
- merge it | ||
- close it with an explanation. | ||
|
||
We love contributions from our community! If you'd like to go a step beyond contributor | ||
and become a committer with full write access and a say in the project, you must | ||
be invited to the project. The existing committers employ an internal nomination | ||
process that must reach lazy consensus (silence is approval) before invitations | ||
are issued. If you feel you are qualified and want to get more deeply involved, | ||
feel free to reach out to existing committers to have a conversation about that. | ||
Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/) for more information on sending pull requests. | ||
|
||
## Security Issues | ||
Lastly, please follow the pull request template when submitting a pull request! | ||
|
||
Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html). | ||
### Contributor License Agreement | ||
All third-party contributions to this project must be accompanied by a signed contributor license agreement. This gives Adobe permission to redistribute your contributions as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You only need to submit an Adobe CLA one time, so if you have submitted one previously, you are good to go! | ||
|
||
## Where to start | ||
There are many places to dive into react-spectrum to help out. Before you take on a feature or issue, make sure you become familiar with [our architecture](architecture.html). | ||
|
||
If you are looking for place to start, consider the following options: | ||
- Look for issues tagged with help wanted and/or good first issue. | ||
- Help triage existing issues by investigating problems and following up on missing information. | ||
- Update missing or fix existing documentation | ||
- Review and test open pull requests | ||
|
||
## Developing | ||
When you are ready to start developing you can clone the repo and start storybook. | ||
Make sure you have the following requirements installed: [node](https://nodejs.org/) (v11.0.0+) and [yarn](https://yarnpkg.com/en/) (v1.22.0+) | ||
|
||
Fork the repo first using [this guide](https://help.github.com/articles/fork-a-repo), then clone it locally. | ||
``` | ||
git clone https://github.com/YOUR-USERNAME/react-spectrum | ||
cd react-spectrum | ||
yarn install | ||
``` | ||
|
||
You can then run the storybook and browse to [http://localhost:9003](http://localhost:9003) with: | ||
```bash | ||
yarn start | ||
``` | ||
|
||
Or run the documentation and browse to [http://localhost:1234/](http://localhost:1234/) with: | ||
```bash | ||
yarn start:docs | ||
``` | ||
|
||
### Tests | ||
We use [jest](https://jestjs.io/) for unit tests and [react-testing-library](https://testing-library.com/docs/react-testing-library/intro) for rendering and writing assertions. Please make sure you include tests with your pull requests. Our CI will run the tests on PRs as well as the linter and type checker. You can see on each PR whether you have passed all our checks. We split the tests into 2 groups. | ||
|
||
*Visual tests* | ||
- A Storybook story should be written for each visual state that a component can be in (based on props). | ||
|
||
*Unit tests* | ||
- (Props) Anything that should be changed by a prop should be tested via react-testing-library. | ||
- (Events) Anything that should trigger an event should be tested via react-testing-library. | ||
|
||
You can run the tests with: | ||
|
||
```bash | ||
yarn jest | ||
``` | ||
|
||
You can also get a code coverage report by running: | ||
|
||
```bash | ||
yarn jest --coverage | ||
``` | ||
|
||
### Linting | ||
The code is linted with [eslint](https://eslint.org/). The linter runs whenever you run the tests, but you can also run it with | ||
```bash | ||
yarn lint | ||
``` | ||
|
||
### TypeScript | ||
The code for React Spectrum is written in [TypeScript](https://www.typescriptlang.org/). The type checker will usually run in your editor, but also runs when you run | ||
```bash | ||
yarn lint | ||
``` | ||
|
||
### Storybook | ||
We use [Storybook](https://storybooks.js.org) for local development. Run the following command to start it: | ||
```bash | ||
yarn start | ||
``` | ||
Then, open [http://localhost:9003](http://localhost:9003) in your browser to play around with the components and test your changes. | ||
|
||
### Documentation | ||
Our documentation should always remain up to date. When making changes to components, make sure the appropriate documentation has been updated to reflect those changes. Documentation for each component can be found in the docs folder within a component's package. Other documentation pages can be found in the [packages/dev/docs](https://github.com/adobe/react-spectrum/tree/main/packages/dev/docs) folder in the codebase. | ||
|
||
Documentation can be run locally by using | ||
```bash | ||
yarn start:docs | ||
``` | ||
Then, open [http://localhost:1234](http://localhost:1234) in your browser. | ||
|
||
## Contributor to committer | ||
|
||
We love contributions from our community! If you'd like to go a step beyond contributor and become a committer with full write access and a say in the project, you must be invited. The existing committers employ an internal nomination process that must reach lazy consensus (silence is approval) before invitations are issued. If you feel you are qualified and want to get more deeply involved, feel free to reach out to existing committers to have a conversation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.