Commit graph

12453 commits

Author SHA1 Message Date
Christian Fehmer
92533e2bdd
refactor: move configGroup to config-metadata (@fehmer) (#7222) 2025-12-12 10:18:15 +01:00
Christian Fehmer
d42c1b2a84
fix(config): sanitize config failing on array with multiple problems (@fehmer) (#7221)
Sanitize throws error if an object contains an array with 1) an invalid
value and 2) too few items. The list of problems contains the path to
the array twice and tries to remove the invalid element from the already
deleted array.

Config object:

```json
 "customPolyglot": [
   "japanese"
 ]
```
2025-12-12 09:55:23 +01:00
Miodec
b9dd15005a fix: typing issues when wikipedia was requesting words
closes #7215
2025-12-11 23:44:13 +01:00
Miodec
d43fcba221 fix: background loader not showing 2025-12-11 22:13:12 +01:00
Lorenz De Robles
95bd39a20e
impr(quotes): add english quote (@lorenzjdr) (#7214)
### Description

<!-- Please describe the change(s) made in your PR -->
Added a quote from 1984 by George Orwell.
### Checks

- [ ] Adding/modifying Typescript code?
  - [ ] I have used `qs`,`qsa` or `qsr` instead of JQuery selectors.
- [x] Adding quotes?
- [ ] 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` 
- [ ] 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`
  - [ ] Add theme css file to `frontend/static/themes`
- [ ] Add some screenshot 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` 
- [ ] Adding a font?
- Make sure to follow the [themes
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`
- [ ] 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.

<!-- label(optional scope): pull request title (@your_github_username)
-->

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->

Closes #

<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->

<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[#1234](https://github.com/monkeytypegame/monkeytype/pull/1234) -->

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
2025-12-11 17:13:49 +01:00
Jack
da535a6f30
refactor: use dom utils in caret code (@miodec) (#7218)
Also adds a few more utils
2025-12-11 17:12:24 +01:00
Miodec
67a34e0932 fix: two line jumps in a row breaking caret positioning 2025-12-11 16:01:45 +01:00
Christian Fehmer
c7927bcd86
refactor(config): remove helper functions (@fehmer) (#7216) 2025-12-11 15:40:20 +01:00
Christian Fehmer
40b53c4d69
refactor(config): rename genericSet to setConfig (@fehmer) (#7217)
- **refactor: use Config.setConfig, remove helper functions (@fehmer)**
- **imports**
2025-12-11 11:47:24 +01:00
Miodec
872027c160 impr: ignore enter key when trying to bail out via shift+enter 2025-12-10 23:16:57 +01:00
Miodec
f6421e7215 fix: uncaught throw when trying to find newline key element 2025-12-10 23:16:57 +01:00
Jierie Ezequiel Jacla
9309c0c5ff
impr(quotes): add filipino quotes from literature (@AintJierie) (#7207)
### Description

<!-- Please describe the change(s) made in your PR -->

### Checks

- [x] Adding quotes?
- [x] 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` 
- [ ] 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`
  - [ ] Add theme css file to `frontend/static/themes`
- [ ] Add some screenshot 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` 
- [ ] Adding a font?
- Make sure to follow the [themes
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`
- [ ] 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.

<!-- label(optional scope): pull request title (@your_github_username)
-->

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->

Closes #

<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->

<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[#1234](https://github.com/monkeytypegame/monkeytype/pull/1234) -->

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
2025-12-10 22:54:20 +01:00
Leonabcd123
3d902bb15f
fix(british-english): Apply british english after punctuation (@Leonabcd123) (#7202)
### Description

Apply british english after punctuation so that double quotes will be
correctly converted to single quotes.

Closes #7201
2025-12-10 22:53:19 +01:00
ALAMO276
38cc8e12da
feat(layout): add colemak_angle layout (@ALAMO276) (#7200)
### Description

I added the Colemak with the angle mod

### Checks

- [ ] Adding quotes?
- [ ] 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` 
- [ ] 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`
  - [ ] Add theme css file to `frontend/static/themes`
- [ ] Add some screenshot of the theme, especially with different test
settings (colorful, flip colors) to your pull request
- [x] Adding a layout?
- [x] Make sure to follow the [layouts
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/LAYOUTS.md)
  - [x] Add layout to `packages/schemas/src/layouts.ts`
  - [x] Add layout json file to `frontend/static/layouts` 
- [ ] Adding a font?
- Make sure to follow the [themes
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`
- [ ] 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.

<!-- label(optional scope): pull request title (@your_github_username)
-->

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->

Closes #

<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->

<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[#1234](https://github.com/monkeytypegame/monkeytype/pull/1234) -->

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
2025-12-10 22:51:46 +01:00
Miodec
fa3bac35ed refactor: move navigate options to the navigation event
also update the event params
2025-12-10 22:39:55 +01:00
Leonabcd123
8932661676
fix(sounds): Clear all sounds on test finish (@Leonabcd123) (#7196)
### Description

Use `Howler.stop()` to stop all sounds after finishing a test.

Closes #7194
2025-12-10 21:20:17 +01:00
Christian Fehmer
64a0bdc3e2
fix: caps-lock warning stuck on linux (@fehmer) (#7195)
Just pressing caps-lock on linux (firefox, chrome) activates the
caps-lock warning but does not clear the caps-lock warning until
pressing another key.
2025-12-10 21:13:27 +01:00
MythicalWillbur
d1011bd1f5
impr(quotes): add English quote (@MythicalWillbur) (#7192)
### Description

<!-- Please describe the change(s) made in your PR -->

Added a quote in English from When Breath Becomes Air as I like the
book.

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-12-10 20:53:20 +01:00
Leonabcd123
3482242660
fix(indicate typos): Replace tabs with _ when indicate typos is replace or both (@Leonabcd123) (#7191)
### Description

When indicate typos is set to replace or to both, make sure to have tabs
replaced with _.

Current behavior is that the literal tab character replaces the char,
making it disappear.
2025-12-10 20:45:48 +01:00
Jack
1dd0ca70ec
refactor: begin transition away from jquery (@miodec, @fehmer) (#7185)
Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
Co-authored-by: Gian Peña <36643266+gianpena@users.noreply.github.com>
Co-authored-by: Leonabcd123 <156839416+Leonabcd123@users.noreply.github.com>
2025-12-10 20:34:37 +01:00
JuniorKlump
204fffebe8
impr(quotes): add English quotes (@JuniorKlumpy) (#7180)
### Description

Added two new quotes as follows:

>Everything should be made as simple as possible, but not simpler.
– Albert Einstein

>Do you see him? Do you see the story? Do you see anything? It seems I
am trying to tell you a dream-making a vain attempt, because no relation
of a dream can convey the dream-sensation, that commingling of
absurdity, surprise, and bewilderment in a tremor of struggling revolt,
that notion of being captured by the incredible which is the very
essence of dreams.
– Heart of Darkness
2025-12-10 20:10:11 +01:00
Leonabcd123
de4e872996
fix(lazy-mode): Save lazy mode in local storage after getting not supported message (@Leonabcd123) (#7171)
### Description

Save lazy mode status in local storage after getting the "This language
does not support lazy mode" message. This is so the user doesn't get the
same message every time they refresh, and it matches up with the
settings that show that lazy mode is disabled even though it's enabled
in local storage.
2025-12-10 20:09:30 +01:00
Leonabcd123
6d8ef91155
fix(custom-text): Don't trim custom text (@Leonabcd123) (#7170)
### Description

Removed the `.trim()` call that deleted leading and trailing literal
tabs or newlines from custom text.

This is to make sure that no matter what the custom text is, it will
always stay the same after updating it. The current problem is that
leading and trailing tabs and newlines will be removed when you click on
"change" and "ok" for the second time (because they're now in their
literal form, not \t and \n).
2025-12-10 20:00:38 +01:00
Leonabcd123
5d3bcb7ca2
fix(composition-display): Add compositionDisplay SettingsGroup (@Leonabcd123) (#7211)
### Description

Add compositionDisplay SettingsGroup to allow users to select the value
they want for the compositionDisplay setting.
2025-12-10 19:46:36 +01:00
Miodec
443e27fbf8 feat: add composition display setting 2025-12-10 17:19:52 +01:00
Jack
ea37960b3b
fix: composition issues with ending test and new line handling (@miodec) (#7210)
closes #4968
2025-12-10 16:08:53 +01:00
Miodec
4f8d8c557c chore: dont check for uncommited changes when deploying to preview 2025-12-10 14:37:08 +01:00
Miodec
d997ae8746 chore: add script to deploy preview frontend 2025-12-10 14:35:22 +01:00
Christian Fehmer
1d3abf3f43
fix(theme): duplicate definition of fadeIn animation in dark note theme (@fehmer) (#7205)
rename animations used in the dark note theme to not conflict with the
`fadeIn` animation added in b9924ff493
2025-12-10 11:11:00 +01:00
Miodec
dd970cced7 chore: use pnpm on pre-push 2025-12-09 22:57:25 +01:00
Miodec
2ee582a597 chore: configure eslint/curly rule 2025-12-09 22:41:45 +01:00
Jack
b5a03e0040
chore(linting): enable prefer-nullish-coalescing (@miodec) (#7209) 2025-12-09 20:37:04 +01:00
Miodec
0c1a8a7899 fix: safari broken input 2025-12-09 19:25:36 +01:00
Miodec
fb9f339157 chore: better debug css 2025-12-09 19:25:10 +01:00
Miodec
713e6b2f8e fix: ctrl backspace not working in firefox 2025-12-09 16:40:18 +01:00
Christian Fehmer
b92121f180
fix(theme): fix dark note theme converting typed words to dots multiple times (@fehmer) (#7198) 2025-12-07 19:37:17 +01:00
Christian Fehmer
8cce5bfc7e
build: combine vite config into a single file (@fehmer) (#7190)
- **build: replace dotenv with vite env variables (@fehmer)**
- **build: combine vite config into a single file (@fehmer)**

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-12-05 19:45:12 +01:00
Miodec
b746ef844e chore: remember to call onComplete 2025-12-05 19:17:40 +01:00
Miodec
943c1deb9b fix(tape mode): rare issue where previous line would be shifted on line jump 2025-12-05 19:05:32 +01:00
Miodec
12f5c5ecd0 chore: protect against word letter self overflow 2025-12-05 15:44:06 +01:00
Miodec
e90e35e710 fix(tape mode): tab and newline characters breaking caret alignment 2025-12-05 15:14:35 +01:00
Miodec
f99c843e8b fix(tape mode): some words sometimes being removed on test restart 2025-12-05 15:11:03 +01:00
Miodec
132bdc309a fix: use the right env in env-config plugin 2025-12-04 20:50:20 +01:00
Miodec
2f9195ee56 fix: rare issue where previous test mistakes would show in a new test 2025-12-04 19:00:03 +01:00
Miodec
088ca5dc0d fix: show all lines causing timed tests to not scroll 2025-12-04 18:50:42 +01:00
Miodec
d6d062a771 fix: stored xss in quote approve modal 2025-12-04 18:06:50 +01:00
Miodec
37d1c5a25f chore: release v25.49.0 2025-12-04 17:25:57 +01:00
Jack
b9924ff493
perf: defer UI updates away from input logic (@miodec) (#7162)
Together with #7119, input handling is 3x faster. Achieved by:
- deferring all UI updates to when the browser is ready and debouncing
ui calls.
 - using vanilla js where needed
 - caching dom elements
 - disabling expensive checks if the timer is slow
 - switching to a timer that uses RAF instead of setTimeout
 - moving some code around

This should make the site smother on slower devices and fix lag spikes
causing weird test data.
2025-12-04 17:23:15 +01:00
Miodec
741ab7cb05 refactor: cache often used elements 2025-12-04 17:16:11 +01:00
Ashiq Renju
6475b42131
fix(friends): change "max streak" tooltip to "longest streak" (@ashiqr-dev) (#7165)
### Description

Changed friends tooltip message from "max streak" to "longest streak".
Please close the PR if this was intentional wording.

### Checks

- [ ] Adding quotes?
- [ ] 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` 
- [ ] 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`
  - [ ] Add theme css file to `frontend/static/themes`
- [ ] Add some screenshot 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` 
- [ ] Adding a font?
- Make sure to follow the [themes
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`
- [x] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

Closes #7127

Co-authored-by: Ashiq Renju <ashiqrdev@gmail.com>
2025-12-04 14:58:31 +01:00