Skip to content

Commit

Permalink
fixup! docs(website): add contributing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Zarzalis (TNG) committed Jan 9, 2025
1 parent ccb975b commit f4d9b3d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
40 changes: 20 additions & 20 deletions website/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,38 @@ The messages themselves should help future developers understand **why** changes

We value clean code, here are some guidelines on what we consider clean code:

- Use expressive names (variables, classes, function), avoid abbreviations unless they are really common sense
- Small functions and classes
- Reasonable test coverage: We don't require 100% test coverage, but we do require tests for all non-trivial code.
Every piece of the code should at least be tested in the happy path.
- Develop code with testability in mind.
- Use expressive names (variables, classes, function), avoid abbreviations unless they are really common sense
- Small functions and classes
- Reasonable test coverage: We don't require 100% test coverage, but we do require tests for all non-trivial code.
Every piece of the code should at least be tested in the happy path.
- Develop code with testability in mind.

### Frontend

We make use of some major libraries: Astro, React, Daisyui, and Tailwindcss.

- use Astro when possible (for performance reasons)
- however avoid script tags, since they are harder to maintain. In this case use React.
- when possible use css over js for interactivity
- it often yiels less and simpler code
- we can profit from browser parallelization and optimizations (modern browsers are highly optimized for parsing
HTML and CSS - when using
JS that's not immediately possible)
- use React for interactive components
- Use constant collection instead of strings for constants, eg.:
- use Astro when possible (for performance reasons)
- however avoid script tags, since they are harder to maintain. In this case use React.
- when possible use css over js for interactivity
- it often yiels less and simpler code
- we can profit from browser parallelization and optimizations (modern browsers are highly optimized for parsing
HTML and CSS - when using
JS that's not immediately possible)
- use React for interactive components
- Use constant collection instead of strings for constants, eg.:
```typescript
export const constantCollection = {
constant1: 'constant1' as const,
constant2: 'constant2' as const,
constant1: 'constant1' as const,
constant2: 'constant2' as const,
};
```

### Styling

We use [Tailwind CSS](https://tailwindcss.com/) for styling.

- if possible use tailwind instead of custom css and inline styles
- consider using [components for styling](https://tailwindcss.com/docs/reusing-styles) that is used in multiple places (or to improve readability)
- if possible use tailwind instead of custom css and inline styles
- consider using [components for styling](https://tailwindcss.com/docs/reusing-styles) that is used in multiple places (or to improve readability)
```typescript
const MyHeadline = ({ children }) => (
<h1 className='text-lg font-bold'>
Expand All @@ -55,8 +55,8 @@ We use [Tailwind CSS](https://tailwindcss.com/) for styling.

We use vitest for unit tests and playwright for end-to-end tests.

- each major function should have a unit test
- each page should have an end-to-end test
- each major function should have a unit test
- each page should have an end-to-end test

### Logging

Expand Down
2 changes: 1 addition & 1 deletion website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f4d9b3d

Please sign in to comment.