Function
Whether to render the visible heading; false when the shell provides one
The heading is pinned to the top of whatever scroll region the shell puts
the outline in. Both shells bound their height and scroll the current
lesson into view, which on a long course would carry the heading out of
sight and leave the sidebar visually unlabelled. Pinning costs nothing
when there is no scroll region — sticky is inert without one.
A shell whose own control already says "Course outline" — the mobile
drawer's <summary> — passes showHeading={false} so the words do not
appear twice. The <nav> keeps its aria-label either way, so the region
never loses its accessible name.
The heading's height is published as --outline-heading-offset so the
module titles below can pin themselves just under it. Keeping the value
here means the heading that causes the offset also owns it; when the
heading is not rendered the offset is zero.
Under the heading sits a course summary — a bar, the completed share and
35 of 107 videos · 4 of 10 lessons completed — and every module row states
its own share. Both come from one useCourseWatchProgress call, so they
count by the same rule as the video rows' completion marks. Progress lives
in localStorage, so until hydration commits, and for a learner who has
completed nothing, the summary states the course's size and the rows their
video counts: no frame asserts a share the page cannot know. The summary is
not pinned; pinning it would push every pinned module title down.
The Course outline sidebar. Renders the course's modules and lessons in
sequenceorder with the current lesson indicated. The component itself does not own the responsive shell — the page chooses where the outline sits (sidebar on desktop, drawer on mobile).