Commit graph

12104 commits

Author SHA1 Message Date
Miodec
a070911fdd chore: remove test code, disable debounce on login
also increases default debounce
2025-08-14 11:49:07 +02:00
Seif Soliman
5fcf964ebc
fix(test): immediately reposition caret and tape on tapeMargin change (@byseif21) (#6860)
### Description

changing `tapeMargin` mid-test didn’t move the caret until typing
resumed because no layout update was triggered for this config.
2025-08-14 11:30:48 +02:00
Christian Fehmer
a3764460e4
impr(validation): don't debounce if delay is zero (@fehmer, @miodec) (#6878)
after #6866 set debounceDelay to 0 for email validation
2025-08-14 11:30:06 +02:00
Christian Fehmer
33e3acc70f
refactor(login): use inputValidation on login page (@fehmer) (#6866) 2025-08-14 11:26:28 +02:00
Christian Fehmer
119649bc9e
test: don't use globals for vitest (@fehmer) (#6871)
- **test: support to run/watch all tests in vscode (@fehmer)**
- **packages/contracts**
- **move schema tests to schema package**
- **packages/funbox**
- **packages/utils**
- **frontend**
- **backend**

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-08-14 11:25:44 +02:00
Christian Fehmer
8fe0e65045
refactor: rewrite sanitize to support nested objects (@fehmer) (#6875) 2025-08-14 11:19:18 +02:00
Tim Boex
e6dc6d16c8
fix: 8008 theme duplicate sub-alt-color (@tboex) (#6879)
### Description

the 8008 theme had a duplicate `--sub-alt-color` set to `#000000`

### 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`
- [O] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [O] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [O] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

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

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->
2025-08-14 11:16:03 +02:00
Majid Shajari
c189009043
feat(language): Update persian_20k.json (@MajidShajari) (#6880)
add new word and convert arabic char to persian char

### Description

add new words 
change arabic character to persian character 
delete duplicat word

### 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` 
  - [X] update language json file
- [ ] 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-08-14 11:15:31 +02:00
Christian Fehmer
7a91b4e08b
chore: update redocly to 2.0.5 (@fehmer) (#6874) 2025-08-14 11:14:33 +02:00
Jeff Kochuk
52f293e294
feat(quotes): add typescript quotes (@JeffKochuk) (#6852)
feat(quotes): Added typescript quotes (@JeffKochuk) 

### Description

I added several quotes for typescript code so I can track my progress
with my split keyboard.

### 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.
- [None] 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.

---------

Co-authored-by: Jeff Kochuk <Jeff@JeffKochuk.com>
2025-08-13 11:16:05 +02:00
Christian Fehmer
3447907d09
test: support to run/watch all tests in vscode (@fehmer) (#6868) 2025-08-13 11:14:21 +02:00
Christian Fehmer
d52af936f6
fix(account): error while loading old filter presets (@fehmer) (#6873)
fixes #6872
2025-08-12 13:51:58 +02:00
Miodec
36556c61b6 fix: email handler using dev firebase config 2025-08-11 21:10:57 +02:00
Christian Fehmer
39bc6706cc
fix: mouseover labels not working on static pages (@fehmer) (#6869)
import of balloon.min.css was broken for static html files since we
moved it to vendor.css
2025-08-11 21:04:48 +02:00
Miodec
bc0a0aed57 fix: email handler not working 2025-08-11 20:09:13 +02:00
Christian Fehmer
e838f71c78
fix: authentication issues when using multiple tabs (@fehmer) (#6790)
fixes #6279

- store the last use "remember login" state in localstorage
- initialize firebase auth with correct persistence (LOCAL if "remember
me" is set, SESSION otherwise)


initialization of `Auth` needs to by awaited. This required some
refactoring. During debugging it was useful to have easier control over
the `Auth` object.

Summary of the refactoring:

- don't expose firebase `App` or `Auth` (except for email-handler)
- initialise firebase in async method that can be awaited to ensure
setup is done before any call to firebase
- move `authStateChanged` handling from account-controller to our
firebase module which then calls `account-controller.readyFunction`.
- update all direct calls to `Auth` to use functions of our firebase
module
- move error handling and interpretation of `FirebaseError` to our
module and removed duplicate code
- use tryCatch helper on refactored code instead of native `try...
catch`

---------

Co-authored-by: Miodec <jack@monkeytype.com>
Co-authored-by: Lukas <dev@mardybum.de>
Co-authored-by: Seif Soliman <byseif21@gmail.com>
2025-08-11 13:11:51 +02:00
Miodec
541f29ce94 fix: shift enter not inserting a newline character 2025-08-10 16:06:53 +02:00
Miodec
e74ed0e4c1 refactor: reduce indentation, update oxlint rule 2025-08-10 15:21:25 +02:00
Miodec
5183caf91e chore: upgrade oxlint 2025-08-10 15:08:46 +02:00
Seif Soliman
42609e21dc
fix(tooltips): prevent hover pop-up reappearance on click (@byseif21) (#6831)
### Description

tooltip pop-ups were reappearing on click when interacting with various
clickable elements (e.g., tags in results table, test result buttons,
account page actions).
2025-08-10 15:02:53 +02:00
Seif Soliman
68d2370d94
impr(settings-page): responsive local font button style (@byseif21) (#6855)
### Description

in the smaller screens it's not looking the best 
* now
<img width="561" height="432" alt="Screenshot 2025-08-09 090154"
src="https://github.com/user-attachments/assets/72fc5fdb-a008-4699-9bfc-b766937bf72a"
/>
2025-08-10 14:51:03 +02:00
Christian Fehmer
74f2d060f5
test: remove duplicate config tests (@fehmer) (#6861)
Somehow we ended up with the same tests in config and config-metadata
2025-08-10 14:48:31 +02:00
Seif Soliman
1048e04884
fix(zen-mode): restore input history and watch replay (@byseif21) (#6863)
### Description

fix:
* The result “input history” panel sometimes rendered nothing because
the renderer attempted to split an undefined target word.
added split word ?? "" to handle missing target words in zen.

* The replay view in zen mode could be empty if the last word was just
submitted (so input.current was empty at finish), and the replay words
list never got updated.

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-08-10 14:47:52 +02:00
Miodec
59a6004de7 fix(test config): applying preset doesnt show punctuation and numbers 2025-08-10 14:03:11 +02:00
Christian Fehmer
568012af6e
fix(presets): preset with minWpmCustom should not activate minWpm (@fehmer, @miodec) (#6857)
Co-authored-by: Miodec <jack@monkeytype.com>
2025-08-10 13:45:04 +02:00
Miodec
a387d8269d chore: update hooks
use nvm install, quiet exit in post checkout if nvm is not available
2025-08-10 13:18:21 +02:00
Miodec
436fafcc60 chore(account): add note about activity using utc time 2025-08-10 13:18:21 +02:00
Christian Fehmer
792a222adc
impr(misc): reject nested objects in sanitize (@fehmer) (#6850) 2025-08-09 20:01:21 +02:00
Christian Fehmer
18267c737c
impr(keymap): optimize config event listener on full config load (@fehmer) (#6856) 2025-08-09 19:55:08 +02:00
Christian Fehmer
100050fd1e
fix(config): fix array not getting verified after sanitize (@fehmer) (#6849) 2025-08-08 12:17:27 +02:00
Miodec
3b17e9e998 test: make sure sanitize throws a readable error 2025-08-08 11:31:16 +02:00
Miodec
0535652acc chore: release v25.32.0 2025-08-07 15:15:49 +02:00
Seif Soliman
356ca1909b
impr(commandline): add local background/font commands (@byseif21) (#6816)
* add commands for adding and removing custom local background and font.
* fix the url image input not updating when changing the background from
the commandline while in the settings page.
2025-08-07 15:11:46 +02:00
Christian Fehmer
f9b22ade56
chore: remove unused dependencies (@fehmer) (#6841)
- **remove chokidar**
- **remove path, node-fetch, ioredis-mock**
- **remove nodemon**
2025-08-07 15:02:19 +02:00
Christian Fehmer
bec5606c7a
chore: move knip to project root (@fehmer) (#6842) 2025-08-07 15:00:43 +02:00
Christian Fehmer
ced5dc1920
impr(config): validation on layoutFluid and polyglot (@fehmer) (#6844) 2025-08-07 14:48:48 +02:00
Christian Fehmer
cd99d5af16
test: add WeeklyXpLeaderboards integration tests (@fehmer) (#6843) 2025-08-07 14:48:14 +02:00
Christian Fehmer
c8a91ede52
test: fix flaky user tests (@fehmer) (#6837) 2025-08-07 14:47:35 +02:00
Polina
821c640888
feat(layout): add Rulemak layout (@poli0iq) (#6835)
### Description

Add Rulemak Cyrillic layout, as found in
23fec5367a/symbols/ru (L722).

It's primarily designed for Russian, but can also be used for Ukrainian,
Serbian, Bulgarian, Belarusian and Macedonian, thanks to its layer 3-4
symbols.

### 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-08-05 14:22:00 +02:00
Seif Soliman
af0f23c940
fix: font file type check for better browser compatibility (@byseif21) (#6836)
### Description

* browsers don't provide accurate MIME types for font files , I couldn't
even reuse the site fonts as local fonts.
* Validation now checks both MIME type and file extension to ensure
valid fonts aren't mistakenly rejected.
2025-08-05 13:57:26 +02:00
Seif Soliman
31585bd0b2
fix(quote-mode): broken all selection and visual highlighting issues (@byseif21) (#6818)
### Description

* fixed UI click handler to consistently map "all" quote mode selection
(all) to [0, 1, 2, 3] `setQuoteLengthAll();`.
* fix the mobile model to highlight the all selection when length is [0,
1, 2, 3].
* fix quote length options were not visually highlighted when refreshing
from other mode then back to quote mode.
2025-08-05 13:57:09 +02:00
Miodec
3f72e31df9 fix(test config): sometimes showing too many elements at once 2025-08-04 19:59:23 +02:00
Miodec
7519931b1b fix: move time setting before mode 2025-08-04 19:59:23 +02:00
Christian Fehmer
01ed9322ec
test: update to vitest3 (@fehmer) (#6811)
- **test: use mongodb testcontainer (@fehmer)**
- **don't run integration tests in parallel**
- **fix premium test**
- **refactor, cleanup**
- **refactor, cleanup**
- **test: add integration tests for daily leaderboards (@fehmer)**
- **trigger**
- **trigger**
- **test: update to vitest3 (@fehmer)**
2025-08-04 15:55:10 +02:00
Christian Fehmer
f759b0ce89
feat(settings): allow user to pick a local font (@fehmer, @miodec) (#6794) 2025-08-04 15:50:02 +02:00
Christian Fehmer
9c41fd5d04
test: add unit tests for daily leaderboards (@fehmer) (#6802)
- **refactor existing test to use it.for**
- **use testcontainers**
2025-08-04 15:28:55 +02:00
Tobi
c4353f6371
docs(SELF_HOSTING.md): add Firebase domain whitelisting instructions (@tobilobasalawu) (#6832)
### Description

Improved the `SELF_HOSTING.md` documentation by adding clear
instructions for whitelisting domains in Firebase Authentication.

#### Changes:
- Explained the purpose of Firebase's authorized domains
- Provided a step-by-step guide on how to whitelist your domain(s)

---

### Checks

- [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.

---

###  Issue Reference

Closes [#6809](https://github.com/monkeytypegame/monkeytype/issues/6809)
2025-08-04 15:21:43 +02:00
Christian Fehmer
1a07ffc5f7
fix(config): numbers and punctuation always reset to false (@fehmer) (#6830) 2025-08-04 15:19:37 +02:00
Christian Fehmer
df8cb077b0
fix(style): fix visual problems (@fehmer) (#6827)
On the settings page

- theme -> custom add a margin to the left of the color picker
- buttons/input on the right side align with the top of the text on the
left side
2025-08-04 15:19:17 +02:00
Kiri
34001e7fb0
fix: Misspelt items in League of Legends language (@kiriDevs) (#6822) 2025-08-04 15:18:40 +02:00