Commit graph

12956 commits

Author SHA1 Message Date
Miodec
73a4e7ab81 fix: update icon class for user AFK button 2025-12-17 15:51:50 +01:00
Miodec
97f87e079b fixes 2025-12-17 11:57:57 +01:00
Miodec
c003eb5390 fix merge 2025-12-16 20:02:40 +01:00
Miodec
3feade3544 Merge branch 'master' into newtribemerge 2025-12-16 19:59:50 +01:00
Leonabcd123
71e78cd52d
docs: improve language in pull request template (@Leonabcd123) (#7252) 2025-12-16 17:55:27 +01:00
Miodec
d990b42c1e chore: update contributors list 2025-12-16 17:50:03 +01:00
Leonabcd123
b7c06d1ddc
fix(blind mode): Extra letters in blind mode causing caret problems (@Leonabcd123) (#7254)
### Description

- Enable blind mode
- Write extra letters
- Caret will jump to above the first letter in the word
2025-12-16 17:47:38 +01:00
Christian Fehmer
36b59ae8ee
impr: add multiple elements found warning in dom utils (@fehmer) (#7242)
Co-authored-by: Miodec <jack@monkeytype.com>
2025-12-16 12:30:25 +01:00
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
Miodec
68c93934de remove object 2025-12-14 18:46:46 +01:00
Miodec
27b4da34e3 Merge remote-tracking branch 'origin/newtribemerge' into newtribemerge 2025-12-14 15:40:28 +01:00
Miodec
57fa0381eb fix merge 2025-12-14 15:39:02 +01:00
Miodec
05bd3d1e48 Merge branch 'master' into newtribemerge 2025-12-14 15:38:33 +01:00
eikomaniac
7a17ba25ec
feat(frontend): add feature flag for tribe multiplayer (@eikomaniac) (#7234)
### Description

Adds a tribeEnabled feature flag to gate tribe multiplayer
functionality.

# Note
Once this PR is approved and merged into `newtribemerge`,
`newtribemerge` can safely be merged into `master`

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-12-14 15:30:38 +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
Miodec
5d229e712b add socket to global in dev 2025-12-14 14:18:55 +01:00
Miodec
8bb1d82e0d add quickjoin dev room button 2025-12-14 11:27:19 +01:00
Miodec
af36597528 fix settings 2025-12-14 00:54:07 +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
Miodec
42ee139690 ignore keydowns if tribe test is not active 2025-12-13 22:18:40 +01:00
Miodec
cbf5778c4e fix unable to change config 2025-12-13 21:31:24 +01:00
Miodec
9e0e7c6f59 update ping calculation 2025-12-13 21:16:34 +01:00
Miodec
e2a524e292 extract repeated code 2025-12-13 21:06:37 +01:00
Miodec
5bba8f1078 fix tribe conditions 2025-12-12 22:34:35 +01:00
Miodec
4cefd8152b add helpers 2025-12-12 22:34:21 +01:00
Miodec
ac24f4c38e jsdoc 2025-12-12 22:17:50 +01:00
Miodec
0a5509fdb2 fixes 2025-12-12 22:12:08 +01:00
Miodec
0d4e24077f Merge branch 'master' into newtribemerge 2025-12-12 21:55:44 +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