Skip to content

Commit 5eaab84

Browse files
nojafmediremi
andauthored
Add section on domProps (#7815)
* Add section on domProps * Update CONTRIBUTING.md Co-authored-by: Médi-Rémi Hashim <[email protected]> --------- Co-authored-by: Médi-Rémi Hashim <[email protected]>
1 parent 9ce1432 commit 5eaab84

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,36 @@ To generate the html:
339339
../scripts/ninja docs
340340
```
341341

342+
## Contribute to JSX `domProps`
343+
344+
The `domProps` type, defined in [packages/@rescript/runtime/JsxDOM.res](packages/@rescript/runtime/JsxDOM.res), dictates which properties can be used on DOM elements. This list isn't exhaustive, so you might want to contribute a missing prop.
345+
346+
Adding a new entry there requires re-running the analysis tests. Follow these steps:
347+
348+
1. Compile your changes:
349+
```bash
350+
make lib
351+
```
352+
2. (Optional) If your local compiler is outdated, rebuild:
353+
```bash
354+
make build
355+
```
356+
3. Run the analysis tests. This will likely fail due to an outdated autocomplete test snapshot:
357+
```bash
358+
make test-analysis
359+
```
360+
4. Add the updated snapshot to Git:
361+
```bash
362+
git add tests/analysis_tests
363+
```
364+
5. Re-run the analysis tests. They should now pass:
365+
```bash
366+
make test-analysis
367+
```
368+
369+
(If a `make` command fails, consider using the [DevContainer](#b-devcontainer).)
370+
371+
Finally, add a line to [CHANGELOG.md](CHANGELOG.md), using the `#### :nail_care: Polish` section.
342372
## Code structure
343373

344374
The highlevel architecture is illustrated as below:

0 commit comments

Comments
 (0)