Codelabz
Codelabz copied to clipboard
[ Fix : Introduce Dynamic Total Time Calculation for Tutorial Steps (#1050) ]
Description
Added a "total_time" variable in formData which was set to 0 initially and while setting the doc, on each new step creation, a function updateTime is added which is called with tutorial_id & time and updated the total_time value there. In CardWithoutPicture and CardWithPicture, instead of hardcoding the value 10 min, I used tutorial.total_time.
Related Issue
Fixes #1050
Motivation and Context
It adds more dynamism to our tutorial, making it look like the value is changing in real-time.
How Has This Been Tested?
I tested it locally on my machine and the video demonstrating the change
Screenshots or GIF (In case of UI changes):
https://github.com/scorelab/Codelabz/assets/123815256/b8b865ea-b367-4326-8c41-7e8c29854b51
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.