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

New way of habit status computation #6

Merged
merged 22 commits into from
Jan 11, 2024
Merged

New way of habit status computation #6

merged 22 commits into from
Jan 11, 2024

Commits on Dec 20, 2023

  1. Rewrite logic of habit status computation

    refactor routine to habit;
    use HabitStatus instead of HistoricalStatus and PlanningStatus;
    add additional statuses for clarity;
    rewrite logic of habit status computation so that both: historical and future statuses can be computed on the go instead of being cashed in the database, the only data that needs to be stored is number of times completed;
    Daniel committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    61698b6 View commit details
    Browse the repository at this point in the history
  2. add CHANGELOG.md

    github-actions[bot] committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    944525c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    da46ad3 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2023

  1. Finish HabitComputeStatusUseCase and thoroughly test it

    Add the corresponding fakes and refactor some existing data sources
    Daniel committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    62d866d View commit details
    Browse the repository at this point in the history
  2. Refactor Routine to Habit in database

    Daniel committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    d0b9dc6 View commit details
    Browse the repository at this point in the history

Commits on Dec 25, 2023

  1. Configure data flow for habit status computation

    Refactor Routine to Habit
    Daniel committed Dec 25, 2023
    Configuration menu
    Copy the full SHA
    bcc6cc8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    79c2c13 View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2023

  1. Update the UI for the insert/delete completion functionality

    Refactor Routine to Habit along the way.
    
    The app currently works well, but the habit streak functionality is not working. It always displays zeros in the current/latest streak cards. Streak functionality is also required to determine the color of an ambiguous date in RoutineCalendar, such as one that is associated with NotDue or Skipped habit status. So these days are displayed with the green (completed) color at the moment.
    
    The is also a lot of minor improvements and fixes to be done including refactoring Routine to Habit in the scope of the whole project
    Daniel committed Dec 26, 2023
    Configuration menu
    Copy the full SHA
    d21e76b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    412c73e View commit details
    Browse the repository at this point in the history
  3. Delete CHANGELOG.md

    The detailed list of changes will be written upon the MVP release along with documenting the project, providing it's description in README.md, etc.
    Daniel committed Dec 26, 2023
    Configuration menu
    Copy the full SHA
    35d97ca View commit details
    Browse the repository at this point in the history

Commits on Dec 31, 2023

  1. Configuration menu
    Copy the full SHA
    b107ab1 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. Fix bugs and improve performance

    Increase the speed of habit statuses computation on RoutineCalendarScreen by computing each date in a separate coroutine
    Introduce pagination for RoutineCalendarScreen so that the status computation process is not visible to the user
    DanielRendox committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    e43c6ab View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2024

  1. Make RoutineCalendar data load faster

    Improve RoutineCalendarViewModel's code
    Configure pagination for RoutineCalendar
    Move habit status computation off the main thread but only in RoutineCalendarViewModel (bad practice, should be fixed soon)
    DanielRendox committed Jan 5, 2024
    Configuration menu
    Copy the full SHA
    4cebc17 View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2024

  1. Refactor Routine to Habit

    Keep Routine in all places where it represents an abstract term and may imply a simple task, for example.
    DanielRendox committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    6a96719 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md

    To document the changes in the #6 PR
    DanielRendox committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    9f84f06 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2024

  1. Speed up habit status computation

    - Don't fetch data from repository in for loops in HabitComputeStatusUseCase. Instead, get lists of data only once and then operate on them.
    - Add new functionality to vacation data sources.
    - Optimize coroutines in RoutineCalendarViewModel.
     They now get cancelled when the data gets outdated. This way, we don't waste resources because the same month's data is not loaded simultaneously.
    DanielRendox committed Jan 8, 2024
    Configuration menu
    Copy the full SHA
    61bbea5 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. Make completing calendar dates much more responsive

    Calendar dates have been loading rather slowly after a completion, especially when multiple dates were clicked at the same time. To sort out this issue, I changed the code to reload only the current month and delete all the others. Although with this approach, a visible delay in data load gets appeared upon scroll to another month, this issue is minuscule compared to the previous ones.
    DanielRendox committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    caf9412 View commit details
    Browse the repository at this point in the history
  2. Improve the code quality

    - Switch to Dispatchers.Default in HabitComputeStatusUseCase instead of doing that in RoutineCalendarViewModel
    - Minor fix - classify already completed status to two status for future and past dates. That's necessary because the RoutineCalendar will display wrong colors for future dates otherwise
    - Don't provide Dispatchers.IO with Koin because it provides this dispatcher for all coroutine contexts, which is an undesired behaviour. Make it a default value for all existing local data sources instead.
    DanielRendox committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    1f499f7 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2024

  1. Bug fix

    DanielRendox committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    e5588d8 View commit details
    Browse the repository at this point in the history
  2. Update AgendaScreenViewModel

    to show routines only when they are loaded
    DanielRendox committed Jan 11, 2024
    Configuration menu
    Copy the full SHA
    fb72ffc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f91ed7e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ebff655 View commit details
    Browse the repository at this point in the history