Commit graph

3339 commits

Author SHA1 Message Date
Miodec
5e383ba047 fix 2025-12-12 09:03:44 +01:00
Miodec
9c9ae4f814 wip 2025-12-11 21:58:24 +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
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
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
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
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
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
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
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
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
Leonabcd123
54e660da6b
impr(quote search modal): add custom length filter (@Leonabcd123) (#7109)
### Description

Added a new filter option in the quotes search page that allows the user
to search for quotes by a minimum and a maximum length.

Implementing #1323

---------

Co-authored-by: Jack <jack@monkeytype.com>
2025-12-03 16:42:18 +01:00
Miodec
b64db65e59 fix: weird input behavior on some android keyboards 2025-12-02 20:42:51 +01:00
Miodec
ad8e4f65b5 chore: add disable slow timer button to dev options 2025-12-02 15:54:48 +01:00
Miodec
ad3b7b37d1 fix: backspacing causing desync on some platforms 2025-12-02 10:26:46 +01:00
Miodec
8c035c1687 chore: remove duplicated debug log 2025-12-02 10:00:28 +01:00
Miodec
a9e0db4f88 chore: update timer style schema
also update config and commandline metadata
2025-11-28 21:55:38 +01:00
Miodec
be73085b2a chore: animate also accepts strings 2025-11-28 21:43:15 +01:00
Miodec
62ef8564a6 chore: add guards to composition 2025-11-28 21:43:15 +01:00
Miodec
34e971bc42 chore: add guards to before delete 2025-11-28 21:43:15 +01:00
Leonabcd123
2886c72833
impr(words-filter): add 'exact match only' checkbox (@Leonabcd123) (#7126)
### Description

Added a checkbox in the words filter modal that allows the user to make
all characters not in the include list be excluded.

Implements #5970

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-11-27 20:36:38 +01:00
Leonabcd123
f6df272466
impr(input-history): Change style for incomplete last word in input history (@Leonabcd123) (#7117)
### Description

Added a new style named "incomplete" that mirrors the error style, but
uses yellow for the color. Words are marked in this style when they
don't match the correct word exactly, but share the same prefix.

Implements #6690

---------

Co-authored-by: Jack <jack@monkeytype.com>
2025-11-27 20:30:34 +01:00
Miodec
5f305735de chore: upgrade to prettier 3.7 2025-11-27 12:48:53 +01:00
Gian Peña
d18408700b
impr(timer/progress style): add flashing timer style (@gianpena) (#7139)
### Description

This copies the existing `text` timerstyle except on timed modes, where
it will only show the remaining progress (seconds) on every 15th second
(shows on 1:00, 45, 30, 15 and 0).

The motivation for this addition was that I wanted a middle ground
between the `text` timerstyle (in my opinion just a _little_ too
distracting) and no live progress indicator at all (I lose track of how
much time remains in the test), and I believe this achieves that middle
ground.

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-11-27 11:50:16 +01:00
Jack
f910c8a567
chore: prettier upgrade (@miodec) (#7159) 2025-11-27 00:20:09 +01:00
Miodec
12f206eeca fix: ts issues (how did this get past ci?) 2025-11-27 00:05:41 +01:00