diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index fd9eaf1b2..dbd01af2f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -6,47 +6,44 @@ labels: bug assignees: "" --- - + - +**Describe the bug** + + +Sometimes things work in incognito mode, which allows me to further track down the issue. -**To Reproduce** +--> - +**To Reproduce** 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error -**Expected behavior** +**Expected behavior** - +**Screenshots** -**Screenshots** - - - -**Desktop:** +**Desktop:** - OS: [] - Browser [] - Version [] -**Smartphone:** +**Smartphone:** - Device: [] - OS: [] - Browser [] - Version [] -**Additional context** - - +**Additional context** diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 19adc9d92..85266c6a5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ -Adding a language or a theme? Make sure to edit the `_list.json` file and add the `language.json` or `theme.css` as well, otherwise, it will not work! +Adding a language or a theme? For languages, make sure to edit the `_list.json`, `_groups.json` files, and add the `language.json` file as well. For themes, make sure to add the `theme.css` file. It will not work if you don't follow these steps! Please reference any issues related to your pull request. diff --git a/code_r.json b/code_r.json new file mode 100644 index 000000000..07d7151fb --- /dev/null +++ b/code_r.json @@ -0,0 +1,27 @@ +{ + "name": "code_r", + "leftToRight": true, + "words": [ + "if", + "for", + "FALSE", + "NA_integer_", + "return", + "else", + "in", + "NULL", + "NA_real_", + "repeat", + "next", + "Inf", + "NA_complex_", + "while", + "break", + "NaN", + "NA_character_", + "function", + "TRUE", + "NA", + "..." + ] +} diff --git a/src/js/popups/word-filter-popup.js b/src/js/popups/word-filter-popup.js index 79cb583d6..cc1bc9f6c 100644 --- a/src/js/popups/word-filter-popup.js +++ b/src/js/popups/word-filter-popup.js @@ -65,15 +65,15 @@ async function filter(language) { return filteredWords; } -async function apply() { +async function apply(set) { let language = $("#wordFilterPopup .languageInput").val(); let filteredWords = await filter(language); - let customText = ""; - filteredWords.forEach((word) => { - customText += word + " "; - }); + let customText = filteredWords.join(" "); + + $("#customTextPopup textarea").val( + (index, val) => (set ? "" : val + " ") + customText + ); hide(); - $("#customTextPopup textarea").val(customText); } $("#wordFilterPopupWrapper").mousedown((e) => { @@ -90,8 +90,9 @@ $("#wordFilterPopupWrapper .button").mousedown((e) => { $("#wordFilterPopupWrapper .loadingIndicator").removeClass("hidden"); $("#wordFilterPopupWrapper .button").addClass("hidden"); setTimeout(() => { - apply(); - $("#wordFilterPopupWrapper .loadingIndicator").addClass("hidden"); - $("#wordFilterPopupWrapper .button").removeClass("hidden"); + apply($(e.target).is("#set")).then(() => { + $("#wordFilterPopupWrapper .loadingIndicator").addClass("hidden"); + $("#wordFilterPopupWrapper .button").removeClass("hidden"); + }); }, 1); }); diff --git a/src/js/test/test-logic.js b/src/js/test/test-logic.js index 02065e9cf..7c87a317b 100644 --- a/src/js/test/test-logic.js +++ b/src/js/test/test-logic.js @@ -641,8 +641,20 @@ export function restart(withSameWordset = false, nosave = false, event) { let testSeconds = TestStats.calculateTestSeconds(performance.now()); let afkseconds = TestStats.calculateAfkSeconds(); // incompleteTestSeconds += ; - TestStats.incrementIncompleteSeconds(testSeconds - afkseconds); + let tt = testSeconds - afkseconds; + console.log( + `increasing incomplete time by ${tt}s (${testSeconds}s - ${afkseconds}s afk)` + ); + TestStats.incrementIncompleteSeconds(tt); TestStats.incrementRestartCount(); + if (tt > 600) { + Notifications.add( + `Your time typing just increased by ${Misc.roundTo2( + tt / 60 + )} minutes. If you think this is incorrect please contact Miodec and dont refresh the website.`, + -1 + ); + } // restartCount++; } diff --git a/src/sass/style.scss b/src/sass/style.scss index 8becf83c9..d7576aedf 100644 --- a/src/sass/style.scss +++ b/src/sass/style.scss @@ -156,6 +156,7 @@ html { .select2-selection { background: rgba(0, 0, 0, 0.1); height: fit-content; + height: -moz-fit-content; padding: 5px; border-radius: var(--roundness); color: var(--text-color); @@ -199,6 +200,7 @@ html { .select2-selection:focus { height: fit-content; + height: -moz-fit-content; padding: 5px; border-radius: var(--roundness); color: var(--text-color); @@ -208,6 +210,7 @@ html { } .select2-selection:active { height: fit-content; + height: -moz-fit-content; padding: 5px; border-radius: var(--roundness); color: var(--text-color); @@ -1787,12 +1790,14 @@ key { grid-auto-flow: column; width: fit-content; gap: 1rem; + width: -moz-fit-content; } .right { text-align: right; display: grid; grid-auto-flow: column; width: fit-content; + width: -moz-fit-content; justify-self: right; gap: 1rem; // align-items: center; @@ -2123,6 +2128,7 @@ key { #words { height: fit-content; + height: -moz-fit-content; display: flex; flex-wrap: wrap; width: 100%; @@ -2582,6 +2588,7 @@ key { font-size: 0.75rem; line-height: 0.75rem; height: fit-content; + height: -moz-fit-content; align-self: center; justify-self: right; padding: 0.25rem 0; @@ -3133,6 +3140,7 @@ key { // background: var(--sub-color); color: var(--sub-color); width: fit-content; + width: -moz-fit-content; padding: 0.5rem; border-radius: var(--roundness); cursor: pointer; diff --git a/static/index.html b/static/index.html index 92524f331..080288e45 100644 --- a/static/index.html +++ b/static/index.html @@ -202,10 +202,15 @@ Use the above filters to include and exclude words or characters (separated by spaces) +
Table of Contents
Monkeytype collects the following data:
You directly provide most of the data we collect. We collect data and @@ -122,7 +126,7 @@
Monkeytype collects your data so that we can:
Monkeytype securely stores your data using Firebase Firestore.
-Monkeytype would like to make sure you are fully aware of all of your data protection rights. Every user is entitled to the following: @@ -180,7 +184,7 @@ -
Like most websites, Monkeytype collects information that your browser sends whenever you visit the website. This data may include internet @@ -196,7 +200,7 @@
In our case, this service is provided by Google Analytics.
-Cookies are text files placed on your computer to collect standard Internet log information and visitor behavior information. When you @@ -215,7 +219,7 @@ .
-Monkeytype uses cookies in a range of ways to improve your experience on our website, including: @@ -225,25 +229,21 @@
There are a number of different types of cookies, however, our website - uses: + uses functionality cookies. Monkeytype uses these cookies so we + recognize you on our website and remember your previously selected + settings.
-You can set your browser not to accept cookies, and the above website tells you how to remove cookies from your browser. However, in a few cases, some of our website features may behave unexpectedly or fail to function as a result.
-Monkeytype contains links to other websites. @@ -295,5 +295,6 @@