-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impr: consider numbers in pb #4946
Conversation
Continuous integration check(s) failed. Please review the failing check's logs and make the necessary changes. https://github.com/monkeytypegame/monkeytype/actions/runs/7578828078 |
Updating the types is not enough. You also need to handle this new property correctly when saving pbs, and make sure to display it on the frontend. |
@Miodec Yeah, the pbs will be saved. Also, in UI it will be shown as a new personal best cause we will set the flag as true in response. Are there any other places in the UI, where we are showing the score explicitly that I need to handle? What else I am missing? |
|
This PR is stale. Please trigger a re-run of the PR check action. |
frontend/src/ts/db.ts
Outdated
@@ -636,6 +637,7 @@ export async function saveLocalPB<M extends MonkeyTypes.Mode>( | |||
).forEach((pb) => { | |||
if ( | |||
pb.punctuation === punctuation && | |||
!!pb.numbers === numbers && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think !!
is necessary here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked that the older personal-bests in a given mode won't have the numbers field. That's why I added this. Btw, I am also adding support for pace-caret and tags, so still working on that. Could you tell if I am missing anything else as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, youre right. All though maybe i would prefer (pb.numbers ?? false) === number
This PR is stale. Please trigger a re-run of the PR check action. |
Fixes:
#4823