Skip to content

feat: Add SingleQuestion layout for slideshow-style activity presentation#541

Closed
dougmartin wants to merge 1 commit intomasterfrom
fbf-jan-16-add-single-question-layout
Closed

feat: Add SingleQuestion layout for slideshow-style activity presentation#541
dougmartin wants to merge 1 commit intomasterfrom
fbf-jan-16-add-single-question-layout

Conversation

@dougmartin
Copy link
Member

Implements a new activity layout that presents content one item at a time in a presentation/slideshow format, while keeping all iframes rendered to maintain inter-embeddable communication.

Core features:

  • Full-screen layout (100vh/100vw) with header, content area, and scrubber
  • All embeddables rendered once on mount, visibility controlled via CSS
  • Keyboard navigation: arrows, Home/End, Page Up/Down, Escape, ?
  • Position persistence via sessionStorage
  • Support for activities and sequences

Components added:

  • SingleQuestionContent: Main container with navigation state management
  • SingleQuestionHeader: Compact header with logo, breadcrumbs, username
  • SingleQuestionMain: Slide container with CSS-based visibility toggling
  • SingleQuestionScrubber: Dot-based navigation with page/activity markers
  • SingleQuestionKeyboardHelp: Modal showing available keyboard shortcuts
  • SingleQuestionErrorBoundary: Graceful error handling per slide
  • Slide types: intro, page-header, section-header, completion, embeddable

Navigation scrubber:

  • Individual dots for each slide (4px default, 6px current)
  • Color-coded dots: gray (questions), orange (pages), purple (activities), green (intro/completion)
  • Vertical separator lines before page and activity boundaries
  • Prev/Next, Home/End buttons with WCAG-compliant touch targets

Visual polish:

  • Confetti celebration animation on completion slide
  • Slides centered horizontally and vertically
  • Hidden scrollbars with maintained scroll functionality
  • Smooth fade transitions between slides

Accessibility (WCAG 2.1 AA):

  • Full keyboard navigation support
  • ARIA labels and live regions for screen readers
  • Respects prefers-reduced-motion for all animations
  • Minimum 44x44px touch targets
  • Inert attribute on hidden slides to prevent focus trapping

Utilities:

  • flattenActivityToSlides(): Converts activity structure to flat slide array
  • Question numbering across pages
  • Source page tracking for navigation context

Includes unit tests for slide flattening logic and sample activity JSON.

…tion

Implements a new activity layout that presents content one item at a time
in a presentation/slideshow format, while keeping all iframes rendered
to maintain inter-embeddable communication.

Core features:
- Full-screen layout (100vh/100vw) with header, content area, and scrubber
- All embeddables rendered once on mount, visibility controlled via CSS
- Keyboard navigation: arrows, Home/End, Page Up/Down, Escape, ?
- Position persistence via sessionStorage
- Support for activities and sequences

Components added:
- SingleQuestionContent: Main container with navigation state management
- SingleQuestionHeader: Compact header with logo, breadcrumbs, username
- SingleQuestionMain: Slide container with CSS-based visibility toggling
- SingleQuestionScrubber: Dot-based navigation with page/activity markers
- SingleQuestionKeyboardHelp: Modal showing available keyboard shortcuts
- SingleQuestionErrorBoundary: Graceful error handling per slide
- Slide types: intro, page-header, section-header, completion, embeddable

Navigation scrubber:
- Individual dots for each slide (4px default, 6px current)
- Color-coded dots: gray (questions), orange (pages), purple (activities),
  green (intro/completion)
- Vertical separator lines before page and activity boundaries
- Prev/Next, Home/End buttons with WCAG-compliant touch targets

Visual polish:
- Confetti celebration animation on completion slide
- Slides centered horizontally and vertically
- Hidden scrollbars with maintained scroll functionality
- Smooth fade transitions between slides

Accessibility (WCAG 2.1 AA):
- Full keyboard navigation support
- ARIA labels and live regions for screen readers
- Respects prefers-reduced-motion for all animations
- Minimum 44x44px touch targets
- Inert attribute on hidden slides to prevent focus trapping

Utilities:
- flattenActivityToSlides(): Converts activity structure to flat slide array
- Question numbering across pages
- Source page tracking for navigation context

Includes unit tests for slide flattening logic and sample activity JSON.
@cypress
Copy link

cypress bot commented Jan 16, 2026

activity-player    Run #1866

Run Properties:  status check failed Failed #1866  •  git commit 374b9e4d4d: feat: Add SingleQuestion layout for slideshow-style activity presentation
Project activity-player
Branch Review fbf-jan-16-add-single-question-layout
Run status status check failed Failed #1866
Run duration 06m 58s
Commit git commit 374b9e4d4d: feat: Add SingleQuestion layout for slideshow-style activity presentation
Committer Doug Martin
View all properties for this run ↗︎

Test results
Tests that failed  Failures 83
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 5
Tests that passed  Passing 8
View all changes introduced in this branch ↗︎

Tests for review

Failed  activity-page-labbook-take-snapshot-dialog.test.ts • 3 failed tests

View Output

Test Artifacts
Test the overall app > Labbook > verify Labbook Take Snapshot Dialog Test Replay Screenshots
Test the overall app > Labbook Wide > verify Labbook Wide Take Snapshot Dialog Test Replay Screenshots
Test the overall app > Labbook Upload From Media Library > verify Upload From Media Library Not Displayed For Take Snapshot Test Replay Screenshots
Failed  activity-page-font-size-large.test.ts • 13 failed tests

View Output

Test Artifacts
Test the overall app > Home Page, Header and Footer > verify large font size in home page, header and footer Test Replay Screenshots
Test the overall app > Bar Graph > verify large font size in bar graph interactive Test Replay Screenshots
Test the overall app > Carousel > verify large font size in carousel interactive Test Replay Screenshots
Test the overall app > Drag & Drop > verify large font size in drag & drop interactive Test Replay Screenshots
Test the overall app > Drawing Tool > verify large font size in drawing tool interactive Test Replay Screenshots
Test the overall app > FIB > verify large font size in fill in the blanks interactive Test Replay Screenshots
Test the overall app > Image Interactive > verify large font size in image interactive Test Replay Screenshots
Test the overall app > Image Question > verify large font size in image question interactive Test Replay Screenshots
Test the overall app > Labbook > verify large font size in labbook interactive Test Replay Screenshots
Test the overall app > MCQ > verify large font size in mcq interactive Test Replay Screenshots
The first 10 failed tests are shown, see all 13 tests in Cypress Cloud.
Failed  activity-page-font-size-normal.test.ts • 13 failed tests

View Output

Test Artifacts
Test the overall app > Home Page, Header and Footer > verify normal font size in home page, header and footer Test Replay Screenshots
Test the overall app > Bar Graph > verify normal font size in bar graph interactive Test Replay Screenshots
Test the overall app > Carousel > verify normal font size in carousel interactive Test Replay Screenshots
Test the overall app > Drag & Drop > verify normal font size in drag & drop interactive Test Replay Screenshots
Test the overall app > Drawing Tool > verify normal font size in drawing tool interactive Test Replay Screenshots
Test the overall app > FIB > verify normal font size in fill in the blanks interactive Test Replay Screenshots
Test the overall app > Image Interactive > verify normal font size in image interactive Test Replay Screenshots
Test the overall app > Image Question > verify normal font size in image question interactive Test Replay Screenshots
Test the overall app > Labbook > verify normal font size in labbook interactive Test Replay Screenshots
Test the overall app > MCQ > verify normal font size in mcq interactive Test Replay Screenshots
The first 10 failed tests are shown, see all 13 tests in Cypress Cloud.
Failed  activity-page-export-to-media-library.test.ts • 4 failed tests

View Output

Test Artifacts
Test the overall app > Image Question > verify image question with export to media library Test Replay Screenshots
Test the overall app > Drawing Tool > verify drawing tool with export to media library Test Replay Screenshots
Test the overall app > Labbook > verify Labbook with export to media library Test Replay Screenshots
Test the overall app > Labbook Wide > verify Labbook Wide with export to media library Test Replay Screenshots
Failed  activity-page-read-aloud.test.ts • 11 failed tests

View Output

Test Artifacts
Test the overall app > Bar Graph > verify read aloud in bar graph interactive Test Replay Screenshots
Test the overall app > Carousel > verify read aloud in carousel interactive Test Replay Screenshots
Test the overall app > Drag & Drop > verify read aloud in drag & drop interactive Test Replay Screenshots
Test the overall app > Drawing Tool > verify read aloud in drawing tool interactive Test Replay Screenshots
Test the overall app > FIB > verify read aloud in fill in the blanks interactive Test Replay Screenshots
Test the overall app > Image Interactive > verify read aloud in image interactive Test Replay Screenshots
Test the overall app > Image Question > verify read aloud in image question interactive Test Replay Screenshots
Test the overall app > Labbook > verify read aloud in labbook interactive Test Replay Screenshots
Test the overall app > MCQ > verify read aloud in mcq interactive Test Replay Screenshots
Test the overall app > Open Response > verify read aloud in open response interactive Test Replay Screenshots
The first 10 failed tests are shown, see all 11 tests in Cypress Cloud.

The first 5 failed specs are shown, see all 20 specs in Cypress Cloud.

@dougmartin
Copy link
Member Author

Closed - I just added this to document the branch.

@dougmartin dougmartin closed this Jan 20, 2026
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.

1 participant