Add a "Continue After Zero" option to notify but not stop at 0#69
Add a "Continue After Zero" option to notify but not stop at 0#69thisismiller wants to merge 2 commits into
Conversation
Aside from adding the new setting, this required: - Adding a 'Skip' or 'Next' button to do a Reset+Mode Change - Making Timer.timeup be called only once upon the completing tick - Separating logging a completed pomodoro from the notification, so that we can still notify at the intended time, but wait until the user ends the session to log the final duration.
matching to eatgrass#69
|
Hey, thanks a lot, this is exacty what i was looking for. Can I ask you your final main.js file ? I tried making the appropriate changes but i am not familiar with ts files so it turned out pretty messy. |
Co-authored-by: sean borg <sean_borg@hotmail.co.uk>
|
@thisismiller Thanks a lot ! |
|
@AmadeusJJ TimerLog.duration is derived from LogContext.elapsed/60000 (in |
|
The log template I use is on https://transactional.blog/personal/time-tracking-in-obsidian (which also gives advice on Weekly Notes and DataView integration) |
I found myself getting annoyed that I'd be focused on working on something, and would have to keep restarting a pomodoro on the same task. So I made some changes so that it will notify as a reminder, but keep the clock going for when I'm focused working, and I'll manually stop the timer when I'm done. This is a simpler version version of "flow mode" found in some pomodoro software, of which there's a request for it in #46. It's probably easiest explained just with a screenshot:
Feel free to request renames/refactors, as this is a bit more invasive of a change. I'm not in love with the name "Continue After Zero", but I'm failing to think of something short to call it that's more obvious as to what it does.
Aside from adding the new setting, this required:
state.elapsed > state.count.Checking the "Continue After Zero" box effectively renders Auto-start ignored. If you have Auto-start checked, and click the skip ▷▷ button, it doesn't start the next pomodoro. This is because there's no handling of auto-start in Timer.reset... and I'm kind of unclear if there should be? I could make an actual Timer.skip() to add auto-start handling for this, but if the reset ⟲ button doesn't Auto-start then the skip one probably shouldn't also?
The skip ▷▷ button is just exactly the start button ▷, which I duplicated in inkscape, put it next to the original with a tiny space, and then shrunk the width by 50% so it'd take up about the same amount of space. I, again, am not really sure what's a good design for this button.
Feedback welcome, and thanks for the great plugin. If this is a bit out of the scope of what you wanted for the pomodoro plugin, no worries on rejecting the PR.