Skip to content

Add changes for Estimated Time to complete#38

Open
becdavid wants to merge 9 commits into
teak-design-tokensfrom
dev/nalexaTimeFrontend
Open

Add changes for Estimated Time to complete#38
becdavid wants to merge 9 commits into
teak-design-tokensfrom
dev/nalexaTimeFrontend

Conversation

@becdavid
Copy link
Copy Markdown

No description provided.

nalexa3 added 9 commits April 27, 2026 08:14
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants