Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
merged 11 commits into from
Dec 21, 2022
Merged

Conversation

presleyp
Copy link
Contributor

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.

@presleyp presleyp requested a review from a team as a code owner December 13, 2022 20:10
@presleyp presleyp requested review from BrunoQuaresma and removed request for a team December 13, 2022 20:10
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a 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?

@presleyp
Copy link
Contributor Author

@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!

@presleyp
Copy link
Contributor Author

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)}>
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea!

Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a 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.

@presleyp presleyp merged commit 0eb2530 into main Dec 21, 2022
@presleyp presleyp deleted the 5354/increment-ttl/presleyp branch December 21, 2022 15:44
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schedule bumper on WorkspacePage can't increase time
2 participants