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

feat: add minimum time for the timer #1210

Merged
merged 5 commits into from
Mar 9, 2023

Conversation

geomarb
Copy link
Contributor

@geomarb geomarb commented Mar 9, 2023

Relates to:

Proposed Changes

This PR turns the timer (useTimer) more configurable. It is now possible to set up the following:

  • START_MINUTES: (default value: 5) default minutes for all timers
  • START_SECONDS: (default value 0) default minutes for all timers
  • JUMP_SECONDS: (default value: 5) increase/decrease seconds when setting the duration
  • JUMP_MINUTES: (default value: 1) increase/decrease minutes when setting the duration
  • MIN_SECONDS: (default value: 30) minimum seconds accepted when setting the duration
  • MIN_MINUTES: (default value: 0) minimum minuted accepted when setting the duration
  • MAX_SECONDS: (default value: 60 - JUMP_SECONDS) maximum seconds to set, it is related to JUMP_SECONDS in this case it will 55 seconds, if JUMP_SECONDS is 10 it must be 50and so on, otherwise it will be over 60 seconds.
  • MAX_MINUTES: (default value: 59) maximum minutes allowed for the timer if in any case, it needs to be greater than 99 the timer's design and its CSS must be changed as well

Note: The logger was removed from the events in the backend, it actually should not be present in the events since if it is there it will be sent to the frontend inside the event.

Note 2: The previousStatus was completely removed since wasn't necessary.

This pull request closes:

@geomarb geomarb linked an issue Mar 9, 2023 that may be closed by this pull request
@geomarb geomarb changed the title Feat/add minimum time for the timer feature: add minimum time for the timer Mar 9, 2023
@geomarb geomarb changed the title feature: add minimum time for the timer feat: add minimum time for the timer Mar 9, 2023
Copy link
Contributor

@nunocaseiro nunocaseiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@geomarb geomarb merged commit 1703362 into main Mar 9, 2023
@geomarb geomarb deleted the feat/add-minimum-time-for-the-timer branch March 9, 2023 14:26
@geomarb geomarb self-assigned this Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add minimum time for the timer
2 participants