Commit graph

2028 commits

Author SHA1 Message Date
Miodec
25dada50eb fix(commandline): blur active element after closing the modal to hide balloons
closes #6320
2025-03-05 19:03:05 +01:00
Christian Fehmer
02c48fc50d
impr(leaderboard): show typing speed in selected unit (@fehmer) (#6328) 2025-03-05 13:55:29 +01:00
Christian Fehmer
aaa519bc8d
fix(leaderboards): user button navigating to the wrong page (@fehmer) (#6334) 2025-03-05 13:02:03 +01:00
Miodec
e4baedee09 fix(leaderboards): bottom go to page button not working 2025-03-04 19:15:27 +01:00
Miodec
853605af24 fix(leaderboards): user button navigating to the wrong page 2025-03-04 19:11:02 +01:00
Miodec
61e0fd1590 chore: reorder code 2025-03-04 19:08:22 +01:00
Christian Fehmer
8193569a01
impr: leaderboard showing times in utc and local time (@fehmer) (#6332)
Co-authored-by: Miodec <jack@monkeytype.com>
2025-03-04 19:06:24 +01:00
Jack
b84f400113
fix: default snapshot and config not actually cloning (@miodec) (#6333)
!nuf Closes #6280
2025-03-04 18:52:51 +01:00
Christian Fehmer
7747db8d84
impr: use zod schema for url parameters on leaderboard (@fehmer) (#6305)
!nuf
2025-03-04 13:08:00 +01:00
Christian Fehmer
4a22c0647b
fix: legacy test settings urls not importing correctly (@fehmer) (#6314)
Some people have old links with test settings we should support.
2025-03-03 12:31:09 +01:00
Nopke
b375636c99
fix(account page): tidy up highest wpm description (@cosmatevs) (#6329)
### Description
Account page:
* remove unnecessary &
![& in highest wpm
description](https://github.com/user-attachments/assets/61e01116-2db8-4a80-93f0-c204c6e3349a)
* build punctuation and number strings only if they're going to be used

### 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.
2025-03-03 11:18:07 +01:00
Miodec
04797b281f fix(result page): clicking on daily leaderboard rank not navigating to the leaderboards page
closes #6311
2025-02-27 11:02:14 +01:00
Christian Fehmer
95967ef4f1
impr: validate tag name on tag creation and rename (@fehmer) (#6264) 2025-02-25 11:40:47 +01:00
Christian Fehmer
5acdc6d364
impr: remember last opened leaderboard in local storage (@fehmer) (#6304) 2025-02-24 12:21:12 +01:00
Hoàng Anh Tuấn
39a235abe5
fix: view leaderboards command not working (@iwmywn) (#6301) 2025-02-24 12:07:21 +01:00
sledgehammer999
73182d450f
fix(punctuation): Add period instead of semicolon for Greek lang (@sledgehammer999) (#6299)
### Description

This is a followup to PR #6297.
1. `:` is a valid punctuation mark and isn't decided in another if/else
branch, so I left it as-is.
2. `;` is also a valid punctuation mark but it is used as a question
mark in the appropriate if/else branch. So here I convert it to a
period.

Modern greeks use either a period or a comma in place of a middle
dot/ano teleia. I would say that a period fits better most of the time.

### 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 or a theme?
- [ ] If is a language, did you edit `_list.json`, `_groups.json` and
add `languages.json`?
  - [ ] If is a theme, did you add the theme.css?
- Also please add a screenshot of the theme, it would be extra awesome
if you do so!
- [ ] 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-02-22 12:10:33 +01:00
Miodec
1bb15af190 fix: daily leaderboards not showing current rank 2025-02-22 09:48:36 +01:00
sledgehammer999
d363cb3933
fix: remove seldomly used punctuation mark from Greek lang (@sledgehammer999) (#6297) 2025-02-22 09:19:38 +01:00
Christian Fehmer
0dd044baae
fix: leaderboard keeping pagination after switching language (@fehmer) (#6291) 2025-02-21 17:04:57 +01:00
Christian Fehmer
8a41ccee97
fix: past leaderboard not fetching the users rank (@fehmer) (#6289)
Show the users ranking for the last day on the daily and for the last
week on the weekly leaderboard correctly.

- Fix request query schema for the [daily
rank](https://api.monkeytype.com/docs/internal#tag/leaderboards/operation/leaderboards.getDailyRank)
having pagination
- Fix request query schema for the [weekly
rank](https://api.monkeytype.com/docs/internal#tag/leaderboards/operation/leaderboards.getWeeklyXpRank)
missing the `weeksBefore` parameter
- Fix frontend to include the `daysBefore` or `weeksBefore` parameter on
`rank` calls

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-02-21 16:52:20 +01:00
Christian Fehmer
0b840d2b6b
feat: leaderboard scroll to users position when using the user button (@fehmer) (#6285)
- scroll to users position when using the user button
- add scroll to top button on leaderboard page

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-02-20 22:21:24 +01:00
Christian Fehmer
7edbd95e9e
fix: remove function getFunctionsFromActiveFunboxes because it does not work (@fehmer) (#6288) 2025-02-20 22:20:24 +01:00
Miodec
c0d254d2da impr: make leaderboard requests in parallel 2025-02-20 20:29:39 +01:00
Miodec
9f677f3324 fix: nospace being active for all tests 2025-02-20 11:41:31 +01:00
Christian Fehmer
f7190a5eae
refactor: refactor british english (@fehmer) (#6277) 2025-02-19 16:28:21 +01:00
Christian Fehmer
09eb1a2b0e
refactor: use validation on email update modal (@fehmer) (#6272) 2025-02-19 16:27:20 +01:00
Christian Fehmer
ef5263d646
refactor: refactor iteration over funboxes (@fehmer) (#6275) 2025-02-19 15:46:43 +01:00
Miodec
31529a3b2b impr: make uncaught error notifications important on dev
!nuf
2025-02-15 19:14:40 +01:00
Miodec
535700f0c5 fix: trim new email when updating email
!nuf
2025-02-15 17:28:56 +01:00
Miodec
8c7ee8bc26 refactor: make some input and corrected props private
also remove methods for public props
2025-02-15 15:14:23 +01:00
Miodec
a0a09cc141 refactor: move active word state to test-state 2025-02-14 14:50:20 +01:00
Jack
01dee3fe15 feat: leaderboards remake, weekly xp leaderboards (@miodec) (#6250) 2025-02-12 16:34:03 +01:00
Christian Fehmer
e7685c5861
impr: add X-Compatibility-Check header to all responses (@fehmer) (#6262)
!nuf
2025-02-12 14:37:53 +01:00
Christian Fehmer
4102e4cc24
refactor: use tsRestFetchApi in ts-rest-adapter (@fehmer) (#6259) 2025-02-12 13:23:04 +01:00
Miodec
a0c471a28e chore: add captcha to the forgot password modal 2025-02-12 12:12:48 +01:00
Miodec
3af1f66dfb fix: result submit error if a test was repeated before submitting 2025-02-08 00:59:57 +01:00
Tamion
a4b7c00ef9
impr: allow multiple funboxes with css (@notTamion, @miodec, @fehmer) (#6017)
### Description
Allows enabling multiple funboxes that have a stylesheet. Which funboxes
should be deemed compatible with each other will need some discussion

---------

Co-authored-by: Jack <jack@monkeytype.com>
Co-authored-by: Christian Fehmer <cfe@sexy-developer.com>
2025-02-04 17:52:50 +01:00
Christian Fehmer
12e150072b
fix: fix error handling in parseWithSchema (@fehmer) (#6229)
`instanceof ZodError` is not working if the code is packaged as a module
for unknown reason. Found while adding tests for the url-handler in
#6207.
2025-02-04 11:08:46 +01:00
Christian Fehmer
750a83da59
refactor: use vendor css from npm package (@fehmer) (#6206)
This PR removes the remaining "vendor" css files copied into
`static/css` and pick them from npm packages instead.

For the slimselect the css should match the version of the js. Since we
use the slimselect `js` file from the npm package we should use the
`css` file from the package as well.

For the balloon.css the file was copied into the project. Adding it as a
dependency makes sure we know the version of it and we don't modify it
in the project leading to problems when we try to update it later.

Similar to the vendor `js` files (js dependencies from packages) extract
the vendor `css` files into a separate `css` file as well.
2025-02-03 23:48:56 +01:00
Mohit Paddhariya
3510ea9760
refactor: replace JSON.parse with parseJsonWithSchema (@dev-mohit06) (#6207)
## Description
Replaces raw JSON parsing with schema-based validation across frontend
TypeScript files to improve type safety and error handling.

### Scope of Changes
- Updated JSON parsing in:
  - `account.ts`
  - `import-export-settings.ts`
  - `analytics-controller.ts`
  - `local-storage-with-schema.ts`
  - `url-handler.ts`
  - `commandline/lists.ts`
  - `test/wikipedia.ts`

- Added schema in `test/custom-text.ts`:
  ```typescript
  export const customTextDataSchema = z.object({
    text: z.array(z.string()),
    mode: CustomTextModeSchema,
    limit: z.object({ 
      value: z.number(), 
      mode: CustomTextLimitModeSchema 
    }),
    pipeDelimiter: z.boolean(),
  });
  ```

### Benefits
- Enhanced runtime type safety
- More robust error handling
- Consistent JSON parsing approach

### Checks
- [x] Follows Conventional Commits
- [x] Includes GitHub username
- [ ] Adding quotes? (N/A)
- [ ] Adding language/theme? (N/A)

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2025-02-03 23:45:57 +01:00
wclxb
4dfd10a035
fix(profile): incorrect instruction on how to set streak hour offset (@wclxb) (#6190)
Make streak hover text when no streak offset is applied consistent with
the setting location

### Description

The hover text label now properly directs a user to the "Account
Settings > Account" section instead of "Settings > Danger Settings" when
they don't have a streak offset set.

### 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 or a theme?
- [ ] If is a language, did you edit `_list.json`, `_groups.json` and
add `languages.json`?
  - [ ] If is a theme, did you add the theme.css?
- Also please add a screenshot of the theme, it would be extra awesome
if you do so!
- [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-02-03 14:58:21 +01:00
Miodec
3ce9e63410 fix: email schema mismatch between frontend and backend 2025-02-03 14:39:31 +01:00
Miodec
0b3f5aaa16 chore: add logs to debug issue 2025-02-03 13:51:46 +01:00
Miodec
05a1272c5c fix: reset composition state to false on test restart
fixes rare bug where every key press would be considered a dead key
2025-01-18 21:29:39 +01:00
Miodec
18a5922b25 fix: live test stats not aligned in tape mode
closes #6183
2025-01-15 13:13:20 +01:00
Miodec
64cc59116c refactor: add cleanup function to animated modals
this fixes issues with drop downs causing performance / duplication issues
2025-01-15 13:09:26 +01:00
Miodec
c8fd68a601 refactor: config group definitions
- moved group definitionsg to the shared pacakge
 - made sure typescript will throw errors if a config is left without a group
 - removed the 'missing group' check because its not possible anymore
2025-01-15 00:04:22 +01:00
Miodec
0f612257aa fix(presets): missing config group definitions breaking partial presets 2025-01-14 12:46:52 +01:00
Miodec
ebebd7694b fix: funbox classes not cleared
remove fb- classes when updating funbox classes to currently active funboxes

closes #6161
2025-01-13 11:15:39 +01:00
Miodec
da70476a5a fix: tape margin default value should be 50
!nuf
2025-01-06 20:53:35 +01:00