Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@
- [ ] Make sure to include translations for the quotes in the description (or another comment) so we can verify their content.
- [ ] Adding a language?
- Make sure to follow the [languages documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LANGUAGES.md)
- [ ] Add language to `packages/schemas/src/languages.ts`
- [ ] Add language to exactly one group in `frontend/src/ts/constants/languages.ts`
- [ ] Add language json file to `frontend/static/languages`
- [ ] Add language to [packages/schemas/src/languages.ts](/packages/schemas/src/languages.ts)
- [ ] Add language to exactly one group in [frontend/src/ts/constants/languages.ts](/frontend/src/ts/constants/languages.ts)
- [ ] Add language json file to [frontend/static/languages](/frontend/static/languages)
- [ ] Adding a theme?
- Make sure to follow the [themes documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md)
- [ ] Add theme to `packages/schemas/src/themes.ts`
- [ ] Add theme to `frontend/src/ts/constants/themes.ts`
- [ ] (optional) Add theme css file to `frontend/static/themes`
- [ ] Add theme to [packages/schemas/src/themes.ts](/packages/schemas/src/themes.ts)
- [ ] Add theme to [frontend/src/ts/constants/themes.ts](/frontend/src/ts/constants/themes.ts)
- [ ] (optional) Add theme css file to [frontend/static/themes](/frontend/static/themes)
- [ ] Add some screenshots of the theme, especially with different test settings (colorful, flip colors) to your pull request
- [ ] Adding a layout?
- [ ] Make sure to follow the [layouts documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
- [ ] Add layout to `packages/schemas/src/layouts.ts`
- [ ] Add layout json file to `frontend/static/layouts`
- [ ] Add layout to [packages/schemas/src/layouts.ts](/packages/schemas/src/layouts.ts)
- [ ] Add layout json file to [frontend/static/layouts](/frontend/static/layouts)
- [ ] Adding a font?
- Make sure to follow the [fonts documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/FONTS.md)
- [ ] Add font file to `frontend/static/webfonts`
- [ ] Add font to `packages/schemas/src/fonts.ts`
- [ ] Add font to `frontend/src/ts/constants/fonts.ts`
- [ ] Add font file to [frontend/static/webfonts](/frontend/static/webfonts)
- [ ] Add font to [packages/schemas/src/fonts.ts](/packages/schemas/src/fonts.ts)
- [ ] Add font to [frontend/src/ts/constants/fonts.ts](/frontend/src/ts/constants/fonts.ts)
- [ ] Check if any open issues are related to this PR; if so, be sure to tag them below.
- [ ] Make sure the PR title follows the Conventional Commits standard. (https://www.conventionalcommits.org for more info)
- [ ] Make sure to include your GitHub username prefixed with @ inside parentheses at the end of the PR title.
Expand Down
35 changes: 9 additions & 26 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ For types, we use the following:
- `perf`: A code change that improves performance
- `test`: Adding missing tests or correcting existing tests
- `build`: Changes that affect the build system or external dependencies (example scopes: vite, tsup-node, npm)
- `ci`: Changes to our CI configuration files and scripts (example scopes: GitHub Workflows)
- `ci`: Changes to our CI configuration files and scripts (e.g., GitHub Workflows)
- `revert`: Reverts a previous commit
- `chore`: Other changes that don't apply to any of the above

Expand All @@ -50,45 +50,28 @@ For types, we use the following:
- `impr(quotes): add english quotes (@username)`
- `fix(leaderboard): show user rank correctly (@user1, @user2, @user3)`

### Theme Guidelines
### Adding Themes

<!-- TODO: add screenshots to provide examples for dos and don'ts -->

Before submitting a theme make sure...

- your theme is unique and isn't visually similar to any we already have.
- the text color is either black or white (or very close to these colors)
- your theme has been added to the `_list` file and the `textColor` property is the theme's main color
- your theme is clear and readable with both `flip test colors` and `colorful mode` enabled and disabled

If you want to contribute themes but don't know how, check [THEMES.md](/docs/THEMES.md)

### Language Guidelines

- Do not include expletive words
- Ensure that your contribution meets JSON standards (no trailing comma at the end of a list)
- Be sure to add your language to the `_list` and `_groups` files
- Make sure the number of words in the file corresponds to the file name (for example: `languageName.json` is 200 words, `languageName_1k.json` is 1000 words, and so on)
### Adding Languages

If you want to contribute languages but don't know how, check [LANGUAGES.md](/docs/LANGUAGES.md)

### Quote Guidelines

- Do not include content that contains any libelous or otherwise unlawful, abusive, or obscene text.
- Ensure that your contribution meets JSON standards (no trailing comma at the end of a list)
- Verify quotes added aren't duplicates of any already present
- Verify the `length` property is correct (length of the text in characters)
- Verify the `id` property is incremented correctly
- Please do not add extremely short quotes (less than 60 characters)
- For quotes not in English, please include translations of quotes in the description of your pull request. This assists in the verification process to ensure the integrity of the quotes.
- Remember to name your pull request properly. For example, if you are adding new quotes for the language `French`, your pull request should be named `impr(quotes): add French quotes`.
### Adding Quotes

If you want to contribute quotes but don't know how, check [QUOTES.md](/docs/QUOTES.md)

### Layout Guidelines
### Adding Layouts

If you want to contribute layouts but don't know how, check [LAYOUTS.md](/docs/LAYOUTS.md)
Comment thread
Leonabcd123 marked this conversation as resolved.

### Adding Fonts

If you want to contribute fonts but don't know how, check [FONTS.md](/docs/FONTS.md)

## Questions

If you have any questions, comments, concerns, or problems let me know on [GitHub](https://github.com/Miodec), [Discord](https://discord.gg/monkeytype) in the `#development` channel, or ask a question on Monkeytype's [GitHub discussions](https://github.com/monkeytypegame/monkeytype/discussions) and a contributor will be happy to assist you.
14 changes: 7 additions & 7 deletions docs/FONTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ First, you will have to make a personal copy of the Monkeytype repository, also

## Adding Fonts

Once you have forked the repository you can now add your font. Place the font file in `./frontend/static/webfonts` e.g. `My-Font.woff2`.
Once you have forked the repository you can now add your font. Place the font file in [frontend/static/webfonts](/frontend/static/webfonts) e.g. `My-Font.woff2`.

> [!NOTE]
> Your font needs to be in the `.woff2` format. Your filename cannot include spaces or start with a number.

Open `./packages/schemas/src/fonts.ts` and add the new font at the _end_ of the `KnownFontNameSchema` list like this:
Open [packages/schemas/src/fonts.ts](/packages/schemas/src/fonts.ts) and add the new font at the _end_ of the `KnownFontNameSchema` list like this:

```typescript
const KnownFontNameSchema = z.enum(
Expand All @@ -31,7 +31,7 @@ const KnownFontNameSchema = z.enum(

Call it whatever you want but make sure you replace spaces with underscores and the font does not start with a number.

Then, go to `./frontend/src/ts/constants/fonts.ts` and add the following code to the _end_ of the `Fonts` object near to the very end of the file:
Then, go to [frontend/src/ts/constants/fonts.ts](/frontend/src/ts/constants/fonts.ts) and add the following code to the _end_ of the `Fonts` object near to the very end of the file:

```typescript
export const Fonts: Record<KnownFontName, FontConfig> = {
Expand All @@ -41,16 +41,16 @@ export const Fonts: Record<KnownFontName, FontConfig> = {
}
```

### Committing Languages
### Committing Fonts

Once you have created your language, you now need to create a pull request to the main Monkeytype repository. Go to the branch where you created your languages on GitHub. Then make sure your branch is up to date. Once it is up to date, click "contribute".
Once you have created your font(s), you now need to create a pull request to the main Monkeytype repository. Go to the branch where you created your fonts on GitHub. Then make sure your branch is up to date. Once it is up to date, click "contribute".

Update branch:
<img width="1552" alt="Screenshot showing how to update the fork to match the main Monkeytype repository" src="https://user-images.githubusercontent.com/83455454/149186547-5b9fe4fd-b944-4eed-a959-db43f96198bf.png">

Create a pull request:
<img width="1552" alt="Screenshot showing how to create a pull request to the main Monkeytype repository" src="https://user-images.githubusercontent.com/83455454/149186637-66dae488-05ae-45c4-9217-65bc36c4927b.png">

## Language Guidelines
## Font Guidelines

Make sure your language follows the [Language guidelines](./CONTRIBUTING.md#language-guidelines).
- Ensure that your font is distinct from existing fonts
10 changes: 6 additions & 4 deletions docs/LANGUAGES.md
Comment thread
Leonabcd123 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ First, you will have to make a personal copy of the Monkeytype repository, also

## Creating Languages

Once you have forked the repository you can now add your language. Create a new JSON file in `./frontend/static/languages/`, named as the language name and the number of words, e.g. `language_1k.json`. If there are less than 1,000 words, simply name the file after the language (e.g. `language.json`). Note that a minimum of 200 words are required.
Once you have forked the repository you can now add your language. Create a new JSON file in [frontend/static/languages](/frontend/static/languages), named as the language name and the number of words, e.g. `language_1k.json`. If there are less than 1,000 words, simply name the file after the language (e.g. `language.json`). Note that a minimum of 200 words are required.

The contents of the file should be as follows:

Expand All @@ -31,7 +31,7 @@ The contents of the file should be as follows:
It is recommended that you familiarize yourselves with JSON before adding a language. For the `name` field, put the name of your language. `rightToLeft` indicates how the language is written. If it is written right to left then put `true`, otherwise put `false`.
`ligatures` A ligature occurs when multiple letters are joined together to form a character [more details](<https://en.wikipedia.org/wiki/Ligature_(writing)>). If there's joining in the words, which is the case in languages like (Arabic, Malayalam, Persian, Sanskrit, Central_Kurdish... etc.), then set the value to `true`, otherwise set it to `false`. For `bcp47` put your languages [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). If the words you're adding are ordered by frequency (most common words at the top, least at the bottom) set the value of `orderedByFrequency` to `true`, otherwise `false`. Finally, add your list of words to the `words` field.

Then, go to `packages/schemas/src/languages.ts` and add your new language name at the _end_ of the `LanguageSchema` enum. Make sure to end the line with a comma. Make sure to add all your language names if you have created multiple word lists of differing lengths in the same language.
Then, go to [packages/schemas/src/languages.ts](/packages/schemas/src/languages.ts) and add your new language name at the _end_ of the `LanguageSchema` enum. Make sure to end the line with a comma. Make sure to add all your language names if you have created multiple word lists of differing lengths in the same language.

```typescript
export const LanguageSchema = z.enum([
Expand All @@ -42,7 +42,7 @@ export const LanguageSchema = z.enum([
]);
```

Then, go to `frontend/src/ts/constants/language.ts` and add your new language name to the `LanguageGroups` map. You can either add it to an existing group or add a new one. Make sure to add all your language names if you have created multiple word lists of differing lengths in the same language.
Then, go to [frontend/src/ts/constants/languages.ts](/frontend/src/ts/constants/languages.ts) and add your new language name to the `LanguageGroups` map. You can either add it to an existing group or add a new one. Make sure to add all your language names if you have created multiple word lists of differing lengths in the same language.

```typescript
export const LanguageGroups: Record<string, Language[]> = {
Expand All @@ -66,4 +66,6 @@ Create a pull request:

## Language Guidelines

Make sure your language follows the [Language guidelines](./CONTRIBUTING.md#language-guidelines).
- Do not include expletive words
- Ensure that your contribution meets JSON standards (no trailing comma at the end of a list)
- Make sure the number of words in the file corresponds to the file name (for example: `languageName.json` is 200 words, `languageName_1k.json` is 1000 words, and so on)
8 changes: 2 additions & 6 deletions docs/LAYOUTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ First, you will have to make a personal copy of the Monkeytype repository, also

## Creating Layouts

Once you have forked the repository you can now add your layout. Create a new JSON file in `./frontend/static/layouts/`, named as the layout name, e.g. `qwerty.json`.
Once you have forked the repository you can now add your layout. Create a new JSON file in [frontend/static/layouts](/frontend/static/layouts), named as the layout name, e.g. `qwerty.json`.

The contents of the file should be as follows:

Expand Down Expand Up @@ -94,7 +94,7 @@ For ansi layouts the number of keys need to be exactly thirteen for `row1` and `

For iso the number of keys need to be exactly thirteen for `row1`, twelve for `row2` and `row3`, eleven for `row4` and one or two for `row5`.

In addition to the layout file you need to add your layout to the `packages/schemas/src/layouts.ts` file. Just append your layout name (without the `.json`) at the **end** of the `LayoutNameSchema`. Remember to add a comma like this:
In addition to the layout file you need to add your layout to the [packages/schemas/src/layouts.ts](/packages/schemas/src/layouts.ts) file. Just append your layout name (without the `.json`) at the **end** of the `LayoutNameSchema`. Remember to add a comma like this:

```ts
export const LayoutNameSchema = z.enum([
Expand All @@ -116,7 +116,3 @@ Create a pull request:
<img width="1552" alt="Screenshot showing how to create a pull request to the main Monkeytype repository" src="https://user-images.githubusercontent.com/83455454/149186637-66dae488-05ae-45c4-9217-65bc36c4927b.png">

Make sure your PR title follow the syntax `feat(layout): add <YOUR_LAYOUT> layout (@<YOUR_GITHUB_NAME>)`, e.g. `feat(layout): add qwerty layout (@teddinotteddy)`

## Layout Guidelines

Make sure your layout follows the [Layout guidelines](./CONTRIBUTING.md#layout-guidelines).
9 changes: 8 additions & 1 deletion docs/QUOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,11 @@ Create a pull request:

## Quote Guidelines

Make sure your quote(s) follows the [Quote guidelines](./CONTRIBUTING.md#quote-guidelines).
- Do not include content that contains any libelous or otherwise unlawful, abusive, or obscene text.
- Ensure that your contribution meets JSON standards (no trailing comma at the end of a list)
- Verify quotes added aren't duplicates of any already present
- Verify the `length` property is correct (length of the text in characters)
- Verify the `id` property is incremented correctly
- Please do not add extremely short quotes (less than 60 characters)
- For quotes not in English, please include translations of quotes in the description of your pull request. This assists in the verification process to ensure the integrity of the quotes.
- Remember to name your pull request properly. For example, if you are adding new quotes for the language `French`, your pull request should be named `impr(quotes): add French quotes`.
10 changes: 6 additions & 4 deletions docs/THEMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ First you will have to make a personal copy of the Monkeytype repository, also k

Pick a name for your theme. It must be all lowercase, with spaces replaced by underscores.

Go to `./packages/schemas/src/themes.ts` and add your new theme name to the __end__ of the `ThemeNameSchema` enum. Make sure to end the line with a comma.
Go to [packages/schemas/src/themes.ts](/packages/schemas/src/themes.ts) and add your new theme name to the __end__ of the `ThemeNameSchema` enum. Make sure to end the line with a comma.

```typescript
export const ThemeNameSchema = z.enum([
Expand All @@ -26,7 +26,7 @@ export const ThemeNameSchema = z.enum([
]);
```

Then, go to `./frontend/src/ts/constants/themes.ts` and add the following code to the __end__ of the `themes` object near to the very end of the file:
Then, go to [frontend/src/ts/constants/themes.ts](/frontend/src/ts/constants/themes.ts) and add the following code to the __end__ of the `themes` object near to the very end of the file:

```typescript
export const themes: Record<ThemeName, Theme> = {
Expand Down Expand Up @@ -54,7 +54,7 @@ If you don't want to add any custom styling you can skip the next section.

#### Adding custom CSS (optional)

Create a CSS file in `./frontend/static/themes/` matching the name you picked earlier. Update the theme configuration in `./frontend/src/ts/constants/themes.ts` and add `hasCss: true` like this:
Create a CSS file in [frontend/static/themes](/frontend/static/themes) matching the name you picked earlier. Update the theme configuration in [frontend/src/ts/constants/themes.ts](/frontend/src/ts/constants/themes.ts) and add `hasCss: true` like this:

```typescript
export const themes: Record<ThemeName, Theme> = {
Expand Down Expand Up @@ -90,4 +90,6 @@ Add some screenshots of your theme to the pull request. Click "create pull reque

## Theme Guidelines

Make sure your theme follows the [Theme guidelines](./CONTRIBUTING.md#theme-guidelines).
- your theme is unique and isn't visually similar to any we already have.
- the text color is either black or white (or very close to these colors)
- your theme is clear and readable with both `flip test colors` and `colorful mode` enabled and disabled
Loading