Adding changes for Estimated Time to Complete#1911
Conversation
- Updated normalizeOutlineBlocks to extract effort_time and estimated_time (HH:MM:SS) from course blocks. - Added hydrateMissingOutlineEffort to calculate effort by summing the effort times of child units when missing. - Integrated showEstimatedTime course-level flag into the normalized course model. - Added time-string parsing to convert HH:MM:SS into raw seconds for consistent frontend calculations.
- Added estimated-time display logic to section and sequence outline rows, using effortTime when available and falling back to unit-level estimated time data when needed. - Passed the showEstimatedTime flag through the outline component tree so course-level settings can suppress estimated time rendering. - Updated SectionTitle and SequenceTitle to render compact minute labels next to titles. - Reused the same estimated-time formatting pattern across Section.tsx, SectionTitle.tsx, SequenceLink.tsx, and SequenceTitle.tsx for consistent outline presentation.
- Calculated total estimated course time from section and sequence effort data. - Rendered a course-level estimated time label next to the outline title when enabled. - Passed the showEstimatedTime flag through to the section outline slot so downstream rows can respect the course setting.
- Added strings for estimated time labels in the course outline header, sections, and sequences. - Introduced minute/hour formatting for outline time estimates.
- Added estimated-time labels to sidebar section, sequence, and unit rows. - Resolved effort time from outline data and fell back to unit-level estimated time where needed. - Passed the showEstimatedTime flag through the sidebar outline tree so course-level settings can hide the estimates. - Kept the new labels consistent with the existing sidebar outline layout.
- Added inline commenting to SidebarSection.jsx, SidebarSequence.jsx, and SidebarUnit.jsx.
…ydration - Updated CourseOutlineTray.jsx to pass showOutlineEstimatedTime through section and sequence sidebar components. - Enhanced hooks.jsx to expose showOutlineEstimatedTime, surface model fallback data, and trigger one-time effort hydration after outline load. - Added compact estimated-time localization in messages.ts for consistent sidebar time labels.
- Updated normalizeLearningSequencesData, normalizeSequenceMetadata, and normalizeOutlineBlocks to persist effort metadata. - Added fallback conversion from estimated_time_minutes to seconds when effort_time is missing for consistent unit calculations. - Extended models to include course-level showEstimatedTime and course block structure for downstream rendering. - Added hydrateOutlineEffortData thunk to fetch sequence metadata and backfill missing unit and sequence effort values.
- Updated CourseHomeSectionOutlineSlot to propagate showOutlineEstimatedTime into section rendering. - Enhanced UnitTitleSlot to show an "Estimated Time to Complete" label under the unit title, with proper hour/minute formatting. - Expanded UnitTitleSlot unit prop typing to include estimatedTimeMinutes and showOutlineEstimatedTime for downstream consumption.
|
Thanks for the pull request, @becdavid! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
No description provided.