From b7711ffae20b7e0704d20e6286472c5ae30e16de Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Thu, 16 Jul 2026 10:19:50 +0100 Subject: [PATCH] feat(dashboard): show course progress in student sidebar (#761) * feat(dashboard): show course progress in student sidebar Adds a progress ring with completed-lesson count to the course sidebar header, per-section completion percentages in the content tree, and a "Your progress" footer card with an overall progress bar plus a lessons/exercises breakdown. All indicators are student-only and derive from the existing per-item isComplete flags, so they update live when a lesson is marked complete. * feat(dashboard): show course progress ring in header on mobile Extracts the sidebar footer progress card into a reusable course-progress-card component and adds a course-progress-popover (progress ring trigger, mirroring the org nav setup ring) to the course header beside the Assistant button. Shown to students on mobile only, where the sidebar footer card is hidden; tapping the ring opens a popover with the linear progress bar and lessons/exercises breakdown. * fix(dashboard): align progress ring subtitle with ring scope The header ring percent covers lessons and exercises while the subtitle only counted lessons, which contradicted each other on courses with exercises. The subtitle now uses the same all-content counts. Also drops a duplicate useSidebar import in favor of the namespace export. --- .../course/components/course-header.svelte | 5 +++ .../components/course-progress-card.svelte | 30 ++++++++++++++++ .../components/course-progress-popover.svelte | 27 ++++++++++++++ .../sidebar/course-content-tree.svelte | 14 +++++++- .../sidebar/course-sidebar-logo.svelte | 32 +++++++++++++++-- .../components/sidebar/course-sidebar.svelte | 14 +++++++- .../src/lib/features/course/utils/content.ts | 36 +++++++++++++++++++ .../src/lib/utils/translations/da.json | 6 ++++ .../src/lib/utils/translations/de.json | 6 ++++ .../src/lib/utils/translations/en.json | 6 ++++ .../src/lib/utils/translations/es.json | 6 ++++ .../src/lib/utils/translations/fr.json | 6 ++++ .../src/lib/utils/translations/hi.json | 6 ++++ .../src/lib/utils/translations/pl.json | 6 ++++ .../src/lib/utils/translations/pt.json | 6 ++++ .../src/lib/utils/translations/ru.json | 6 ++++ .../src/lib/utils/translations/vi.json | 6 ++++ 17 files changed, 214 insertions(+), 4 deletions(-) create mode 100644 apps/dashboard/src/lib/features/course/components/course-progress-card.svelte create mode 100644 apps/dashboard/src/lib/features/course/components/course-progress-popover.svelte diff --git a/apps/dashboard/src/lib/features/course/components/course-header.svelte b/apps/dashboard/src/lib/features/course/components/course-header.svelte index 18ccd09a..e51c1c1e 100644 --- a/apps/dashboard/src/lib/features/course/components/course-header.svelte +++ b/apps/dashboard/src/lib/features/course/components/course-header.svelte @@ -17,6 +17,7 @@ import { toggleAiAssistant } from '$features/ai-assistant/utils/store'; import { openCoursePreview } from '$features/course/utils/course-preview'; import { t } from '$lib/utils/functions/translations'; + import CourseProgressPopover from './course-progress-popover.svelte'; import CoursePublishBadge from './course-publish-badge.svelte'; import CoursePublicBadge from './course-public-badge.svelte'; import CourseContextMenuContent from './course-context-menu-content.svelte'; @@ -85,6 +86,10 @@ + {#if $isStudentExperience} + + {/if} +