Commit graph

5181 commits

Author SHA1 Message Date
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
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
Christian Fehmer
445be88754
ci: allow dependabot node version (@fehmer) (#7184) 2025-12-03 16:52:38 +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
2fcc86dddf chore: make sure to use production env when building for production 2025-12-02 23:33:51 +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
sapbotgit
a875aa6ede
impr(quotes): Add quotes from eChat source code (@sapbotgit) (#7154)
### Description

Different snippets of code from my old, dead project.

### Checks

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

<!-- 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-11-26 23:33:32 +01:00
NeraShi
c2691b334e
impr(quotes): add Russian quotes (@NeraShi) (#7152)
### Description

Some quotes from my favourite literature.

### Translations
id_1151: Almost five years! There were probably moments today when the
living Daisy did not quite match the Daisy of his dreams - and it was
not her fault, but the immense life force of the image he had created.
This image was better than her, better than anything in the world. He
shaped it with the genuine passion of an artist, constantly adding
details, decorating every bright feather that came into his hand. No
tangible, real charm can compare to what a person can accumulate in the
depths of their imagination.
id_1152: Gatsby believed in the green light, the gleam of an incredible
future happiness that recedes each year. Even if it eluded him today,
tomorrow we will run faster, reach further... And one fine morning... So
we try to swim forward, struggling against the current, and it keeps
pushing our little boats back into the past.
id_1153: They say emotional wounds heal - a thoughtless analogy to
bodily injuries, but in life it is not so. Such a wound may shrink,
partially close, but it is always an open wound, even if no larger than
a pinprick. The trace of suffered pain can perhaps be compared to the
loss of a finger or sight in one eye. You come to terms with the injury,
remembering it maybe only once a year - but when it suddenly comes to
mind, there is no help for it.
id_1154: Youth is like a plate piled high with sweets. Sentimental
people claim they would like to return to the simple, pure state in
which they existed before tasting the sweets. This is incorrect. They
would like to experience those pleasurable sensations again.
id_1155: Self-sacrifice, like a high elective office or inherited power,
for some people at some times is a luxury, yet it brings not guarantee
but responsibility, not calm but desperate risk. By its own inertia, it
can push one to ruin — an emotional wave causes it, and the person is
left alone forever on a bare rock of hopelessness.
id_1156: There is so much within me that I want to express. But it is
all so immense. I cannot find the words, I cannot convey what is inside.
Sometimes it feels as if the whole world, all of life, everything in
existence resides within me and demands: be our voice. I feel, oh, I
don’t know how to explain... I feel its vastness, and when I begin to
speak, it comes out as childish babble. How difficult it is to convey
feeling, sensation in words, on paper or aloud, so that the reader or
listener feels the same as you. It is a great task.
id_1157: Facing life in all its forms, whirling in its changing vortex,
Martin learned one rule: when playing an unfamiliar game, give the first
move to another. This rule saved him thousands of times, honing his
observation. He knew how to scrutinize the unknown and wait until a
weakness or vulnerable point revealed itself. Just as in a boxing match,
you test the opponent to find a weakness. And once found, - long
experience taught him - use it fully.
id_1158: Wherever he went, he was liked by everyone, because whether in
work or in play, he remained true to himself, always ready and able to
fight for his rights and demand respect. But he never put down roots.
Those around him were pleased, but he himself was never fully content.
There was no peace in him; he was constantly drawn and beckoned,
wandering through life, not knowing what he sought or where the call
came from, until he discovered books, creativity, and love.
id_1159: The dream of love was more important to him than the dream of
knowledge. The world seemed wondrous not because it consisted of
molecules and atoms obeying some mysterious laws - it seemed wondrous
because Ruth lived in it. She was a miracle, one that had never appeared
to him even in dreams.
id_1160: In the mouths of these people, the books he had read came
alive. They spoke passionately, fervently. Thought burned them, as
alcohol or anger might burn others. Philosophy was no longer dry printed
lines from legendary demigods like Kant or Spencer. Philosophy had come
alive, embodied in these two, filled with boiling crimson blood,
transforming their faces.

### 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.
- [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.
2025-11-26 23:31:24 +01:00
Christian Fehmer
71b5d22159
refactor: Use class for validateWithIndicator (@fehmer) (#7151)
In preparation for the ElementWithUtils refactoring
2025-11-26 23:29:57 +01:00
Christian Fehmer
227a522024
refactor: use modern api for toggle fullscreen (@fehmer) (#7150) 2025-11-26 23:28:39 +01:00
Christian Fehmer
aafabeb78d
fix(friends): proper display of pending requests on small screens (@fehmer) (#7148) 2025-11-26 23:27:30 +01:00
GreenvillSSnick
14895f64a5
chore: add more words to hinglish language(hinglish.json) (@GreenvillSSnick) (#7138)
### Description

I added some new words to /frontend/static/languages/hinglish.json

Translations:

barre: outside
durghatana: accident
oopar: above
sabse: most
sveekaar: accept

### 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.
2025-11-26 23:16:46 +01:00
Christian Fehmer
0a4043de45
impr: validate username on profile search page (@fehmer) (#7132)
fixes #7131
2025-11-26 23:03:52 +01:00
Étienne BERSAC
b7ddb26000
fix(language): replace oe with œ where relevant (@bersace) (#7130)
### Description

Fix more ligatures on French.

Supersedes #7111 

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

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


<!-- 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-11-26 23:03:18 +01:00
Lodun Coombs
c99f504f3b
fix(keymap): prevent tilde key from highlighting entire keymap (@LodunCoombs) (#7128) 2025-11-26 23:02:35 +01:00
Leonabcd123
f54c8a8cd8
impr(practice-words): Add option to practice missed and slow words from commandline (@Leonabcd123) (#7125)
### Description

Added an option to practice both missed and slow words from the command
line by doing esc -> Practice words -> both.

Implements #5753
2025-11-26 22:51:08 +01:00
28Zapper
31e07e28ab
impr(quotes): add quote to the english repository (@28Zapper) (#7113)
impr(quotes): Added a quote from UNDERTALE to
`./frontend/static/quotes/english.json`. (@28Zapper)

---------

Co-authored-by: Miodec <13181393+Miodec@users.noreply.github.com>
2025-11-26 22:40:56 +01:00
Leonabcd123
e8339f0a1f
feat(funbox): Add rot13 funbox (@Leonabcd123) (#7116)
### Description

Added a new funbox mode that implements the rot13 cipher, shifting each
character over by 13 places.

I'm not really sure which properties fit best with this...

Implements #6565
2025-11-26 22:40:10 +01:00
Jérémie Roquet
ddd5eb40d7
fix(language): add missing ligatures in french_10k (@Arkanosis) (#7111)
In some words, only the ligature was missing; in others, the letters
were too.

Missing ligature only:
 - cœur
 - œil
 - œuvre

Missing letters as well:
 - manœuvres
 - manœuvre
 - chœur
 - nœud
 - coup d'œil
 - blanc d'œuf
2025-11-26 22:32:51 +01:00
Aquaduckd
dcc4e40529
fix(layout): pine v4 (#7110)
the K key should be lowercase on the main layer
2025-11-26 22:32:07 +01:00
Miodec
60d1aac72e fix: composition update not making sounds 2025-11-26 17:52:24 +01:00
Miodec
f63972a63c fix: ellipsis not working correctly
closes #7156
closes #7149
2025-11-26 17:43:13 +01:00
Miodec
a552272cd4 fix: skill issue fix not fitting on mobile screens 2025-11-26 10:45:24 +01:00
Miodec
3375419023 fix: unable to enter fullscreen on result page 2025-11-26 10:08:57 +01:00
Miodec
0d9a1d9da5 fix: backspace always playing error sound 2025-11-25 18:39:15 +01:00
Miodec
68266101d0 refactor: move data normalization to a function 2025-11-25 10:53:45 +01:00