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
- You are responsible for thoroughly testing the successful implementation of your changes and ensuring no obvious regressions occur.
8
+
- Egregiously dysfunctional PRs may be assumed to be undisclosed AI slop. If in doubt, ask on Discord before attempting a PR.
9
+
- You are highly recommended to include a video showing the before-and-after behavior of your changes and screenshots of any new or modified UI.
10
+
- Remember that Graphite maintains high standards for quality and the project is not a classroom for inexperienced developers to gain industry experience.
11
+
- In this PR description, reference any relevant tasks by writing "Closes", "Resolves", or "Fixes" with the issue # or the URL of a Discord message documenting the task.
12
+
- To acknowledge that you've read this, you must delete these rules and fill in the (strictly human-written) PR description in its place.
Copy file name to clipboardExpand all lines: website/content/volunteer/guide/_index.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,22 @@ aliases = ["/contribute"]
8
8
book = true
9
9
+++
10
10
11
-
Welcome, potential contributor! We're excited to have you join the Graphite project and it's our goal to make the process as smooth as possible. This guide will serve as your library of knowledge to help you get started contributing to the project. If you find any information missing or unclear, please let us know through Discord or submit a pull request to help document the process for future contributors.
11
+
Welcome, potential contributor! We're excited to have you join the Graphite project. It is our goal to make the process as smooth as possible. This guide will serve as your library of knowledge to help you get started contributing to the project. If you find any information missing or unclear, please let us know through Discord or submit a pull request to help document the process for future contributors.
12
12
13
-
The next page will cover how to compile the Graphite source code. But first, make sure you've joined our [Discord server](https://discord.graphite.art) and assigned yourself the *"🤖 Interested in contributing code"* role from the `#🙂welcome` channel. Done that? Alright, proceed!
13
+
## Required experience level
14
14
15
-
<p>
16
-
<imgsrc="https://static.graphite.art/content/volunteer/code-contributions.avif"onerror="this.onerror=null; this.src=this.src.replace('.avif', '.jpg')"alt="Flavor graphic depicting a library of knowledge in a digital realm" />
17
-
</p>
15
+
Our aim is to make the process as accessible as possible for first-time Graphite contributors with solid computer science foundations to get started, even without prior open source experience. Many contributors have remarked that they found our process notably more welcoming and straightforward than open source projects they've previously tried contributing to.
16
+
17
+
However, please bear in mind that developing Graphite is **not for beginner programmers**. It is a complex, cutting-edge software engineering endeavor that requires at least a strong grasp of programming principles (although not necessarily Rust; you can learn that as you go).
18
+
19
+
If you are at least a junior-level developer or a self-motivated student who has built a number of self-directed, non-trivial personal projects (especially if they involve graphics), then you should be well-prepared to contribute to Graphite. If you are only a couple years into your programming journey, be warned that you will find Graphite frustratingly above your current skill level and we will be unable to support you adequately. The Graphite project is **not a learning platform or a classroom for inexperienced developers**, but with the requisite skills, it is a great way to develop real-world engineering experience and get involved in something meaningful.
20
+
21
+
Do not make the mistake of assuming AI tools and agents can be a substitute for your own skills and experience. If you use AI tools in your workflow, read our [AI contribution policy](./starting-a-task/ai-contribution-policy).
22
+
23
+
## Discord communication
24
+
25
+
The next page will cover how to compile the Graphite source code. But first, make sure you've joined our [Discord server](https://discord.graphite.art) and assigned yourself the *"🤖 Interested in contributing code"* role from the `#🙂welcome` channel. (And after your first PR is accepted and merged, you should post a request in `#📄development` to be assigned the *"Code Contributor"* role.)
26
+
27
+
This is semi-mandatory, particularly if you intend to become a regular contributor on the team, because it is how our team communicates and is just as central to our process as GitHub.
Copy file name to clipboardExpand all lines: website/content/volunteer/guide/codebase-overview/debugging-tips.md
+3-5Lines changed: 3 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The Wasm-based editor has some unique limitations about how you are able to debu
9
9
10
10
## Comparing with deployed builds
11
11
12
-
When tracking down a bug, first check if the issue you are noticing also exists in `master` or just your branch. Open up [dev.graphite.art](https://dev.graphite.art) which always deploys the lastest commit, compared to [editor.graphite.art](https://editor.graphite.art) which is manually deployed from time to time for the sake of stability.
12
+
When tracking down a bug, first check if the issue you are noticing also exists in `master` or just in your branch. Open up [dev.graphite.art](https://dev.graphite.art) which always deploys the lastest commit, as opposed to [editor.graphite.art](https://editor.graphite.art) which deploys the latest stable release. Build links for any commit may be found by clicking the "comment" icon on the right side of any commit in the [GitHub repo commits list](https://github.com/GraphiteEditor/Graphite/commits/master/).
13
13
14
14
Use *Help* > *About Graphite* in the editor to view any build's Git commit hash.
15
15
@@ -19,13 +19,11 @@ Beware of one potential pitfall: all deploys and build links are built with rele
19
19
20
20
Use the browser console (<kbd>F12</kbd>) to check for warnings and errors. Use the Rust macro `debug!("The number is {}", some_number);` to print to the browser console. These statements should be for temporary debugging. Remove them before your code is reviewed. Print-based debugging is necessary because breakpoints are not supported in WebAssembly.
21
21
22
-
Additional print statements are available that *should* be committed.
22
+
Additional print statements are available that *should* be committed:
23
23
24
24
-`error!()` is for descriptive user-facing error messages arising from a bug
25
25
-`warn!()` is for non-critical problems that likely indicate a bug somewhere
26
-
-`trace!()` is for verbose logs of ordinary internal activity, hidden by default
27
-
28
-
To show `trace!()` logs, activate *Help* > *Debug: Print Trace Logs*.
26
+
-`trace!()` is for verbose logs of ordinary internal activity, hidden by default but viewable by activating *Help* > *Debug: Print Trace Logs*
The Graphite editor is the application users interact with to create documents. Its code is one Rust crate sandwiched between the frontend and Graphene, the node-based graphics engine. The main business logic of all visual editing is handled by the editor backend. When running in the browser, it is compiled to WebAssembly and passes messages to the frontend.
10
+
The Graphite editor is the application users interact with to create documents. Its code is a single Rust crate that lives below the frontend (web code) and above [Graphene](../../graphene) (the node-based graphics engine). The main business logic of all visual editing is handled by the editor backend. When running in the browser, it is compiled to WebAssembly and passes messages to the frontend.
11
11
12
12
## Message system
13
13
@@ -43,11 +43,11 @@ Click to explore the outline of the editor subsystem hierarchy which forms the s
43
43
44
44
## How messages work
45
45
46
-
Messages are enum variants that are dispatched to perform some intended activity within their respective message handlers. Here are two <spanclass="subsystem">DocumentMessage</span> definitions:
46
+
Messages are enum variants that are dispatched to perform some intended activity within their respective message handlers. Here are two message definitions from <spanclass="subsystem">DocumentMessage</span>:
47
47
```rs
48
48
pubenumDocumentMessage {
49
49
...
50
-
// A message that carries one named data field
50
+
// A message that carries one data field
51
51
DeleteLayer {
52
52
id:NodeId,
53
53
}
@@ -57,7 +57,7 @@ pub enum DocumentMessage {
57
57
}
58
58
```
59
59
60
-
As shown above, additional data fields can be included with each message. But as a special case denoted by the <spanclass="submessage">#[child]</span> attribute, that data can also be a sub-message enum, which enables hierarchical nesting of message handler subsystems.
60
+
As shown above, additional data fields can be included with each message. But as a special case denoted by a <spanclass="submessage">#[child]</span> attribute, that data can also be a sub-message enum, which enables hierarchical nesting of message handler subsystems.
61
61
62
62
By convention, regular data must be written as struct-style named fields (shown above), while a sub-message enum must be written as a tuple/newtype-style field (shown below). The <spanclass="subsystem">DocumentMessage</span> enum of the previous example is defined as a child of <spanclass="subsystem">PortfolioMessage</span> which wraps it like this:
Copy file name to clipboardExpand all lines: website/content/volunteer/guide/starting-a-task/_index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ page_template = "book.html"
7
7
order = 3# Chapter number
8
8
+++
9
9
10
-
There are two places to look for beginner-friendly development tasks. Usually, the best option is to select one of the many bite-sized task descriptions marked with a ‼️ reaction in the `#✅code-todo-list` channel of the [Discord server](https://discord.graphite.art). You may also browse the [task board](https://github.com/orgs/GraphiteEditor/projects/1/views/1), which lists [beginner issues](https://github.com/orgs/GraphiteEditor/projects/1/views/6) to pick from. The Discord option usually has the more approachable tasks compared to the GitHub issues, which tend to have more variability in complexity.
10
+
There are two places to look for beginner-friendly development tasks. Usually, the best option is to select one of the many bite-sized task descriptions marked with a ‼️ reaction in the `#✅code-todo-list` channel of the [Discord server](https://discord.graphite.art). You may also browse the task board for a list of [beginner issues](https://github.com/orgs/GraphiteEditor/projects/1/views/6) to pick from. The Discord option usually has the more approachable tasks, compared to the GitHub issues that often have more variability in complexity.
11
11
12
-
If you're unsure about which task to pick, feel free to ask in the `#📄development` channel.
12
+
If you're unsure about which task to pick, feel free to ask in the `#📄development` channel. You can also use that channel to ask for coding help if you anticipate it will be a quick discussion rather than a longer-running conversation that deserves its own thread.
13
13
14
14
You may right click a `#✅code-todo-list` task and select "Create Thread" to ask questions and discuss your development progress. If your work doesn't correspond to a specific listed task in that channel, you can also create a thread in `#🧵task-help` with a short, descriptive title ending with your issue or PR number.
Many open source projects including Graphite have begun to be spammed with an ever-increasing flood of low-quality PRs written partly or wholly by AI. These harm the project by wasting the time of maintainers and preventing PRs by genuine contributors from receiving timely review. We aim to be reasonable and understanding to contributors who put in the effort, but it has become necessary to set some strict rules against low-effort PRs.
9
+
10
+
## Acceptable usage
11
+
12
+
- Non-agent AI tools may **assist** with debugging and tab-completion of single lines of code you would have otherwise written yourself. This does not require disclosure.
13
+
- AI chat tools (not agents) may help you **generate** small (sub-40 line) snippets of code that you manually copy and paste, provided that you carefully review every line to ensure it is consistent with how you would have written it yourself. This requires disclosure.
14
+
15
+
## Unacceptable usage
16
+
17
+
- AI slop, "vibe-coded", or agent-written PRs are strictly forbidden and may be treated as malicious spam attacks against the project, resulting in a ban.
18
+
- PR description text and replies to reviewers must be written by you, not AI. If your English is imperfect, just try your best; it is better than AI babble.
19
+
20
+
## Required disclosure
21
+
22
+
- Graphite has **zero-tolerance** for contributing undisclosed AI-generated content.
23
+
- A detailed, human-written description must accompany every line of material that you did not personally write using your own brain. It should justify why each line is correct and appropriate. This should be prepared ahead of time and written as self-review comments on the GitHub PR's diff immediately after the PR is opened or new code is pushed.
Copy file name to clipboardExpand all lines: website/content/volunteer/guide/starting-a-task/code-quality-guidelines.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The Graphite project prizes code quality and accessibility to new contributors.
9
9
10
10
## Linting
11
11
12
-
Please ensure Clippy is enabled. This should be set up automatically in VS Code. Try to avoid committing code with lint warnings. You may execute `cargo clippy` anytime to confirm.
12
+
Please ensure Clippy is enabled. This should be set up automatically in VS Code. Avoid committing code with lint warnings so the code review process goes smoothly. You may execute `cargo clippy` anytime to confirm.
13
13
14
14
## Naming
15
15
@@ -29,15 +29,15 @@ Always use the style `42.` instead of `42.0` for whole-number floats to maintain
29
29
30
30
For consistency, please try to write comments (`//`) in *Sentence case* (with a capital first letter) and don't end with a period unless multiple sentences are used in the same comment. For doc comments (`///`), always end your sentences with a period. There should always be one space after the `//` or `///` comment markers, and `/* */` style comments should be avoided.
31
31
32
-
Avoid including commented-out code, unless you have a compelling reason to keep it around for future adaption, in your PRs that are open for code review.
32
+
Avoid including commented-out code in PRs that are open for code review unless you have a compelling reason to keep it around for future reference.
33
33
34
34
Comments should usually be placed on a separate line above the code they are referring to, not at the end of the same code line.
35
35
36
36
## Blank lines
37
37
38
38
Please make a habit of grouping together related lines of code in blocks separated by blank lines. These are like your paragraphs if you were writing a novel — they greatly aid readability and your copy editor would have significant concerns with your writing if they were absent.
39
39
40
-
If you have dozens of lines comprising a single unbroken block of logic, you are likely not splitting it apart enough to aid readability. Find sensible places to partition the logic and insert blank lines between each. Roughly 10% of the code you write should ideally be blank lines, otherwise you are likely underutilizing them at the expense of readability.
40
+
If you have dozens of lines comprising a single unbroken block of logic, you are likely not splitting it apart enough to aid readability. Find sensible places to partition the logic and insert blank lines between each. At least 10% of the code you write should ideally be blank lines, otherwise you are likely underutilizing them at the expense of readability.
0 commit comments