Skip to content
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

setup / refactoring / unit-tests / bug fixes / features #31

Closed
wants to merge 83 commits into from

Conversation

LuccaHellriegel
Copy link
Collaborator

@LuccaHellriegel LuccaHellriegel commented Mar 10, 2021

setup

  • npm setup with parcel as bundler and jest as testing framework: allows to include future packages, unit-testing and splitting the code into modules
  • added build and test commands to npm config

refactoring

  • split main code sections into modules
  • split up / extracted / renamed tons of functions for easier reusability / readbility / testability
  • made the most logic heavy functions mostly pure / removed direct roamsr-object access to allow trivial and mock-free testability / one-way dataflow
  • clarified dataflow in some functions to improve understandability
  • added status-tracking / minimal "state-machine" to allow a more "reactive" style in the future and make keybindings based on status possible
  • changed keybindings to a map-based approach to make future additions trivial
  • isolated all roamsr.state-mutations into functions for a better overview of what could change the state / prepare for reactive-refactor

bug fixes

  • a card is now only detected as new if it has no review-blocks, not if it has no refs on past daily pages
  • edge cases of limit-filtering when we mix multi-deck cards with single-deck cards generally work now (in some cases the limit of the higher deck still wins), added extensive unit-test for the filter-method
  • flagCard correctly steps to next card now
  • S-key keybinding fix (e1acf6f)
  • extraCards are saved correctly (not as arrays) / will be accessed correctly
  • sessions only start if the refreshed queue is not empty, counters are updated if the queue is refreshed

features

LuccaHellriegel and others added 28 commits March 10, 2021 10:35
…" works if only two answers are present, misc: renamed review/test status to answer/question status
@akrivka
Copy link
Owner

akrivka commented Mar 24, 2021

Closing in favor of #35 (identical PR, just to a different branch)

@akrivka akrivka closed this Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants