Skip to content

Conversation

@pganesh-apphelix
Copy link

@pganesh-apphelix pganesh-apphelix commented Jan 2, 2026

Description

  • This pull request adds functionality to expand units in the course outline page to display their individual components (similar to how sections and subsections expand). When a unit is expanded, it fetches and displays a list of components including new support for LTI, SCORM, and H5P component types.

  • Access to this feature is controlled by a course-level waffle flag (enableUnitExpandedView). When the flag is disabled, unit expansion is not available, and unit titles fall back to navigational links. When enabled, units behave as expandable cards with inline component details.

Key changes:

  • Added three new icon components (LtiIcon, ScormIcon, H5pIcon) with corresponding mappings in the component type constants
  • Implemented expand/collapse functionality for unit cards with API integration to fetch component data, gated by the enableUnitExpandedView waffle flag
  • Integrated a new data layer (API hooks) to retrieve unit component information from the backend
  • Updated tests to mock the waffle flag state and verify conditional rendering

Jira

Before

Course.outline._.Demonstration.Course._.Your.Plaform.Name.Here.-.Google.Chrome.2026-01-02.17-09-25.mp4

After

Course.outline._.Demonstration.Course._.Your.Plaform.Name.Here.-.Google.Chrome.2026-01-09.14-46-57.mp4

Copilot AI review requested due to automatic review settings January 2, 2026 10:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds functionality to expand units in the course outline page to display their individual components (similar to how sections and subsections expand). When a unit is expanded, it fetches and displays a list of components including new support for LTI, SCORM, and H5P component types.

Key changes:

  • Added three new icon components (LtiIcon, ScormIcon, H5pIcon) with corresponding mappings in the component type constants
  • Implemented expand/collapse functionality for unit cards with API integration to fetch component data
  • Created new data layer (API hooks) to retrieve unit component information from the backend

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/generic/block-type-utils/constants.ts Added three new component types (lti, scorm, h5p) with their icon and style mappings
src/generic/block-type-utils/LtiIcon.tsx New SVG icon component for LTI consumer components
src/generic/block-type-utils/ScormIcon.tsx New SVG icon component for SCORM components
src/generic/block-type-utils/H5pIcon.tsx New SVG icon component for H5P components
src/course-outline/unit-card/messages.js Added i18n messages for loading and empty states of unit components
src/course-outline/unit-card/data/hooks.ts Created React Query hook for fetching unit handler data
src/course-outline/unit-card/data/api.ts Implemented API client and TypeScript interfaces for unit component data
src/course-outline/unit-card/UnitCard.tsx Modified unit card to support expand/collapse with component list rendering and click navigation
src/course-outline/unit-card/UnitCard.scss Added styles for expanded unit components section with hover and focus states

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 8, 2026 07:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 8, 2026 07:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 9, 2026 08:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings January 9, 2026 09:32
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 11 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pganesh-apphelix pganesh-apphelix merged commit 912cd5e into release-ulmo Jan 9, 2026
10 checks passed
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.

4 participants