Plugin for limiting the number of consecutive skips or postpones #526
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added plugin which allows to limit the number of consecutive times one can postpone or skip break. This is a middle ground between the strict mode which completely disables the skipping/postponing feature, and being able to click skip/postpone indefinitely. There is only one setting which tells how many times in a row one can skip breaks.
When user has skipped X breaks consecutively (without taking any breaks) both skip and postpone buttons become disabled.
Taking break completely (without skipping or postponing) resets the counter.
This should somewhat address #320. At the very least it addresses @tuhlaajapoika suggestion #320 (comment) (I also happened to have ADHD, so what @tuhlaajapoika described was exactly my problem: I was automatically clicking skip without even thinking).
There was no existing mechanism which would have allowed me to remove both buttons without making any changes in UI or core, so I added two flags to "context" and added some logic to UI. The intention behind these two flags is to simply disable both buttons for the next break, after which both flags become reset back to False. Not sure if it is the best solution, so if you have some better mechanisms in mind feel free to let me know and I will do it.
Also, I am not sure about wording of settings and plugin hints, so I would appreciate any suggestions.