-
Notifications
You must be signed in to change notification settings - Fork 902
fix: stop time incrementer on workspace page #5406
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, would make sense for us to create a test for this?
@BrunoQuaresma yes, but when I went to I realized the max deadline doesn't depend on the template at all anymore since the template has a default rather than a max - reworking it now! |
I have tests in mind for this but I'm having some trouble with them, so in the interest of wrapping up PRs before the break I'd like to merge this and come back for the tests in #5476. |
@@ -19,13 +19,13 @@ export const EditHours = ({ | |||
const styles = useStyles() | |||
|
|||
return ( | |||
<form onSubmit={() => handleSubmit(hours)}> | |||
<form onSubmit={() => handleSubmit(Number.isNaN(hours) ? 0 : hours)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when is it going to be NaN
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you delete the number from the input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could add a comment explaining this? So we know why we are checking it. Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@presleyp that sounds fair enough. I just had a minor question.
Fixes #5354
The incrementer wasn't working when the template default ttl was 0, because the max deadline was being calculated as start time + 0.