hovancik / stretchly

The break time reminder app
https://hovancik.net/stretchly
BSD 2-Clause "Simplified" License
4.58k stars 441 forks source link

FR: Daily limit clock ? #667

Open mwoz123 opened 4 years ago

mwoz123 commented 4 years ago

Prerequisites

Description

First of all thanks for great app:)

I've FR: to add Daily limit clock/counter - similar to microbreak and break - could we have a daily limit in hours? e.g. after 8hours it will display popup with message it's time to leave work. Might be very useful now especaily when many people have to work from home because of the covid-19.

Workrave does have it: https://mintguide.org/wp-content/uploads/posts/2014-03/1395392261_preferences.gif Can Stretchly also have it?

Operating system: all

Steps to Reproduce

N/a Expected behavior: After time's up (e.g. 8h) should display message it's time to stop working today.

Daily limit counter - informs when it's time to stop working with computer

Mockups: Zrzut ekranu z 2020-09-09 21-38-39

Zrzut ekranu z 2020-09-16 21-19-26

Actual behavior: no such feature

hovancik commented 4 years ago

Hi @mwoz123 and thanks for the FR :)

I guess we'll see in the future, but right now I have other things I would like to work on.

mwoz123 commented 4 years ago

Idea tech details ("moved" from #680) :

Daily limit should have same/similar rule set as micro- and break.

Popup should appear after (default) e.g. 6 or 8h, and can be postpone or skipped. Daily limit should have no "break duration" time.

Once breaks are paused, or rested - daily limit counter should also be paused/rested. (I havne't check how "natural break" works but it would be good to delay daily limit after certain period of inactivity or even reset after long enough inactivity - but I think this should be next PR)

I created "skip to daily limit" - it doesnt' have much logic sense - it's temp function to simplify development, so don't be confused by that;) Should be removed once everything is working fine.

@hovancik answer:

To be honest, I am not sure about this. I don't like the idea of adding features that other apps have, Workrave in this case. I would prefer Stretchly to be different.

Stretchly is break time reminder app. This feature looks like a timer to finish ones shift. There are hundreds of apps for counting time or timers. I would prefer to keep Stretchly simple, as every extra features make it harder to maintain and to add core features. This feature seems to be as it should be separate application.

my response:

I would prefer to keep Stretchly simple, as every extra features make it harder to maintain and to add core features.

(From developer point of view) I totally agree. Especially when there probably would be a need to change breakPlanner.js lines 74-102 which already has complicated logic.

There are hundreds of apps for counting time or timers

Here I disagree. Why someone should have 2 counting down time apps and displaying notification once time is up running in same time on same system?

How about creating array that will contain number of break timers (and their configuraiton) and if someone will want to have 10 time's up reminders (instead 2 - but I belive most users will want at most 3) can be easily set in configuration. If some wants 1 will change the configuration to 1, and so on.. How about that?

Stretchly is break time reminder app.

Btw I was wondering why it's not marked with "RSI" or "prevent "Repetitive strain injury" (RSI) in tags or description. It might be easier to find this app;) and wanted to propose it to you;)

Anyway is there a chance such feature will be accepted? I thought so from your anser https://github.com/hovancik/stretchly/issues/667#issuecomment-683282721

@hovancik latest replay:

I will need to think more. Because much more people request that I will add "custom working times", which goes in similar direction but it would be then close to impossible to have both. Maybe a combination where people can define working hours and be notified at the end?

mwoz123 commented 4 years ago

Working hours - I assume you mean #342, right?

From my perspective daily limit covers working hour notifications at the end of working hours, and it's more flexible. No matter what time you start you're notified when your time is over.

And as I recently heard in radio news it's a common problem for majority of Covid-19 homeoffice workers to separate time when work is over, and starts their off work time.

hovancik commented 4 years ago

Yeah similar, many people would like to see ability to tell that Stretchly should run from X to Y hours during weekdays and Z to M during weekends and so on.

I will need to think more, really not sure if this is something that Stretchly should do, it brings new complexity (both ideas). I like that it's simple and people can pause/resume/reset how they think is useful for them.

mwoz123 commented 3 years ago

How about other way?

Break and Microbreak code is mainly duplicated. How about creating a class for Break e.g (using pseudo-code TS for better readability here) .:

class Break {
duration: number;
interval: number;
notification: boolean;
notificationInterval: number;
postponeTime: nubmer;
ideas: string [];
... //all rest, current settings from config json goes here
//new once:
visibleName: string; //name used at UI ( localization key that will be resolved to "Mini Break", "Break", etc)
settingNamePrefix: string // name used in setting config json (e.g. 'microbreak", "break")
piority : number; // so we can easly compare which break should be shown when 2 are on same time

constructor( {piority, visiblei18nName , settingNamePrefix}) {
duration = settings.get( settingNamePrefix + "duration")  
interval = settings.get( settingNamePrefix + "interval") // || settings.get("defaultInterval") 
...

microbreak:

const microbreak = new Break({priority : 100. settingNamePrefix: "microbreak", visibaleName : "main.microbreak" //key to EN locale "Micro Break"});

break:

const break = new Break({priority : 200. settingNamePrefix: "break", visibaleName : "main.break" //key to EN locale "Break"});

then replace current "micrbreak" and "break" in code with

breaks : Break [];

then in Contributor/Sponsor settings we could have length of breaks array. so if someone wants 10 breaks can have it. if some wants to have other e.g. "nanobreak" before mini-break can have it.

@hovancik - this is a draft of code - what you think?

mwoz123 commented 3 years ago

This FR is to solve Covid-19 WFH worklife balance problems.

Couple of articles:

There're dozens more on the Internet about no worklife balance in Covid WFH...

Addition clock counter ("Daily limit" or array of breaks) in Stretchly could help solve this problem.

hovancik commented 3 years ago

What code your new one should replace? I am not sure.

Currently, long and mini breaks are separated as it's always long break after X mini breaks and I do some math to plan them based on this logic. This is all then complicated by DND, Idle time, Suspend/Resume,Pause/Reset etc and different priorities around those actions: this is why I take weeks to think about new ideas, it's more complicated then it seems and has a lot of things that influences the behaviour.

I think next steps should be (overall):

Then I think we can figure out how to tell user to stop working. (I would vote for adding another group of break ideas that would talk about why people should stop working, as you mentioned above, that would be shown at the end of the day)

Why? If we add daily limit right now, it opens questions for me:

Different people will want different things, as it always is, and it will make the feature bigger and bigger. If we have working hours, all questions are gone because we know when the working hours are.

mwoz123 commented 3 years ago

Thanks for answer.

What code your new one should replace? I am not sure.

I meant duplicated code around handling break and microbreak

I assume prerequisites for Daily limit are closed:

813 #772 #503 & #342

Once they're closed we can get back to daily limit, right?

hovancik commented 3 years ago

Let's get back when we have Working hours.

Chealer commented 3 years ago

Thank you very much for this ticket @mwoz123

I agree with the request, but having used Workrave for years, I must say I disabled the daily limit after a couple years. Workrave's implementation may be a good idea for some, but I think it was too controlling for me. It's a relatively hard limit which allows postponing, but only by a few minutes each time. I would rather see either:

To put it simply, in my mind (disclaimer: I am no ergonomist at all), the daily break is the least important/realistic one, so it should also be the least intrusive.