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

WIP: Change save tracked time approach. Issue #2355 #2595

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hugaleno
Copy link
Contributor

Description

Change tracked time approach to only persist on specific actions.
I'm not too familiar with angular ngrx store, so I would realy appreciate a review @johannesjo to make sure i'm going in the right way.

Atm, It's persisting time tracked only when pausing the current task/toggleCounters

Issues Resolved

Addresses #2355

Check List

  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

@johannesjo
Copy link
Owner

Looks good so far! Some general remarks:

  • We can use a dedicated effect to trigger the persistTimeTracked action which imho would feel cleaner

Apart from this, I think this is going in the right direction! Thank you!

@hugaleno hugaleno marked this pull request as draft April 30, 2023 19:48
@github-actions
Copy link

This PR has not received any updates in 90 days. Please comment, if this still relevant!

@github-actions github-actions bot added the Stale label Aug 29, 2023
@github-actions github-actions bot removed the Stale label Dec 30, 2023
Copy link

This PR has not received any updates in 90 days. Please comment, if this still relevant!

@github-actions github-actions bot added the Stale label Apr 28, 2024
@thinktapper
Copy link

Hey all, sad to see this got stale after a year. Is there anything we can do to pick up this progress again?
I have limited ngrx experience but would be happy to jump in if @johannesjo 's suggestion to create a

dedicated effect to trigger the persistTimeTracked action

is the next move 🏋️‍♂️

@github-actions github-actions bot removed the Stale label Jul 11, 2024
@johannesjo
Copy link
Owner

johannesjo commented Jul 11, 2024

EDIT: I got confused by the notification. Thought this was a new PR :D

@thinktapper this would be very welcome! Thank you very much for the offer!

OLD ANSWER:
(leaving this, since the input my still be helpful when starting this)

Hey @hugaleno ! Thank you very much for outlining this! On an ngrx level this looks good. We wouldn't be strictly required to involve ngrx necessarily, but since it is there to help understanding the data flows of the app, it might be helpful. Have you tried the redux dev tools browser extension? If the logs there provide a clear picture of what is going on (with enough information, but not too much noise), then we are on the right track! :)

I am most curious, about how the final model will look like (e.g. changes to AppDataComplete, but also the data written on the disk). Maybe there are also opportunities to shift more data to the archive sync file to make regular sync faster? In my local data the project workStart and workEnd take up almost half the space. But of course that shouldn't be the focus or main goal here.

I think we also should have a mechanism to save the time tracking at least once every one or two minutes, even when it is not paused, to avoid loosing too much data if the app or system crashes.

Not sure, if this is the input you were looking for. Please let me know if you have any other questions!

@thinktapper
Copy link

Thanks, the input is helpful @johannesjo and yes, I find the Redux dev tools wonderful for following data flow and visualizing the store! I should have some time next week to start looking into this work

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.

None yet

3 participants