monkeytype/frontend
Albert 67daa1d409
Custom mode pipe delimiter: section count mode (#4105) albertying, miodec
* Add section input

* Restore code

* Cleaner approach

* Correct current index

* Remove import

* Call punctuation, numbers, funboxes on all words in section

* Plus n adds n words instead of n sections

* Undo

* Fix normal test

* Replace word with section when delimiter is checked

* Restore

* Set progress to current section / section total

* Fix memory funbox

* Fix randomcase

* Fix text generation when random is not enabled

* no word limit if in random section mode

* instead of using a for loop, using a while loop and stopping dynamically

* handling getting next section
tracking section history to avoid repeating sections

* test

* Revert "test"

This reverts commit 50d20fff3d.

* allowing infinite

* fixed words not being added after the first word generation

* not checking section index if infinite word

* throwing if word contains a space (should never happen)

* removed/reverted old approach to this feature

* using input history everytime for now until a better solution is found

* removed unused import

* exporting section index and current section

* code used by the previous approach, most likely will be deleted

* revered a change this pr makes (idk why this was deleted)

* missing comment

* removed comment

* added section progress tracking
word generator now returns a list of section indexes, which is stored in test words module
this array is then used to determine which section the current word belongs to inside timer progress

* better errors

* replacing multiple spaces with one
replacing starting and trailing spaces before splitting

* fixed pipe delmiter non random custom text not working

* extracted logic into constants to make the if statement easier to understand and expand in the future

---------

Co-authored-by: Miodec <jack@monkeytype.com>
2023-05-15 11:45:38 +02:00
..
scripts converted required leftToRight to optional rightToLeft (#4229) 2023-04-26 23:34:13 +02:00
src Custom mode pipe delimiter: section count mode (#4105) albertying, miodec 2023-05-15 11:45:38 +02:00
static Custom mode pipe delimiter: section count mode (#4105) albertying, miodec 2023-05-15 11:45:38 +02:00
webpack replaced plugin with a better one 2023-04-20 12:59:54 +02:00
.eslintignore
docker-compose.yaml
firebase.json
gulpfile.js
package-lock.json replaced plugin with a better one 2023-04-20 12:59:54 +02:00
package.json replaced plugin with a better one 2023-04-20 12:59:54 +02:00
tsconfig.json