mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
docs: update contribution guidelines (#1691)
* docs(contributing): add subheading backend under styling * docs: add styling for frontend
This commit is contained in:
+18
-3
@@ -1,4 +1,3 @@
|
||||
|
||||
# Contributing
|
||||
|
||||
## Requirements
|
||||
@@ -16,7 +15,9 @@ Use the following `make` commands and scripts in development:
|
||||
|
||||
## Styling
|
||||
|
||||
### Use Go style
|
||||
### Backend
|
||||
|
||||
#### Use Go style
|
||||
|
||||
Contributions must adhere to the guidelines outlined in [Effective
|
||||
Go](https://go.dev/doc/effective_go). We prefer linting rules over documenting
|
||||
@@ -26,13 +27,27 @@ Read [Go's Code Review Comments
|
||||
Wiki](https://github.com/golang/go/wiki/CodeReviewComments) for information on
|
||||
common comments made during reviews of Go code.
|
||||
|
||||
### Avoid unused packages
|
||||
#### Avoid unused packages
|
||||
|
||||
Coder writes packages that are used during implementation. It isn't easy to
|
||||
validate whether an abstraction is valid until it's checked against an
|
||||
implementation. This results in a larger changeset, but it provides reviewers
|
||||
with a holistic perspective regarding the contribution.
|
||||
|
||||
### Frontend
|
||||
|
||||
#### Follow component conventions
|
||||
|
||||
Each component gets its own folder. Make sure you add a test and Storybook
|
||||
stories for the component as well. By keeping these tidy, the codebase will
|
||||
remain easy-to-navigate, healthy and maintainable for all contributors.
|
||||
|
||||
#### Keep accessibility in mind
|
||||
|
||||
We strive to keep our UI accessible. When using colors, avoid adding new
|
||||
elements with low color contrast. Always use labels on inputs, not just
|
||||
placeholders. These are important for screen-readers.
|
||||
|
||||
## Reviews
|
||||
|
||||
> The following information has been borrowed from [Go's review
|
||||
|
||||
Reference in New Issue
Block a user