Uh oh!
There was an error while loading. Please reload this page.
Fix default upload duration being shown in raw seconds - #3470
Conversation
vkWeb
commented
Jul 31, 2022
@rtibbles the above mentioned issue on PR description is fixed. Btw, there's a bug that I observed while I was fixing this issue. On uploading a new file when there's a already uploaded file, the If we can make ActivityDuration react whenever a new file is uploaded we can fix it I think? |
rtibbles
commented
Aug 1, 2022
Ah, that's a good catch - can you file a follow up issue for that case? |
| }, | ||
| convertToHHMMSS(totalSeconds) { | ||
| if (totalSeconds !== null && Number.isInteger(totalSeconds)) { | ||
| const hours = Math.floor(totalSeconds / 3600) |
There was a problem hiding this comment.
This method will give the same result and seems a little simpler: https://stackoverflow.com/a/25279399
There was a problem hiding this comment.
That implementation breaks when input seconds are greater than or equal to 86400 seconds.
On 86400 seconds, it outputs 00:00:00. The expected output should be 24:00:00. Date objects are relative to specific parameters like timezone, etc. And our use case is absolute in nature. So, IMO the current implementation feels more robust to me.
vkWeb
commented
Aug 2, 2022
An issue for the outdated completion criteria duration: #3472. |
Summary
This PR fixes the default upload duration being shown in raw seconds. Now, we show the
durationinHH:MM:SSformat.Screenshots (if applicable)
Before:

After:

Reviewer guidance
References
Closes#3465.
Contributor's Checklist
PR process:
CHANGELOGlabel been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocslabel has been added if this introduces a change that needs to be updated in the user docs?requirements.txtfiles also included in this PRStudio-specifc:
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages,components, andlayoutsdirectories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarnandpip)