CONTRIBUTING.md: setup, where things go, the house rules reviews catch, checks, license
This commit is contained in:
1 parent
a52a3a0f29
commit
157176e2fb
2 files changed
+50
-1
No files matched your search
@@ -0,0 +1,49 @@
|
||||
# Contributing
|
||||
|
||||
Thanks for helping. Bugs, component requests and pull requests are all welcome.
|
||||
|
||||
## Before you start
|
||||
|
||||
- Try the component live at https://elygpui.com/components/ first; it may already do what you need.
|
||||
- Open an issue from a template (Bug Report, Component Request or Other) before a large change, so we agree on the shape first.
|
||||
|
||||
## Setup
|
||||
|
||||
- Rust 1.95 with `rustup target add wasm32-unknown-unknown`. No full Xcode needed: gpui compiles its shaders at runtime.
|
||||
- For the website: Node 24 and pnpm 11.
|
||||
- Development happens on macOS; the capture tool needs it.
|
||||
|
||||
```sh
|
||||
cargo run --example gallery # every chapter, light and dark
|
||||
cargo run --example gallery -- --page forms
|
||||
```
|
||||
|
||||
## Where things go
|
||||
|
||||
- A component lives in `src/<chapter>/`, one folder per chapter. One component, one home; anything that duplicates another points to it.
|
||||
- Its demo is a story on the chapter's page, `examples/gallery/pages/<chapter>.rs`. After adding or renaming a story, run `python3 scripts/stories.py`.
|
||||
- `TASKS.md` and `tasks/` track every component; tick its line when it lands.
|
||||
- The website is `frontend/`; its README section has the commands.
|
||||
|
||||
## House rules
|
||||
|
||||
`AGENTS.md` holds them all. The ones reviews catch most:
|
||||
|
||||
- Colors, sizes, radii and shadows come from `cx.theme()`; no raw `px()` in components. Spacing uses gpui's rem helpers.
|
||||
- Every component works in light and dark, at 280px wide, by keyboard (Tab reaches it, a 1px focus ring shows, Enter and Space press it), and holds still under reduced motion.
|
||||
- Fail fast and log state changes; no silent fallbacks.
|
||||
- Files stay at or under 500 lines. Comments are one short line, and rare.
|
||||
- A new rule or dependency gets a line in `AGENTS.md`.
|
||||
|
||||
## Checks
|
||||
|
||||
```sh
|
||||
scripts/check.sh # fmt, clippy, tests, the web lint, house rules
|
||||
cd frontend && pnpm test && pnpm build && pnpm e2e # when you touch the website
|
||||
```
|
||||
|
||||
CI runs the same on every pull request. Fill in the pull request template: what and why, light and dark screenshots for anything that draws.
|
||||
|
||||
## License
|
||||
|
||||
Ely is MIT or Apache-2.0, at your option. Unless you say otherwise, what you contribute is licensed the same way.
|
||||
@@ -5,7 +5,7 @@ Every component ships in light and dark. The palette is warm and quiet. Color ca
|
||||
|
||||
Every component runs live at https://elygpui.com, compiled to WebAssembly.
|
||||
|
||||
Status: early. `TASKS.md` tracks every component, chapter by chapter.
|
||||
Status: early. `TASKS.md` tracks every component, chapter by chapter. To help, see `CONTRIBUTING.md`.
|
||||
|
||||
## Use
|
||||
|
||||
|
||||
Reference in new issue
Block a user