Commit graph

12476 commits

Author SHA1 Message Date
Miodec
65aadb7e89 fix: out of focus warning sometimes showing even though words were focused 2025-12-16 10:55:37 +01:00
Miodec
ee2e680ffe fix(account settings): some buttons being visible when they shouldnt be 2025-12-16 10:18:08 +01:00
Jack
a067a32b7a
chore: move main linting to oxlint (@miodec) (#7144)
- main linting is now done by oxlint. eslint remains for linting json
files in the frontend (until oxlint adds support)
 - move type checking to the lint step (with --type-check)
this improves performance by removing a duplicated typescript parse task
(instead of parsing for linting then again for type checking, it parses
once for both)
- add a `lint-fast` npm script to get some fast fail behavior. it simply
lints with no type information
- oxc plugins are still in preview, so the custom plugin that checks for
`__testing` usage outside of tests runs outside the main linting job
until performance is improved
- fixes some type issues (and config issues) that were not visible due
to a missing type check on some files. now type checking will run on
every file that is linted
 - split up oxc config for easier management

waiting https://github.com/oxc-project/tsgolint/pull/494

seeing around 3x improvement in type aware linting
2025-12-15 22:16:16 +01:00
Jack
660668c530
chore: use oxfmt for formatting (@miodec) (#7187)
8 times faster formatting,
calls prettier internally for unsupported files

waiting on https://github.com/oxc-project/oxc/issues/16637
https://github.com/oxc-project/oxc/issues/16598
https://github.com/oxc-project/oxc/issues/16621

---------

Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2025-12-15 16:53:50 +01:00
Miodec
89e7e68f70 fix: getting value of select elements not working at all
!nuf

closes #7244
2025-12-15 15:23:26 +01:00
Asif Malik
91d64dc920
feat(theme): add spiderman theme (@asifMalik78) (#7240)
### Description

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

### Checks

- [ ] Adding/modifying Typescript code?
  - [ ] I have used `qs`,`qsa` or `qsr` instead of JQuery selectors.
- [ ] 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` 
- [x] Adding a theme?
- Make sure to follow the [themes
documentation](https://github.com/monkeytypegame/monkeytype/blob/master/docs/THEMES.md)
  - [x] Add theme to `packages/schemas/src/themes.ts`
  - [x] Add theme to `frontend/src/ts/constants/themes.ts`
  - [x] Add theme css file to `frontend/static/themes`
- [x] 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.
- [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.

<!-- 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 #

Theme Screenshots : 
<img width="1484" height="766" alt="2025-12-14_23-51-42"
src="https://github.com/user-attachments/assets/94d9d9dd-37b9-42f0-8930-b75aeb35c913"
/>

<img width="1484" height="766" alt="2025-12-14_23-53-11"
src="https://github.com/user-attachments/assets/995532d3-b6dc-4f19-b9a1-4b8704d8330b"
/>


<!-- 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! :) -->

Co-authored-by: Asif Malik <aasifmalik22789@gmail.com>
Co-authored-by: Christian Fehmer <fehmer@users.noreply.github.com>
2025-12-14 22:07:22 +01:00
Christian Fehmer
4893e44d52
perf: add preconnect to firebase and google recaptcha (@fehmer) (#7236) 2025-12-14 22:03:56 +01:00
Leonabcd123
8c9c6a88d5
refactor(account settings): use show and hide functions(@Leonabcd123) (#7241)
### Description

Complete #7219
2025-12-14 22:03:25 +01:00
Miodec
64436ee2b3 impr(dom utils): rename ondocumentready, add onwindowload
!nuf
2025-12-14 20:32:03 +01:00
Miodec
469a2f6332 fix(account settings): buttons not working 2025-12-14 20:22:44 +01:00
Miodec
69684eddaf fix(account settings): tabs not deselecting 2025-12-14 20:17:50 +01:00
Miodec
d6484109b6 fix(tape): stuck after restarting 2025-12-14 19:00:01 +01:00
Leonabcd123
fd8001ca75
fix(custom-text): Reset long custom text progress to start of word (@Leonabcd123) (#7213)
### Description

Check if the user bailed out mid word, if so decrease `historyLength` by
1 to reset to the start of the current word instead of the start of the
next word.
2025-12-14 14:32:20 +01:00
Leonabcd123
38f3fc251e
refactor: Remove JQuery from account-settings (@Leonabcd123, @fehmer) (#7219)
### Description

Also modifies `swapElements` to accept `ElementWithUtils`.

---------

Co-authored-by: Christian Fehmer <fehmer@users.noreply.github.com>
Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2025-12-14 14:29:05 +01:00
Christian Fehmer
331ca1a26f
build: restore vendor.css (@fehmer) (#7235) 2025-12-14 00:36:27 +01:00
Seif Soliman
b1aa14c6b7
fix(pace-caret): prevent null dereference in update() (@byseif21) (#7226)
### Description
  
* `update()` could hit a race where settings became `null` between
checks, causing a`TypeError` at runtime.

* Async callbacks (setTimeout) accessed the global settings after it was
cleared, leading to runaway errors.
<img width="1887" height="755" alt="Screenshot 2025-12-12 135316"
src="https://github.com/user-attachments/assets/ba6bd13c-c052-4870-ba7c-cfeae916b6dc"
/>


**fix**  
settings once (currentSettings) at the start of update() and use that
for all property access and scheduling, so the loop never touches a
null/stale reference.
2025-12-14 00:10:19 +01:00
Jack
e51550683a
refactor: clean up test-ui and test-logic (@miodec) (#7229)
Move ui code to test ui, remove unused code, remove duplicated code,
merge the two config event listeners, merge a lot of the ui code to make
it easier to grasp.
2025-12-13 23:55:58 +01:00
Leonabcd123
9654ac505c
fix(test-timer): test timer doesn't stop right after a test ends (@Leonabcd123) (#7230)
### Description

In the current implementation, the time difference between `now` and
when we call `TestTimer.clear()` is high enough, so that if the test
duration is really close to a whole number (say `3.96`), then
`TestTimer` will continue to run up until the whole number, and will
push another wpm entry to `wpmHistory` and another raw entry to
`rawHistory`, causing the result chart to be messed up. This
implementation clears `TestTimer` right after calculating `now` to
hopefully allow for a smaller time difference between `now` and
`TestTimer`.

Also fixed some typos in comments.
2025-12-13 23:48:15 +01:00
Christian Fehmer
766056180f
build: fix fontawesome font path in development mode (@fehmer) (#7233) 2025-12-13 23:47:39 +01:00
Jack
e0b5c465cd
refactor: add options object to setConfig (@miodec) (#7228) 2025-12-12 16:55:33 +01:00
Christian Fehmer
2b380bb931
refactor: use ElementWithUtils in page class (@fehmer) (#7223) 2025-12-12 15:16:11 +01:00
Jack
735740da98
refactor: change config event params to an options object (@miodec) (#7227)
Also makes the types stronger on the event.
Also cleans up unused events.

---------

Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2025-12-12 14:44:11 +01:00
Christian Fehmer
9a9b6d72ae
refactor: mock ElementWithUtils (@fehmer) (#7224) 2025-12-12 13:28:49 +01:00
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