You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,32 @@ Or run the documentation and browse to [http://localhost:1234/](http://localhost
77
77
yarn start:docs
78
78
```
79
79
80
+
### Component/Hook scaffolding
81
+
If you are looking to contribute a brand new component or Hook in a package that does not exist yet, please run the following command.
82
+
```bash
83
+
yarn plop
84
+
```
85
+
This will start a series of cli prompts to determine what template files and folders should be generated to help quick start your contribution.
86
+
The prompts are as follows:
87
+
88
+
1. What type of project are you setting up?
89
+
- Select "React Spectrum v3"
90
+
91
+
2. Scope name(s)
92
+
- Select the package scopes that make sense for your contribution (e.g. react-spectrum if you are contributing a component, react-aria for an aria Hook, etc)
93
+
94
+
3. Package name, all lowercase (e.g. textfield)
95
+
96
+
4. Component name, please use appropriate uppercase (e.g. TextField)
97
+
- If you are contributing a non-component Hook, just enter the name of your Hook.
98
+
99
+
5. Component css module name, blank if N/A. If unsure, check @adobe/spectrum-css-temp/components for a module containing the desired css (e.g. textfield)
100
+
- If you cannot find the component CSS module name in @adobe/spectrum-css-temp/components, feel free to reach out to a team member via GitHub Issues or Discussions.
101
+
102
+
Upon answering all the prompts, the appropriate package(s) should be generated and ready for modification.
103
+
104
+
**Note:** With regards to the generated docs files, please feel free to remove them if you won't be contributing docs. If you are contributing docs for a new component or Hook, please submit them in a separate pull request so that we can decide when to deploy them to our docs site.
105
+
80
106
### Tests
81
107
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.
0 commit comments