monkeytype/frontend/static
Brian Evans cffa7514ea
Save speed stats in leaderboard update (#3652) mrbrianevans
* Save speed stats in leaderboard update

Saves a histogram data structure of speeds for buckets rounded to the nearest 10.

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* API endpoint to get public speed stats

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Add APE class for public stats (WIP)

I created an APE class for accessing public stats. Also stubbed getting and showing the public speed stats on the about page. Haven't implemented the histogram yet though.

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Draw histogram for global speed stats

On about page

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Update histogram colors on theme change

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Fixed out-of-order data in speed histogram

 Data was not sorted correctly, which resulted in an incorrect histogram being drawn.

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Public speed stats PR fixes

Small fixes based on PR feedback:
 - changed _req to req
 - removed unnecessary client version header

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Add endpoint for typing stats

New endpoint to retrieve the public typing stats such as global count of tests completed.

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Renamed public-stats to public

Except in cases where it would cause an identifier named `public` as this is forbidden in strict mode.

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Add stats section to about page

In this commit:
 - add a section above about called stats
 - display typing stats in three columns
 - underneath show the histogram of speeds on english time 60
 - make chart responsive

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* Add unit test for Public DAL

Signed-off-by: Brian Evans <ebrian101@gmail.com>

* updated styling

* only requesting data once per session

* going one column on narrow screens

* added option to specify number of decimal poitns

* just showing million instead of abbreviating
updated structure
updated styling

Signed-off-by: Brian Evans <ebrian101@gmail.com>
Co-authored-by: Miodec <jack@monkeytype.com>
2022-10-18 15:45:45 +02:00
..
.well-known update security.txt expiry date (#3074) 2022-06-06 16:27:37 -04:00
about updated contributors list 2022-10-18 02:37:09 +02:00
challenges disabled autorole 2022-06-22 12:12:18 +02:00
css
fonts added open dyslexic font 2022-09-22 14:37:04 +02:00
funbox checking flipped and colorful mode 2022-09-11 14:06:31 +02:00
html Save speed stats in leaderboard update (#3652) mrbrianevans 2022-10-18 15:45:45 +02:00
images pwa support 2022-10-13 14:26:49 +02:00
js
languages New language: english doubleletter (#3664) QuackerDeezles 2022-10-17 16:13:05 +02:00
layouts added ABNT2 2022-10-16 22:18:19 +02:00
quotes removed quotes 2022-10-18 03:44:24 +02:00
sound
themes renamed animation 2022-09-27 20:39:02 +02:00
webfonts added open dyslexic font 2022-09-22 14:37:04 +02:00
email-handler.html enforcing strong passwords in the email handler 2022-09-28 12:46:11 +02:00
main.html moved popups to their own parent element 2022-10-16 18:08:09 +02:00
manifest.json pwa support 2022-10-13 14:26:49 +02:00
privacy-policy.html added section about ads to the privacy policy 2022-09-27 00:45:44 +02:00
robots.txt
security-policy.html fixed punctuation link spacing on the security policy page 2022-08-08 16:40:05 +02:00
sw.js
terms-of-service.html Fix formatting (#3398) 2022-08-09 20:02:19 +02:00